Package com.inductiveautomation.rm.tool
Class AbstractIgnitionRMTool<T extends RMParentShape>
java.lang.Object
com.inductiveautomation.snap.ui.UIOwner<SwingEvent,JComponent>
 
com.inductiveautomation.snap.swing.SwingOwner
com.inductiveautomation.rm.tool.RMTool<T>
com.inductiveautomation.rm.tool.AbstractIgnitionRMTool<T>
- Direct Known Subclasses:
- GenericInstantiationTool
Author: Perry Arellano-Jones
 Year: 12May2015
 
This 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 SummaryNested classes/interfaces inherited from class com.inductiveautomation.rm.tool.RMToolRMTool.RMShapeHandle
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected RMEditorprotected com.google.common.eventbus.EventBusprotected doubleprotected RMParentShapestatic final Stringprotected doubleprotected doubleprotected doubleFields inherited from class com.inductiveautomation.rm.tool.RMToolHandleE, HandleN, HandleNE, HandleNW, HandleS, HandleSE, HandleSW, HandleW, HandleWidth, SPLIT_RESETFields 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 SummaryConstructorsConstructorDescriptionAbstractIgnitionRMTool(RMEditor currentEditor, com.google.common.eventbus.EventBus eventBus) 
- 
Method SummaryModifier and TypeMethodDescriptionabstract RMShapecreateShapeTool(RMEditor editor, String keyPath, double x, double y, double width, double height) voidmouseDragged(MouseEvent anEvent) Event handling for shape creation, collect the location of the drag to size the new toolvoidmousePressed(MouseEvent anEvent) Event handling for shape creation.voidmouseReleased(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, willLoseSuperSelectionInEditorMethods inherited from class com.inductiveautomation.snap.swing.SwingOwneraddKeyActionEvent, createTimer, createUI, createWindow, getNode, getNode, getNodeHelper, getTimer, getTimer, getUI, getWindow, isEventThread, isWindowVisible, requestFocus, requestFocusImpl, runLater, sendEvent, setWindowVisibleMethods 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 Details- 
TOOL_USED- See Also:
 
- 
xprotected double x
- 
yprotected double y
- 
widthprotected double width
- 
heightprotected double height
- 
currentEditor
- 
eventBusprotected com.google.common.eventbus.EventBus eventBus
- 
parent
 
- 
- 
Constructor Details- 
AbstractIgnitionRMTool
 
- 
- 
Method Details- 
createShapeTool
- 
mousePressedDescription copied from class:RMToolEvent handling for shape creation.- Overrides:
- mousePressedin class- RMTool<T extends RMParentShape>
 
- 
mouseDraggedEvent handling for shape creation, collect the location of the drag to size the new tool- Overrides:
- mouseDraggedin class- RMTool<T extends RMParentShape>
 
- 
mouseReleasedOn 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>
 
 
-