Class InstantiationTool
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.designable.tools.AbstractDesignTool
-
- com.inductiveautomation.factorypmi.designer.workspace.tools.InstantiationTool
-
- All Implemented Interfaces:
IDesignTool
public class InstantiationTool extends AbstractDesignTool
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.inductiveautomation.ignition.designer.designable.IDesignTool
IDesignTool.ToolbarInitializer
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.ignition.designer.designable.tools.AbstractDesignTool
actionMap, changeSupport, designable, HANDLES_PROPERTY, inputMap, interactionLayer, panel, workspace
-
-
Constructor Summary
Constructors Constructor Description InstantiationTool(VisionDesignerInterface vision, ComponentInstantiator item)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Cursor
getCursor(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 downIHighlight
getDragHighlight()
Called while dragging as an easy way for a tool to install a highlight while dragging.java.lang.String
getStatusBarText(java.util.List<javax.swing.JComponent> selection, java.awt.Point point, int inputMask)
Calculates the currently applicable status bar text for this toolboolean
isRelevantFor(javax.swing.JComponent component)
void
onClick(java.awt.Point point, int modifiers)
Called when the user clicks in the design space.void
onDrag(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)
Called while the user is dragging.void
onDragEnd(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle rectangle, int modifiers)
Called when the user stops dragging.void
onDragStart(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.void
onKeyEvent(java.awt.event.KeyEvent e, boolean pressed)
Delegates the key event using field AbstractDesignTool.inputMap field.void
onPress(java.awt.Point move, int modifiers)
Called when the user presses the mouse in the design space.void
removeTool()
-
Methods inherited from class com.inductiveautomation.ignition.designer.designable.tools.AbstractDesignTool
addAction, addKeyBinding, addKeyBinding, addPropertyChangeListener, createCursor, findDropContainer, getAction, getOffsettingBounds, getOriginalBounds, getToolbarInitializer, install, isInstalled, itemMovable, movable, newSelectionControl, newToolbarSpinner, newToolbarSpinner, newToolbarSpinner, onClickAlterSelection, onDoubleClick, onMove, onPopupTrigger, onRelease, onRightClickSwitchToSelectionTool, removePropertyChangeListener, uninstall
-
-
-
-
Constructor Detail
-
InstantiationTool
public InstantiationTool(VisionDesignerInterface vision, ComponentInstantiator item)
-
-
Method Detail
-
getStatusBarText
public java.lang.String getStatusBarText(java.util.List<javax.swing.JComponent> selection, java.awt.Point point, int inputMask)
Description copied from interface:IDesignTool
Calculates the currently applicable status bar text for this tool- Specified by:
getStatusBarText
in interfaceIDesignTool
- Overrides:
getStatusBarText
in classAbstractDesignTool
-
isRelevantFor
public boolean isRelevantFor(javax.swing.JComponent component)
- Overrides:
isRelevantFor
in classAbstractDesignTool
-
getCursor
public java.awt.Cursor getCursor(java.awt.Point point, int inputEventMask)
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
-
onClick
public void onClick(java.awt.Point point, int modifiers)
Description copied from interface:IDesignTool
Called when the user clicks in the design space.- Specified by:
onClick
in interfaceIDesignTool
- Overrides:
onClick
in classAbstractDesignTool
- Parameters:
point
- The point at which they clicked. Relative to the designable container.modifiers
- A bitmask of modifiers. Comes fromInputEvent.getModifiersEx()
-
onDrag
public void onDrag(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)
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
-
onDragStart
public void onDragStart(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle r, int modifiers)
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
-
onDragEnd
public void onDragEnd(java.awt.Point startPoint, java.awt.Point lastPoint, java.awt.Rectangle rectangle, int modifiers)
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
-
onKeyEvent
public void onKeyEvent(java.awt.event.KeyEvent e, boolean pressed)
Description copied from class:AbstractDesignTool
Delegates the key event using field AbstractDesignTool.inputMap field. Add key bindings using theAbstractDesignTool.addKeyBinding(int, int, Object)
methods.- Specified by:
onKeyEvent
in interfaceIDesignTool
- Overrides:
onKeyEvent
in classAbstractDesignTool
-
onPress
public void onPress(java.awt.Point move, int modifiers)
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()
-
removeTool
public void removeTool()
-
getDragHighlight
public IHighlight getDragHighlight()
Description copied from interface:IDesignTool
Called while dragging as an easy way for a tool to install a highlight while dragging.- Specified by:
getDragHighlight
in interfaceIDesignTool
- Overrides:
getDragHighlight
in classAbstractDesignTool
-
-