Class AbstractShapeTool
- java.lang.Object
- 
- com.inductiveautomation.ignition.designer.designable.tools.AbstractDesignTool
- 
- com.inductiveautomation.factorypmi.designer.workspace.tools.AbstractShapeTool
 
 
- 
- All Implemented Interfaces:
- IDesignTool
 - Direct Known Subclasses:
- AbstractRectangularShapeTool,- ArrowTool,- PathEditorTool,- PolygonTool
 
 public abstract class AbstractShapeTool extends AbstractDesignTool 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classAbstractShapeTool.AbstractShapeControls- 
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.designer.designable.IDesignToolIDesignTool.ToolbarInitializer
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected PathBasedVisionShapeaddingShapeprotected java.awt.Cursorcursorprotected javax.swing.JComponentdropContainer- 
Fields inherited from class com.inductiveautomation.ignition.designer.designable.tools.AbstractDesignToolactionMap, changeSupport, designable, HANDLES_PROPERTY, inputMap, interactionLayer, panel, workspace
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractShapeTool()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.awt.CursorcreateCursor()protected voiddisableToolbar()java.awt.CursorgetCursor(java.awt.Point point, int inputEventMask)The cursor to use given the current event mask, which can be used to detect what keys are being held downprotected abstract java.lang.Class<? extends ShapeDelegate>getDelegateType()protected abstract java.lang.StringgetNewShapeName()protected PathBasedVisionShapegetShape()protected booleanhandlesShape(ShapeDelegate shape)voidinstall(DesignPanel panel)Installs the tool for the given panel.booleanisRelevantFor(javax.swing.JComponent component)ISelectionControlnewSelectionControl()Gives the tool a chance to create a new selection control object to install handles on the selection.protected abstract ISelectionControlnewShapeControl()protected abstract ShapeDelegatenewShapeDelegate(java.awt.geom.Rectangle2D rect)voidonClick(java.awt.Point p, int modifiers)Called when the user clicks in the design space.voidonDrag(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Called while the user is dragging.voidonDragEnd(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Called when the user stops dragging.voidonDragStart(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Called when the user start's dragging while this tool is active.voidonPress(java.awt.Point move, int modifiers)Called when the user presses the mouse in the design space.protected static java.lang.Stringtt(java.lang.String key)Shortcut for:voiduninstall()Uninstalls the tool.protected voidupdateToolbar(PathBasedVisionShape shape)protected voidupdateToolbar(java.util.List<javax.swing.JComponent> selection)protected booleanvalidSelection(java.util.List<javax.swing.JComponent> selection)- 
Methods inherited from class com.inductiveautomation.ignition.designer.designable.tools.AbstractDesignTooladdAction, addKeyBinding, addKeyBinding, addPropertyChangeListener, createCursor, findDropContainer, getAction, getDragHighlight, getOffsettingBounds, getOriginalBounds, getStatusBarText, getToolbarInitializer, isInstalled, itemMovable, movable, newToolbarSpinner, newToolbarSpinner, newToolbarSpinner, onClickAlterSelection, onDoubleClick, onKeyEvent, onMove, onPopupTrigger, onRelease, onRightClickSwitchToSelectionTool, removePropertyChangeListener
 
- 
 
- 
- 
- 
Field Detail- 
dropContainerprotected javax.swing.JComponent dropContainer 
 - 
addingShapeprotected PathBasedVisionShape addingShape 
 - 
cursorprotected java.awt.Cursor cursor 
 
- 
 - 
Method Detail- 
ttprotected static java.lang.String tt(java.lang.String key) Shortcut for:"<html>" + BundleUtil.get().getString("fpmi." + key);
 - 
installpublic void install(DesignPanel panel) Description copied from interface:IDesignToolInstalls the tool for the given panel. Tools are built to be re-used by repeatedly being installed and then uninstalled as tools get switched out.- Specified by:
- installin interface- IDesignTool
- Overrides:
- installin class- AbstractDesignTool
 
 - 
uninstallpublic void uninstall() Description copied from interface:IDesignToolUninstalls the tool.- Specified by:
- uninstallin interface- IDesignTool
- Overrides:
- uninstallin class- AbstractDesignTool
 
 - 
isRelevantForpublic boolean isRelevantFor(javax.swing.JComponent component) - Overrides:
- isRelevantForin class- AbstractDesignTool
 
 - 
getShapeprotected PathBasedVisionShape getShape() 
 - 
updateToolbarprotected void updateToolbar(java.util.List<javax.swing.JComponent> selection) 
 - 
updateToolbarprotected void updateToolbar(PathBasedVisionShape shape) 
 - 
disableToolbarprotected void disableToolbar() 
 - 
createCursorprotected abstract java.awt.Cursor createCursor() 
 - 
onPresspublic void onPress(java.awt.Point move, int modifiers)Description copied from interface:IDesignToolCalled when the user presses the mouse in the design space.- Specified by:
- onPressin interface- IDesignTool
- Overrides:
- onPressin class- AbstractDesignTool
- Parameters:
- move- The point at which they pressed. Relative to the designable container.
- modifiers- A bitmask of modifiers. Comes from- InputEvent.getModifiersEx()
 
 - 
onClickpublic void onClick(java.awt.Point p, int modifiers)Description copied from interface:IDesignToolCalled when the user clicks in the design space.- Specified by:
- onClickin interface- IDesignTool
- Overrides:
- onClickin class- AbstractDesignTool
- Parameters:
- p- The point at which they clicked. Relative to the designable container.
- modifiers- A bitmask of modifiers. Comes from- InputEvent.getModifiersEx()
 
 - 
getCursorpublic java.awt.Cursor getCursor(java.awt.Point point, int inputEventMask)Description copied from interface:IDesignToolThe cursor to use given the current event mask, which can be used to detect what keys are being held down- Specified by:
- getCursorin interface- IDesignTool
- Overrides:
- getCursorin class- AbstractDesignTool
 
 - 
onDragStartpublic void onDragStart(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Description copied from class:AbstractDesignToolCalled when the user start's dragging while this tool is active. All coordinates are relative to the interaction panel and are in zoomed space.- Specified by:
- onDragStartin interface- IDesignTool
- Overrides:
- onDragStartin class- AbstractDesignTool
 
 - 
onDragpublic void onDrag(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Description copied from class:AbstractDesignToolCalled while the user is dragging. All coordinates are relative to the interaction panel and are in zoomed space.- Specified by:
- onDragin interface- IDesignTool
- Overrides:
- onDragin class- AbstractDesignTool
 
 - 
onDragEndpublic void onDragEnd(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)Description copied from class:AbstractDesignToolCalled when the user stops dragging. All coordinates are relative to the interaction panel and are in zoomed space.- Specified by:
- onDragEndin interface- IDesignTool
- Overrides:
- onDragEndin class- AbstractDesignTool
 
 - 
newSelectionControlpublic ISelectionControl newSelectionControl() Description copied from interface:IDesignToolGives the tool a chance to create a new selection control object to install handles on the selection. Called on the active tool when the selection changes or after a tool is first installed.- Specified by:
- newSelectionControlin interface- IDesignTool
- Overrides:
- newSelectionControlin class- AbstractDesignTool
 
 - 
validSelectionprotected boolean validSelection(java.util.List<javax.swing.JComponent> selection) 
 - 
handlesShapeprotected boolean handlesShape(ShapeDelegate shape) 
 - 
newShapeControlprotected abstract ISelectionControl newShapeControl() 
 - 
getDelegateTypeprotected abstract java.lang.Class<? extends ShapeDelegate> getDelegateType() 
 - 
newShapeDelegateprotected abstract ShapeDelegate newShapeDelegate(java.awt.geom.Rectangle2D rect) 
 - 
getNewShapeNameprotected abstract java.lang.String getNewShapeName() 
 
- 
 
-