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
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.inductiveautomation.ignition.designer.designable.IDesignTool
IDesignTool.ToolbarInitializer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PathBasedVisionShape
protected Cursor
protected JComponent
Fields inherited from class com.inductiveautomation.ignition.designer.designable.tools.AbstractDesignTool
actionMap, changeSupport, designable, HANDLES_PROPERTY, inputMap, interactionLayer, panel, workspace
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Cursor
protected void
The cursor to use given the current event mask, which can be used to detect what keys are being held downprotected abstract Class<? extends ShapeDelegate>
protected abstract String
protected PathBasedVisionShape
getShape()
protected boolean
handlesShape
(ShapeDelegate shape) void
install
(DesignPanel panel) Installs the tool for the given panel.boolean
isRelevantFor
(JComponent component) Gives the tool a chance to create a new selection control object to install handles on the selection.protected abstract ISelectionControl
protected abstract ShapeDelegate
newShapeDelegate
(Rectangle2D rect) void
Called when the user clicks in the design space.void
Called while the user is dragging.void
Called when the user stops dragging.void
onDragStart
(Point startPoint, Point lastPoint, Rectangle r, int modifiers) Called when the user start's dragging while this tool is active.void
Called when the user presses the mouse in the design space.protected static String
Shortcut for:void
Uninstalls the tool.protected void
protected void
updateToolbar
(List<JComponent> selection) protected boolean
validSelection
(List<JComponent> selection) Methods inherited from class com.inductiveautomation.ignition.designer.designable.tools.AbstractDesignTool
addAction, 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 Details
-
dropContainer
-
addingShape
-
cursor
-
-
Constructor Details
-
AbstractShapeTool
public AbstractShapeTool()
-
-
Method Details
-
tt
Shortcut for:"<html>" + BundleUtil.get().getString("fpmi." + key);
-
install
Description copied from interface:IDesignTool
Installs 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:
install
in interfaceIDesignTool
- Overrides:
install
in classAbstractDesignTool
-
uninstall
public void uninstall()Description copied from interface:IDesignTool
Uninstalls the tool.- Specified by:
uninstall
in interfaceIDesignTool
- Overrides:
uninstall
in classAbstractDesignTool
-
isRelevantFor
- Overrides:
isRelevantFor
in classAbstractDesignTool
-
getShape
-
updateToolbar
-
updateToolbar
-
disableToolbar
protected void disableToolbar() -
createCursor
-
onPress
Description copied from interface:IDesignTool
Called when the user presses the mouse in the design space.- Specified by:
onPress
in interfaceIDesignTool
- Overrides:
onPress
in classAbstractDesignTool
- Parameters:
move
- The point at which they pressed. Relative to the designable container.modifiers
- A bitmask of modifiers. Comes fromInputEvent.getModifiersEx()
-
onClick
Description copied from interface:IDesignTool
Called when the user clicks in the design space.- Specified by:
onClick
in interfaceIDesignTool
- Overrides:
onClick
in classAbstractDesignTool
- Parameters:
p
- The point at which they clicked. Relative to the designable container.modifiers
- A bitmask of modifiers. Comes fromInputEvent.getModifiersEx()
-
getCursor
Description copied from interface:IDesignTool
The cursor to use given the current event mask, which can be used to detect what keys are being held down- Specified by:
getCursor
in interfaceIDesignTool
- Overrides:
getCursor
in classAbstractDesignTool
-
onDragStart
Description copied from class:AbstractDesignTool
Called 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:
onDragStart
in interfaceIDesignTool
- Overrides:
onDragStart
in classAbstractDesignTool
-
onDrag
Description copied from class:AbstractDesignTool
Called while the user is dragging. All coordinates are relative to the interaction panel and are in zoomed space.- Specified by:
onDrag
in interfaceIDesignTool
- Overrides:
onDrag
in classAbstractDesignTool
-
onDragEnd
Description copied from class:AbstractDesignTool
Called when the user stops dragging. All coordinates are relative to the interaction panel and are in zoomed space.- Specified by:
onDragEnd
in interfaceIDesignTool
- Overrides:
onDragEnd
in classAbstractDesignTool
-
newSelectionControl
Description copied from interface:IDesignTool
Gives 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:
newSelectionControl
in interfaceIDesignTool
- Overrides:
newSelectionControl
in classAbstractDesignTool
-
validSelection
-
handlesShape
-
newShapeControl
-
getDelegateType
-
newShapeDelegate
-
getNewShapeName
-