CH.ifa.draw.contrib
Class PolygonTool
- java.lang.Object
-
- CH.ifa.draw.standard.AbstractTool
-
- CH.ifa.draw.contrib.PolygonTool
-
- All Implemented Interfaces:
- Tool
public class PolygonTool extends AbstractTool
-
-
Constructor Summary
Constructors Constructor and Description PolygonTool(DrawingView view)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidactivate()Activates the tool for the given view.voiddeactivate()Deactivates the tool.voidmouseDown(java.awt.event.MouseEvent e, int x, int y)Handles mouse down events in the drawing view.voidmouseDrag(java.awt.event.MouseEvent e, int x, int y)Handles mouse drag events in the drawing view.voidmouseMove(java.awt.event.MouseEvent e, int x, int y)Handles mouse moves (if the mouse button is up).voidmouseUp(java.awt.event.MouseEvent e, int x, int y)Handles mouse up in the drawing view.-
Methods inherited from class CH.ifa.draw.standard.AbstractTool
drawing, editor, keyDown, view
-
-
-
-
Constructor Detail
-
PolygonTool
public PolygonTool(DrawingView view)
-
-
Method Detail
-
activate
public void activate()
Description copied from class:AbstractToolActivates the tool for the given view. This method is called whenever the user switches to this tool. Use this method to reinitialize a tool.- Specified by:
activatein interfaceTool- Overrides:
activatein classAbstractTool
-
deactivate
public void deactivate()
Description copied from class:AbstractToolDeactivates the tool. This method is called whenever the user switches to another tool. Use this method to do some clean-up when the tool is switched. Subclassers should always call super.deactivate.- Specified by:
deactivatein interfaceTool- Overrides:
deactivatein classAbstractTool
-
mouseDown
public void mouseDown(java.awt.event.MouseEvent e, int x, int y)Description copied from class:AbstractToolHandles mouse down events in the drawing view.- Specified by:
mouseDownin interfaceTool- Overrides:
mouseDownin classAbstractTool
-
mouseMove
public void mouseMove(java.awt.event.MouseEvent e, int x, int y)Description copied from class:AbstractToolHandles mouse moves (if the mouse button is up).- Specified by:
mouseMovein interfaceTool- Overrides:
mouseMovein classAbstractTool
-
mouseDrag
public void mouseDrag(java.awt.event.MouseEvent e, int x, int y)Description copied from class:AbstractToolHandles mouse drag events in the drawing view.- Specified by:
mouseDragin interfaceTool- Overrides:
mouseDragin classAbstractTool
-
mouseUp
public void mouseUp(java.awt.event.MouseEvent e, int x, int y)Description copied from class:AbstractToolHandles mouse up in the drawing view.- Specified by:
mouseUpin interfaceTool- Overrides:
mouseUpin classAbstractTool
-
-
DataMelt 3.0 © DataMelt by jWork.ORG