Package com.inductiveautomation.rm.tool
Class RMTextShapeTool<T extends RMTextShape>
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.RMTextShapeTool<T>
- Direct Known Subclasses:
- RMCrossTabCellTool
This class provides Swing UI editing for text shapes.
- 
Nested Class SummaryNested classes/interfaces inherited from class com.inductiveautomation.rm.tool.RMToolRMTool.RMShapeHandle
- 
Field SummaryFields 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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanacceptsDrag(T aShape, DropTargetDragEvent anEvent) Overrides Tool implementation to accept KeysPanel drags.voidOverrides standard tool method to deselect any currently editing text.static voidconvertToText(RMShape aShape, String aString) Converts a shape to a text shape.voiddidBecomeSuperSelectedShapeInEditor(RMShape aShape, RMEditor anEditor) Editor method - installs this text in RMEditor's text editor.voiddrop(T aShape, DropTargetDropEvent anEvent) Override normal implementation to handle KeysPanel drop.intgetHandleCount(T aText) Editor method - returns handle count.getHandleRect(T aTextShape, int handle, boolean isSuperSelected) Editor method - returns handle rect in editor coords.Returns the shape class that this tool edits.getToolTipText(T aTextShape, MouseEvent anEvent) Overrides tool tooltip method to return text string if some chars aren't visible.Returns the name of this tool to be displayed by inspector.protected voidinitUI()Initialize UI panel.booleanReturns whether to paint text link indicator.voidmouseDragged(MouseEvent anEvent) Handles mouse dragged for tool.voidmouseDragged(T aTextShape, MouseEvent anEvent) Event handling for shape editing (just forwards to text editor).voidmouseMoved(MouseEvent anEvent) Event handling - overridden to install text cursor.voidmousePressed(MouseEvent anEvent) Handles mouse pressed for text tool.voidmousePressed(T aTextShape, MouseEvent anEvent) Event handling for shape editing (just forwards to text editor).booleanmousePressedSelection(MouseEvent anEvent) Event hook during selection.voidEvent handling for text tool mouse loop.voidmouseReleased(T aTextShape, MouseEvent anEvent) Event handling for shape editing (just forwards to text editor).voidmoveShapeHandle(T aShape, int aHandle, RMPoint toPoint) Moves the handle at the given index to the given point.voidpaintShapeHandles(T aTextShape, Graphics2D g, boolean isSuperSelected) Paints selected shape indicator, like handles (and maybe a text linking indicator).voidpaintTextLinkIndicator(RMTextShape aText, Graphics2D g) Paints the text link indicator.voidprocessKeyEvent(T aTextShape, KeyEvent anEvent) Key event handling for super selected text.voidresetUI()Refreshes UI controls from currently selected text shape.voidrespondUI(SwingEvent anEvent) Handles changes from UI panel controls.voidwillLoseSuperSelectionInEditor(RMShape aShape, RMEditor anEditor) Editor method - uninstalls this text from RMEditor's text editor and removes new text if empty.Methods inherited from class com.inductiveautomation.rm.tool.RMToolattachEventBus, createUI, deactivateTool, dragEnter, dragExit, dragOver, dropClass, dropColor, dropDragKey, dropFiles, dropString, flavorForClass, flushChanges, getAcceptsChildren, getBoundsSuperSelected, getDatasetEntity, getDragDisplayBounds, getEditor, getEditorPane, getFont, getFontDeep, getGalleryClone, getHandleAtPoint, getHandleCursor, getHandleOpposing, getHandlePoint, getIcon, getIcon, getPointsFromUnits, getSelectedShape, getSelectedShapes, getSelectTool, getShapeFillInspector, getShapeHandleAtPoint, getTool, getTool, getUnitsFromPoints, isSelected, isSuperSelectable, isSuperSelected, isUngroupable, mouseMoved, newInstance, paintTool, reactivateTool, setFont, setFontBold, setFontBoldDeep, setFontFamily, setFontFamilyDeep, setFontItalic, setFontItalicDeep, setFontName, setFontNameDeep, setFontSize, setFontSizeDeepMethods 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, isNodeEnabled, isNodeValueAdjusting, isSendEventDisabled, isUISet, processResetUI, processRespondUI, resetLater, resetNodeBindings, runLaterDelayed, runLaterOnce, sendEvent, sendNodeAction, setBindingModelValue, setBindingNodeValue, setFirstFocus, setModelValue, setNodeAction, setNodeEnabled, setNodeItemDisplayKey, setNodeItems, setNodeItems, setNodeSelectedIndex, setNodeSelectedItem, setNodeText, setNodeValue, setSendEventDisabled
- 
Constructor Details- 
RMTextShapeToolpublic RMTextShapeTool()
- 
RMTextShapeToolpublic RMTextShapeTool(com.google.common.eventbus.EventBus ebus) 
 
