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.MouseEventgetCurrentEvent()Returns the current event.RMEditorgetEditor()Returns the viewer as an editor.RMPointgetEventPointInDoc()Returns the current event point in document coords.RMPointgetEventPointInDoc(boolean snapToGrid)Returns the current event point in document coords with an option to adjust to conform to grid.RMPointgetEventPointInShape(boolean snapToGrid)Returns the current event point in super-selected shape coords, optionally snapped to grid.RMPointgetEventPointInShape(boolean snapToGrid, boolean snapEdges)Returns the current event point in super-selected shape coords with an option to adjust to conform to grid.static intgetGuideCount(RMDocument aDoc)Returns the number of guides (4 if snapping to margin, otherwise zero).static doublegetGuideLocation(RMDocument aDoc, int anIndex)Returns the guide location for the given index.booleangetOverridePreview()Returns whether to override preview mode.voidkeyPressed(java.awt.event.KeyEvent anEvent)Handle key pressed.voidkeyReleased(java.awt.event.KeyEvent anEvent)Handle key released.voidkeyTyped(java.awt.event.KeyEvent anEvent)Handle key pressed.voidmouseDragged(java.awt.event.MouseEvent anEvent)Handle mouse dragged.voidmouseMoved(java.awt.event.MouseEvent anEvent)Handle mouse moved event.voidmousePressed(java.awt.event.MouseEvent anEvent)Handle mouse pressed.voidmouseReleased(java.awt.event.MouseEvent anEvent)Handle mouse released.voidprocessKeyEvent(java.awt.event.KeyEvent anEvent)Handles key press events.voidsetOverridePreview(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:
mousePressedin classRMViewerInputAdapterImpl
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent anEvent)
Handle mouse dragged.- Overrides:
mouseDraggedin classRMViewerInputAdapterImpl
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent anEvent)
Handle mouse released.- Overrides:
mouseReleasedin classRMViewerInputAdapterImpl
-
mouseMoved
public void mouseMoved(java.awt.event.MouseEvent anEvent)
Handle mouse moved event.- Overrides:
mouseMovedin classRMViewerInputAdapterImpl
-
keyReleased
public void keyReleased(java.awt.event.KeyEvent anEvent)
Handle key released.- Overrides:
keyReleasedin classRMViewerInputAdapter
-
keyPressed
public void keyPressed(java.awt.event.KeyEvent anEvent)
Handle key pressed.- Overrides:
keyPressedin classRMViewerInputAdapter
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent anEvent)
Handle key pressed.- Overrides:
keyTypedin classRMViewerInputAdapter
-
processKeyEvent
public void processKeyEvent(java.awt.event.KeyEvent anEvent)
Handles key press events.- Overrides:
processKeyEventin 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.
-
-