public class DropperTool extends Tool
Modifier and Type | Field and Description |
---|---|
private Paint |
paint
The main class of the program
|
Constructor and Description |
---|
DropperTool(javafx.scene.control.Button button,
javafx.scene.control.CheckMenuItem menuItem,
Paint paint)
Create a DropperTool
|
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 Paint paint
public DropperTool(javafx.scene.control.Button button, javafx.scene.control.CheckMenuItem menuItem, Paint paint)
button
- the tool button corresponding to this toolmenuItem
- the menu item corresponding to this toolpaint
- the main class of the programpublic 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