Class RMEditorInputAdapter


public class RMEditorInputAdapter extends RMViewerInputAdapterImpl
Handles editor methods specific to event operations.
  • Constructor Details

    • RMEditorInputAdapter

      public RMEditorInputAdapter(RMViewer aViewer)
      Creates a new editor events object.
  • Method Details

    • getEditor

      public RMEditor getEditor()
      Returns the viewer as an editor.
    • mousePressed

      public void mousePressed(MouseEvent anEvent)
      Handle mouse pressed.
      Overrides:
      mousePressed in class RMViewerInputAdapterImpl
    • mouseDragged

      public void mouseDragged(MouseEvent anEvent)
      Handle mouse dragged.
      Overrides:
      mouseDragged in class RMViewerInputAdapterImpl
    • mouseReleased

      public void mouseReleased(MouseEvent anEvent)
      Handle mouse released.
      Overrides:
      mouseReleased in class RMViewerInputAdapterImpl
    • mouseMoved

      public void mouseMoved(MouseEvent anEvent)
      Handle mouse moved event.
      Overrides:
      mouseMoved in class RMViewerInputAdapterImpl
    • keyReleased

      public void keyReleased(KeyEvent anEvent)
      Handle key released.
      Overrides:
      keyReleased in class RMViewerInputAdapter
    • keyPressed

      public void keyPressed(KeyEvent anEvent)
      Handle key pressed.
      Overrides:
      keyPressed in class RMViewerInputAdapter
    • keyTyped

      public void keyTyped(KeyEvent anEvent)
      Handle key pressed.
      Overrides:
      keyTyped in class RMViewerInputAdapter
    • processKeyEvent

      public void processKeyEvent(KeyEvent anEvent)
      Handles key press events.
      Overrides:
      processKeyEvent in class RMViewerInputAdapter
    • getCurrentEvent

      public 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.