Class RMEditorInputAdapter


  • public class RMEditorInputAdapter
    extends RMViewerInputAdapterImpl
    Handles editor methods specific to event operations.
    • 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.
      • keyTyped

        public void keyTyped​(java.awt.event.KeyEvent anEvent)
        Handle key pressed.
        Overrides:
        keyTyped in class RMViewerInputAdapter
      • 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.