- 
- 
Method Details- 
initUIprotected void initUI()Initialize UI panel.- Overrides:
- initUIin class- UIOwner<SwingEvent,- JComponent> 
 
- 
resetUIpublic void resetUI()Refreshes UI controls from currently selected text shape.- Overrides:
- resetUIin class- UIOwner<SwingEvent,- JComponent> 
 
- 
respondUIHandles changes from UI panel controls.- Overrides:
- respondUIin class- UIOwner<SwingEvent,- JComponent> 
 
- 
activateToolpublic void activateTool()Overrides standard tool method to deselect any currently editing text.- Overrides:
- activateToolin class- RMTool<T extends RMTextShape>
 
- 
mouseMovedEvent handling - overridden to install text cursor.- Overrides:
- mouseMovedin class- RMTool<T extends RMTextShape>
 
- 
mousePressedHandles mouse pressed for text tool. Special support to super select any text hit by tool mouse pressed.- Overrides:
- mousePressedin class- RMTool<T extends RMTextShape>
 
- 
mouseDraggedHandles mouse dragged for tool. If user doesn't really drag, then default text box should align the base line of the text about the pressed point. If they do really drag, then text box should be the rect they drag out.- Overrides:
- mouseDraggedin class- RMTool<T extends RMTextShape>
 
- 
mouseReleasedEvent handling for text tool mouse loop.- Overrides:
- mouseReleasedin class- RMTool<T extends RMTextShape>
 
- 
mousePressedEvent handling for shape editing (just forwards to text editor).- Overrides:
- mousePressedin class- RMTool<T extends RMTextShape>
 
- 
mouseDraggedEvent handling for shape editing (just forwards to text editor).- Overrides:
- mouseDraggedin class- RMTool<T extends RMTextShape>
 
- 
mouseReleasedEvent handling for shape editing (just forwards to text editor).- Overrides:
- mouseReleasedin class- RMTool<T extends RMTextShape>
 
- 
processKeyEventKey event handling for super selected text.- Overrides:
- processKeyEventin class- RMTool<T extends RMTextShape>
 
- 
didBecomeSuperSelectedShapeInEditorEditor method - installs this text in RMEditor's text editor.- Overrides:
- didBecomeSuperSelectedShapeInEditorin class- RMTool<T extends RMTextShape>
 
- 
mousePressedSelectionEvent hook during selection.- Overrides:
- mousePressedSelectionin class- RMTool<T extends RMTextShape>
 
- 
moveShapeHandleMoves the handle at the given index to the given point.- Overrides:
- moveShapeHandlein class- RMTool<T extends RMTextShape>
 
- 
getToolTipTextOverrides tool tooltip method to return text string if some chars aren't visible.- Overrides:
- getToolTipTextin class- RMTool<T extends RMTextShape>
 
- 
paintShapeHandlesPaints selected shape indicator, like handles (and maybe a text linking indicator).- Overrides:
- paintShapeHandlesin class- RMTool<T extends RMTextShape>
 
- 
isPaintingTextLinkIndicatorReturns whether to paint text link indicator.
- 
paintTextLinkIndicatorPaints the text link indicator.
- 
getHandleCountEditor method - returns handle count.- Overrides:
- getHandleCountin class- RMTool<T extends RMTextShape>
 
- 
getHandleRectEditor method - returns handle rect in editor coords.- Overrides:
- getHandleRectin class- RMTool<T extends RMTextShape>
 
- 
willLoseSuperSelectionInEditorEditor method - uninstalls this text from RMEditor's text editor and removes new text if empty.- Overrides:
- willLoseSuperSelectionInEditorin class- RMTool<T extends RMTextShape>
 
- 
acceptsDragOverrides Tool implementation to accept KeysPanel drags.- Overrides:
- acceptsDragin class- RMTool<T extends RMTextShape>
 
- 
dropOverride normal implementation to handle KeysPanel drop.- Overrides:
- dropin class- RMTool<T extends RMTextShape>
 
- 
getShapeClassReturns the shape class that this tool edits.- Overrides:
- getShapeClassin class- RMTool<T extends RMTextShape>
 
- 
getWindowTitleReturns the name of this tool to be displayed by inspector.- Overrides:
- getWindowTitlein class- RMTool<T extends RMTextShape>
 
- 
convertToTextConverts a shape to a text shape.
 
-