Package mgui.interfaces.tools.shapes
Class ToolCreatePolygon2D
java.lang.Object
mgui.interfaces.tools.graphics.Tool2D
mgui.interfaces.tools.shapes.ToolCreatePolygon2D
- All Implemented Interfaces:
java.lang.Cloneable
,PopupMenuObject
,Tool
,ToolInputListener
,IconObject
- Direct Known Subclasses:
ToolRuler2D
,ToolTestInternalPoint2D
public class ToolCreatePolygon2D extends Tool2D
Allows the user to creates a Polygon2D shape.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description boolean
close
protected java.awt.Point
lastPt
protected org.jogamp.vecmath.Point2f
nextPt
protected java.awt.Point
screenStartPt
protected org.jogamp.vecmath.Point2f
startPt
protected Polygon2DInt
thisPoly
Fields inherited from class mgui.interfaces.tools.graphics.Tool2D
icon, is_active, isImmediate, last_tool, listeners, name, targetPanel, targetShape, toolPhase
-
Constructor Summary
Constructors Constructor Description ToolCreatePolygon2D()
ToolCreatePolygon2D(boolean close)
-
Method Summary
Modifier and Type Method Description java.lang.Object
clone()
void
handleToolEvent(ToolInputEvent e)
Handle this tool eventprotected void
setIcon()
Methods inherited from class mgui.interfaces.tools.graphics.Tool2D
activate, addListener, deactivate, fireListeners, fireListeners, getName, getObjectIcon, getPopupMenu, getPopupMenu, getPreviousTool, handlePopupEvent, isExclusive, isImmediate, removeListener, setTargetPanel, setTargetShape, showPopupMenu
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
thisPoly
-
startPt
protected org.jogamp.vecmath.Point2f startPt -
nextPt
protected org.jogamp.vecmath.Point2f nextPt -
lastPt
protected java.awt.Point lastPt -
screenStartPt
protected java.awt.Point screenStartPt -
close
public boolean close
-
-
Constructor Details
-
ToolCreatePolygon2D
public ToolCreatePolygon2D() -
ToolCreatePolygon2D
public ToolCreatePolygon2D(boolean close)
-
-
Method Details
-
handleToolEvent
Description copied from interface:ToolInputListener
Handle this tool event- Specified by:
handleToolEvent
in interfaceToolInputListener
- Specified by:
handleToolEvent
in classTool2D
-
setIcon
protected void setIcon() -
clone
public java.lang.Object clone()
-