Package com.inductiveautomation.rm.tool
Class AbstractIgnitionRMTool<T extends RMParentShape>
- java.lang.Object
- 
- com.inductiveautomation.snap.ui.UIOwner<SwingEvent,javax.swing.JComponent>
- 
- com.inductiveautomation.snap.swing.SwingOwner
- 
- com.inductiveautomation.rm.tool.RMTool<T>
- 
- com.inductiveautomation.rm.tool.AbstractIgnitionRMTool<T>
 
 
 
 
- 
- Direct Known Subclasses:
- GenericInstantiationTool
 
 public abstract class AbstractIgnitionRMTool<T extends RMParentShape> extends RMTool<T> Author: Perry Arellano-Jones Year: 12May2015This class provides the base for any RMTool class that we want to allow drag-to-size RMShape creation for. To add a new tool, simply extend this class and implement createShapeTool to create a new instance of the RMTool you'd like to create. Note that some RMTools do not have native methods to create an Shape at an arbitrary location/size, so a new constructor may be required. 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class com.inductiveautomation.rm.tool.RMToolRMTool.RMShapeHandle
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected RMEditorcurrentEditorprotected com.google.common.eventbus.EventBuseventBusprotected doubleheightprotected RMParentShapeparentstatic java.lang.StringTOOL_USEDprotected doublewidthprotected doublexprotected doubley- 
Fields inherited from class com.inductiveautomation.rm.tool.RMToolHandleE, HandleN, HandleNE, HandleNW, HandleS, HandleSE, HandleSW, HandleW, HandleWidth, SPLIT_RESET
 - 
Fields inherited from class com.inductiveautomation.snap.ui.UIOwnerDragDrop, DragEnter, DragEvents, DragExit, DragOver, KeyEvents, KeyFinished, KeyPressed, KeyReleased, KeyTyped, MouseClicked, MouseDragged, MouseEntered, MouseEvents, MouseExited, MouseFinished, MouseMoved, MousePressed, MouseReleased
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractIgnitionRMTool(RMEditor currentEditor, com.google.common.eventbus.EventBus eventBus)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract RMShapecreateShapeTool(RMEditor editor, java.lang.String keyPath, double x, double y, double width, double height)voidmouseDragged(java.awt.event.MouseEvent anEvent)Event handling for shape creation, collect the location of the drag to size the new toolvoidmousePressed(java.awt.event.MouseEvent anEvent)Event handling for shape creation.voidmouseReleased(java.awt.event.MouseEvent anEvent)On release, we want to get rid of the rectangle and create a new Tool in its place, then notify the palette the tool was used to turn off the button toggle.- 
Methods inherited from class com.inductiveautomation.rm.tool.RMToolacceptsDrag, activateTool, attachEventBus, createUI, deactivateTool, didBecomeSuperSelectedShapeInEditor, dragEnter, dragExit, dragOver, drop, dropClass, dropColor, dropDragKey, dropFiles, dropString, flavorForClass, flushChanges, getAcceptsChildren, getBoundsSuperSelected, getDatasetEntity, getDragDisplayBounds, getEditor, getEditorPane, getFont, getFontDeep, getGalleryClone, getHandleAtPoint, getHandleCount, getHandleCursor, getHandleOpposing, getHandlePoint, getHandleRect, getIcon, getIcon, getPointsFromUnits, getSelectedShape, getSelectedShapes, getSelectTool, getShapeClass, getShapeFillInspector, getShapeHandleAtPoint, getTool, getTool, getToolTipText, getUnitsFromPoints, getWindowTitle, isSelected, isSuperSelectable, isSuperSelected, isUngroupable, mouseDragged, mouseMoved, mouseMoved, mousePressed, mousePressedSelection, mouseReleased, moveShapeHandle, newInstance, paintShapeHandles, paintTool, processKeyEvent, reactivateTool, setFont, setFontBold, setFontBoldDeep, setFontFamily, setFontFamilyDeep, setFontItalic, setFontItalicDeep, setFontName, setFontNameDeep, setFontSize, setFontSizeDeep, willLoseSuperSelectionInEditor
 - 
Methods inherited from class com.inductiveautomation.snap.swing.SwingOwneraddKeyActionEvent, createTimer, createUI, createWindow, getNode, getNode, getNodeHelper, getTimer, getTimer, getUI, getWindow, isEventThread, isWindowVisible, requestFocus, requestFocusImpl, runLater, sendEvent, setWindowVisible
 - 
Methods inherited from class com.inductiveautomation.snap.ui.UIOwneraddNodeBinding, disableEvents, enableEvents, getBindingModelValue, getBindingNodeValue, getConversionMap, getConversionMapKey, getConversionMaps, getConversionMapValue, getFirstFocus, getModelValue, getNode, getNodeAction, getNodeBoolValue, getNodeFloatValue, getNodeIntValue, getNodeItemDisplayKey, getNodeItems, getNodeSelectedIndex, getNodeSelectedItem, getNodeStringValue, getNodeText, getNodeValue, getUI, getUIHpr, initUI, initUI, isNodeEnabled, isNodeValueAdjusting, isSendEventDisabled, isUISet, processResetUI, processRespondUI, resetLater, resetNodeBindings, resetUI, respondUI, runLaterDelayed, runLaterOnce, sendEvent, sendNodeAction, setBindingModelValue, setBindingNodeValue, setFirstFocus, setModelValue, setNodeAction, setNodeEnabled, setNodeItemDisplayKey, setNodeItems, setNodeItems, setNodeSelectedIndex, setNodeSelectedItem, setNodeText, setNodeValue, setSendEventDisabled
 
- 
 
- 
- 
- 
Field Detail- 
TOOL_USEDpublic static final java.lang.String TOOL_USED - See Also:
- Constant Field Values
 
 - 
xprotected double x 
 - 
yprotected double y 
 - 
widthprotected double width 
 - 
heightprotected double height 
 - 
currentEditorprotected RMEditor currentEditor 
 - 
eventBusprotected com.google.common.eventbus.EventBus eventBus 
 - 
parentprotected RMParentShape parent 
 
- 
 - 
Constructor Detail- 
AbstractIgnitionRMToolpublic AbstractIgnitionRMTool(RMEditor currentEditor, com.google.common.eventbus.EventBus eventBus) 
 
- 
 - 
Method Detail- 
createShapeToolpublic abstract RMShape createShapeTool(RMEditor editor, java.lang.String keyPath, double x, double y, double width, double height) 
 - 
mousePressedpublic void mousePressed(java.awt.event.MouseEvent anEvent) Description copied from class:RMToolEvent handling for shape creation.- Overrides:
- mousePressedin class- RMTool<T extends RMParentShape>
 
 - 
mouseDraggedpublic void mouseDragged(java.awt.event.MouseEvent anEvent) Event handling for shape creation, collect the location of the drag to size the new tool- Overrides:
- mouseDraggedin class- RMTool<T extends RMParentShape>
 
 - 
mouseReleasedpublic void mouseReleased(java.awt.event.MouseEvent anEvent) On release, we want to get rid of the rectangle and create a new Tool in its place, then notify the palette the tool was used to turn off the button toggle.- Overrides:
- mouseReleasedin class- RMTool<T extends RMParentShape>
 
 
- 
 
-