Class RMEditorInputAdapter
- java.lang.Object
-
- com.inductiveautomation.rm.viewer.RMViewerInputAdapter
-
- com.inductiveautomation.rm.viewer.RMViewerInputAdapterImpl
-
- com.inductiveautomation.rm.editor.RMEditorInputAdapter
-
public class RMEditorInputAdapter extends RMViewerInputAdapterImpl
Handles editor methods specific to event operations.
-
-
Constructor Summary
Constructors Constructor Description RMEditorInputAdapter(RMViewer aViewer)
Creates a new editor events object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.event.MouseEvent
getCurrentEvent()
Returns the current event.RMEditor
getEditor()
Returns the viewer as an editor.RMPoint
getEventPointInDoc()
Returns the current event point in document coords.RMPoint
getEventPointInDoc(boolean snapToGrid)
Returns the current event point in document coords with an option to adjust to conform to grid.RMPoint
getEventPointInShape(boolean snapToGrid)
Returns the current event point in super-selected shape coords, optionally snapped to grid.RMPoint
getEventPointInShape(boolean snapToGrid, boolean snapEdges)
Returns the current event point in super-selected shape coords with an option to adjust to conform to grid.static int
getGuideCount(RMDocument aDoc)
Returns the number of guides (4 if snapping to margin, otherwise zero).static double
getGuideLocation(RMDocument aDoc, int anIndex)
Returns the guide location for the given index.boolean
getOverridePreview()
Returns whether to override preview mode.void
keyPressed(java.awt.event.KeyEvent anEvent)
Handle key pressed.void
keyReleased(java.awt.event.KeyEvent anEvent)
Handle key released.void
keyTyped(java.awt.event.KeyEvent anEvent)
Handle key pressed.void
mouseDragged(java.awt.event.MouseEvent anEvent)
Handle mouse dragged.void
mouseMoved(java.awt.event.MouseEvent anEvent)
Handle mouse moved event.void
mousePressed(java.awt.event.MouseEvent anEvent)
Handle mouse pressed.void
mouseReleased(java.awt.event.MouseEvent anEvent)
Handle mouse released.void
processKeyEvent(java.awt.event.KeyEvent anEvent)
Handles key press events.void
setOverridePreview(boolean aValue)
Sets whether to override preview mode.-
Methods inherited from class com.inductiveautomation.rm.viewer.RMViewerInputAdapterImpl
copy, mouseClicked, mouseEntered, mouseExited, paint, updateShapeUnderStack
-
Methods inherited from class com.inductiveautomation.rm.viewer.RMViewerInputAdapter
getViewer, processMouseEvent, processMouseMotionEvent
-
-
-
-
Constructor Detail
-
RMEditorInputAdapter
public RMEditorInputAdapter(RMViewer aViewer)
Creates a new editor events object.
-
-
Method Detail
-
getEditor
public RMEditor getEditor()
Returns the viewer as an editor.
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent anEvent)
Handle mouse pressed.- Overrides:
mousePressed
in classRMViewerInputAdapterImpl
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent anEvent)
Handle mouse dragged.- Overrides:
mouseDragged
in classRMViewerInputAdapterImpl
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent anEvent)
Handle mouse released.- Overrides:
mouseReleased
in classRMViewerInputAdapterImpl
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent anEvent)
Handle mouse moved event.- Overrides:
mouseMoved
in classRMViewerInputAdapterImpl
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent anEvent)
Handle key released.- Overrides:
keyReleased
in classRMViewerInputAdapter
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent anEvent)
Handle key pressed.- Overrides:
keyPressed
in classRMViewerInputAdapter
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent anEvent)
Handle key pressed.- Overrides:
keyTyped
in classRMViewerInputAdapter
-
processKeyEvent
public void processKeyEvent(java.awt.event.KeyEvent anEvent)
Handles key press events.- Overrides:
processKeyEvent
in classRMViewerInputAdapter
-
getCurrentEvent
public java.awt.event.MouseEvent getCurrentEvent()
Returns the current event.
-
getEventPointInDoc
public RMPoint getEventPointInDoc()
Returns the current event point in document coords.
-
getEventPointInDoc
public RMPoint getEventPointInDoc(boolean snapToGrid)
Returns the current event point in document coords with an option to adjust to conform to grid.
-
getEventPointInShape
public RMPoint getEventPointInShape(boolean snapToGrid)
Returns the current event point in super-selected shape coords, optionally snapped to grid.
-
getEventPointInShape
public RMPoint getEventPointInShape(boolean snapToGrid, boolean snapEdges)
Returns the current event point in super-selected shape coords with an option to adjust to conform to grid.
-
getGuideCount
public static int getGuideCount(RMDocument aDoc)
Returns the number of guides (4 if snapping to margin, otherwise zero).
-
getGuideLocation
public static double getGuideLocation(RMDocument aDoc, int anIndex)
Returns the guide location for the given index.
-
getOverridePreview
public boolean getOverridePreview()
Returns whether to override preview mode.
-
setOverridePreview
public void setOverridePreview(boolean aValue)
Sets whether to override preview mode.
-
-