public class PenTool extends Tool
Modifier and Type | Field and Description |
---|---|
private double[] |
lastPos
The position of the mouse at the start of this frame of animation
|
Constructor and Description |
---|
PenTool(javafx.scene.control.Button button,
javafx.scene.control.CheckMenuItem menuItem)
Create a PenTool
|
Modifier and Type | Method and Description |
---|---|
void |
handleMouse(javafx.scene.input.MouseEvent e,
javafx.event.EventType<? extends javafx.scene.input.MouseEvent> type,
PaintController controller)
Handles canvas mouse events while this tool is selected
|
getButton, getMenuItem, matches
private double[] lastPos
public PenTool(javafx.scene.control.Button button, javafx.scene.control.CheckMenuItem menuItem)
button
- the tool button corresponding to this toolmenuItem
- the menu item corresponding to this toolpublic void handleMouse(javafx.scene.input.MouseEvent e, javafx.event.EventType<? extends javafx.scene.input.MouseEvent> type, PaintController controller)
Tool
handleMouse
in class Tool
e
- the mouse eventtype
- the type of the mouse eventcontroller
- the program's controller