Class AbstractShapeHandle
java.lang.Object
com.inductiveautomation.ignition.designer.designable.controls.AbstractShapeHandle
- All Implemented Interfaces:
- IHandle
- Direct Known Subclasses:
- AbstractShapeTool.AbstractShapeControls.AbstractShapeManipulationHandle,- RotationControls.AbstractRotationHandle,- RotationControls.RotationAnchorHandle,- ScaleControls.AbstractResizeHandle
This class is a useful base class for most handle implementations. It knows how to represent itself with a shape
 provided by the subclass. It also has all of 
IHandle's methods stubbed out so a subclass can only implement
 what it is interested in.- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetBounds(DesignPanel panel) Return the bounds of this handle, in 2d (zoomed) space.getStatusBarText(int inputMask) Called on mouseover and during drag to get the status bar text for the handle.protected ShapeCalled to create a new draw shape.voidonClick(int inputMask) The mouse was clicked within the handle's bounds.voidonDrag(double dX, double dY, int inputMask) Called while the handle is being dragged.voidonDragEnd(double dX, double dY, int inputMask) The drag event is complete (mouse has been released).voidonDragStart(double dX, double dY, int inputMask) The handle has started to be dragged.voidpaintHandle(DesignPanel panel, Graphics2D g, ShapePaint paint) protected abstract voidposition(Point2D.Double location) Updates the argument location with the correct position of this handle's anchor point.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.inductiveautomation.ignition.designer.designable.IHandlepaintHandle
- 
Field Details- 
drawShapeThe shape that represents this IHandle. Initialized innewDrawShape()
 
- 
- 
Constructor Details- 
AbstractShapeHandleprotected AbstractShapeHandle()
 
- 
- 
Method Details- 
paintHandle
- 
newDrawShapeCalled to create a new draw shape. Expectation is that a subclass will override this to provide a meaningful shape. Anchor point is at (0,0). Default shape is a 10x10 square anchored in the center.
- 
getBoundsDescription copied from interface:IHandleReturn the bounds of this handle, in 2d (zoomed) space.
- 
positionUpdates the argument location with the correct position of this handle's anchor point. Must be in logical (unzoomed) coordinates.
- 
getStatusBarTextDescription copied from interface:IHandleCalled on mouseover and during drag to get the status bar text for the handle.- Specified by:
- getStatusBarTextin interface- IHandle
 
- 
onClickpublic void onClick(int inputMask) Description copied from interface:IHandleThe mouse was clicked within the handle's bounds.
- 
onDragpublic void onDrag(double dX, double dY, int inputMask) Description copied from interface:IHandleCalled while the handle is being dragged.- Specified by:
- onDragin interface- IHandle
- Parameters:
- dX- The distance along the horizontal axis away from the drag starting point. (Unzoomed, logical)
- dY- The distance along the vertical axis away from the drag starting point. (Unzoomed, logical)
- inputMask- The extended modifiers from the underlying mouse drag (see- MouseEvent.getModifiersEx().)
 
- 
onDragStartpublic void onDragStart(double dX, double dY, int inputMask) Description copied from interface:IHandleThe handle has started to be dragged.- Specified by:
- onDragStartin interface- IHandle
- Parameters:
- dX- The distance along the horizontal axis away from the drag starting point. (Unzoomed, logical)
- dY- The distance along the vertical axis away from the drag starting point. (Unzoomed, logical)
- inputMask- The extended modifiers from the underlying mouse drag (see- MouseEvent.getModifiersEx().)
 
- 
onDragEndpublic void onDragEnd(double dX, double dY, int inputMask) Description copied from interface:IHandleThe drag event is complete (mouse has been released).- Specified by:
- onDragEndin interface- IHandle
- Parameters:
- dX- The distance along the horizontal axis away from the drag starting point. (Unzoomed, logical)
- dY- The distance along the vertical axis away from the drag starting point. (Unzoomed, logical)
- inputMask- The extended modifiers from the underlying mouse drag (see- MouseEvent.getModifiersEx().)
 
 
-