Class RMEditorEvents

All Implemented Interfaces:
MouseListener, MouseMotionListener, MouseWheelListener, EventListener, MouseInputListener

public class RMEditorEvents extends MouseInputAdapter
Handles editor methods specific to event operations.
  • Field Details

    • _currentEvent

      public MouseEvent _currentEvent
    • _downPoint

      public RMPoint _downPoint
    • _lastPoint

      public RMPoint _lastPoint
    • _doPopup

      public int _doPopup
  • Constructor Details

    • RMEditorEvents

      public RMEditorEvents(RMEditor editor)
      Creates a new editor events object.
  • Method Details

    • processKeyEvent

      public void processKeyEvent(KeyEvent anEvent)
      Handles key press events.
    • mousePressed

      public void mousePressed(MouseEvent anEvent)
      Handle mouse pressed.
      Specified by:
      mousePressed in interface MouseListener
      Overrides:
      mousePressed in class MouseAdapter
    • mouseDragged

      public void mouseDragged(MouseEvent anEvent)
      Handle mouse dragged.
      Specified by:
      mouseDragged in interface MouseMotionListener
      Overrides:
      mouseDragged in class MouseAdapter
    • mouseReleased

      public void mouseReleased(MouseEvent anEvent)
      Handle mouse released.
      Specified by:
      mouseReleased in interface MouseListener
      Overrides:
      mouseReleased in class MouseAdapter
    • 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 float getGuideLocation(RMDocument aDoc, int anIndex)
      Returns the guide location for the given index.
    • getGuideOrientation

      public byte getGuideOrientation(RMDocument aDoc, int anIndex)
      Returns the guide orientation for the given index.