public class RMTextShapeTool<T extends RMTextShape> extends RMTool<T>
RMTool.RMShapeHandle
HandleE, HandleN, HandleNE, HandleNW, HandleS, HandleSE, HandleSW, HandleW, HandleWidth, SPLIT_RESET
DragDrop, DragEnter, DragEvents, DragExit, DragOver, KeyEvents, KeyFinished, KeyPressed, KeyReleased, KeyTyped, MouseClicked, MouseDragged, MouseEntered, MouseEvents, MouseExited, MouseFinished, MouseMoved, MousePressed, MouseReleased
Constructor and Description |
---|
RMTextShapeTool() |
RMTextShapeTool(com.google.common.eventbus.EventBus ebus) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsDrag(T aShape,
java.awt.dnd.DropTargetDragEvent anEvent)
Overrides Tool implementation to accept KeysPanel drags.
|
void |
activateTool()
Overrides standard tool method to deselect any currently editing text.
|
static void |
convertToText(RMShape aShape,
java.lang.String aString)
Converts a shape to a text shape.
|
void |
didBecomeSuperSelectedShapeInEditor(RMShape aShape,
RMEditor anEditor)
Editor method - installs this text in RMEditor's text editor.
|
void |
drop(T aShape,
java.awt.dnd.DropTargetDropEvent anEvent)
Override normal implementation to handle KeysPanel drop.
|
int |
getHandleCount(T aText)
Editor method - returns handle count.
|
RMRect |
getHandleRect(T aTextShape,
int handle,
boolean isSuperSelected)
Editor method - returns handle rect in editor coords.
|
java.lang.Class |
getShapeClass()
Returns the shape class that this tool edits.
|
java.lang.String |
getToolTipText(T aTextShape,
java.awt.event.MouseEvent anEvent)
Overrides tool tooltip method to return text string if some chars aren't visible.
|
java.lang.String |
getWindowTitle()
Returns the name of this tool to be displayed by inspector.
|
protected void |
initUI()
Initialize UI panel.
|
boolean |
isPaintingTextLinkIndicator(RMTextShape aText)
Returns whether to paint text link indicator.
|
void |
mouseDragged(java.awt.event.MouseEvent anEvent)
Handles mouse dragged for tool.
|
void |
mouseDragged(T aTextShape,
java.awt.event.MouseEvent anEvent)
Event handling for shape editing (just forwards to text editor).
|
void |
mouseMoved(java.awt.event.MouseEvent anEvent)
Event handling - overridden to install text cursor.
|
void |
mousePressed(java.awt.event.MouseEvent anEvent)
Handles mouse pressed for text tool.
|
void |
mousePressed(T aTextShape,
java.awt.event.MouseEvent anEvent)
Event handling for shape editing (just forwards to text editor).
|
boolean |
mousePressedSelection(java.awt.event.MouseEvent anEvent)
Event hook during selection.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
Event handling for text tool mouse loop.
|
void |
mouseReleased(T aTextShape,
java.awt.event.MouseEvent anEvent)
Event handling for shape editing (just forwards to text editor).
|
void |
moveShapeHandle(T aShape,
int aHandle,
RMPoint toPoint)
Moves the handle at the given index to the given point.
|
void |
paintShapeHandles(T aTextShape,
java.awt.Graphics2D g,
boolean isSuperSelected)
Paints selected shape indicator, like handles (and maybe a text linking indicator).
|
void |
paintTextLinkIndicator(RMTextShape aText,
java.awt.Graphics2D g)
Paints the text link indicator.
|
void |
processKeyEvent(T aTextShape,
java.awt.event.KeyEvent anEvent)
Key event handling for super selected text.
|
void |
resetUI()
Refreshes UI controls from currently selected text shape.
|
void |
respondUI(SwingEvent anEvent)
Handles changes from UI panel controls.
|
void |
willLoseSuperSelectionInEditor(RMShape aShape,
RMEditor anEditor)
Editor method - uninstalls this text from RMEditor's text editor and removes new text if empty.
|
attachEventBus, 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, setFontSizeDeep
addKeyActionEvent, createTimer, createUI, createWindow, getNode, getNode, getNodeHelper, getTimer, getTimer, getUI, getWindow, isEventThread, isWindowVisible, requestFocus, requestFocusImpl, runLater, sendEvent, setWindowVisible
addNodeBinding, 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
public RMTextShapeTool()
public RMTextShapeTool(com.google.common.eventbus.EventBus ebus)
protected void initUI()
initUI
in class UIOwner<SwingEvent,javax.swing.JComponent>
public void resetUI()
resetUI
in class UIOwner<SwingEvent,javax.swing.JComponent>
public void respondUI(SwingEvent anEvent)
respondUI
in class UIOwner<SwingEvent,javax.swing.JComponent>
public void activateTool()
activateTool
in class RMTool<T extends RMTextShape>
public void mouseMoved(java.awt.event.MouseEvent anEvent)
mouseMoved
in class RMTool<T extends RMTextShape>
public void mousePressed(java.awt.event.MouseEvent anEvent)
mousePressed
in class RMTool<T extends RMTextShape>
public void mouseDragged(java.awt.event.MouseEvent anEvent)
mouseDragged
in class RMTool<T extends RMTextShape>
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in class RMTool<T extends RMTextShape>
public void mousePressed(T aTextShape, java.awt.event.MouseEvent anEvent)
mousePressed
in class RMTool<T extends RMTextShape>
public void mouseDragged(T aTextShape, java.awt.event.MouseEvent anEvent)
mouseDragged
in class RMTool<T extends RMTextShape>
public void mouseReleased(T aTextShape, java.awt.event.MouseEvent anEvent)
mouseReleased
in class RMTool<T extends RMTextShape>
public void processKeyEvent(T aTextShape, java.awt.event.KeyEvent anEvent)
processKeyEvent
in class RMTool<T extends RMTextShape>
public void didBecomeSuperSelectedShapeInEditor(RMShape aShape, RMEditor anEditor)
didBecomeSuperSelectedShapeInEditor
in class RMTool<T extends RMTextShape>
public boolean mousePressedSelection(java.awt.event.MouseEvent anEvent)
mousePressedSelection
in class RMTool<T extends RMTextShape>
public void moveShapeHandle(T aShape, int aHandle, RMPoint toPoint)
moveShapeHandle
in class RMTool<T extends RMTextShape>
public java.lang.String getToolTipText(T aTextShape, java.awt.event.MouseEvent anEvent)
getToolTipText
in class RMTool<T extends RMTextShape>
public void paintShapeHandles(T aTextShape, java.awt.Graphics2D g, boolean isSuperSelected)
paintShapeHandles
in class RMTool<T extends RMTextShape>
public boolean isPaintingTextLinkIndicator(RMTextShape aText)
public void paintTextLinkIndicator(RMTextShape aText, java.awt.Graphics2D g)
public int getHandleCount(T aText)
getHandleCount
in class RMTool<T extends RMTextShape>
public RMRect getHandleRect(T aTextShape, int handle, boolean isSuperSelected)
getHandleRect
in class RMTool<T extends RMTextShape>
public void willLoseSuperSelectionInEditor(RMShape aShape, RMEditor anEditor)
willLoseSuperSelectionInEditor
in class RMTool<T extends RMTextShape>
public boolean acceptsDrag(T aShape, java.awt.dnd.DropTargetDragEvent anEvent)
acceptsDrag
in class RMTool<T extends RMTextShape>
public void drop(T aShape, java.awt.dnd.DropTargetDropEvent anEvent)
drop
in class RMTool<T extends RMTextShape>
public java.lang.Class getShapeClass()
getShapeClass
in class RMTool<T extends RMTextShape>
public java.lang.String getWindowTitle()
getWindowTitle
in class RMTool<T extends RMTextShape>
public static void convertToText(RMShape aShape, java.lang.String aString)