Class RMEditorEvents

  • All Implemented Interfaces:
    java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener, javax.swing.event.MouseInputListener

    public class RMEditorEvents
    extends javax.swing.event.MouseInputAdapter
    Handles editor methods specific to event operations.
    • Constructor Summary

      Constructors 
      Constructor Description
      RMEditorEvents​(RMEditor editor)
      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.
      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 float getGuideLocation​(RMDocument aDoc, int anIndex)
      Returns the guide location for the given index.
      byte getGuideOrientation​(RMDocument aDoc, int anIndex)
      Returns the guide orientation for the given index.
      void mouseDragged​(java.awt.event.MouseEvent anEvent)
      Handle mouse dragged.
      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.
      • Methods inherited from class java.awt.event.MouseAdapter

        mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.awt.event.MouseListener

        mouseClicked, mouseEntered, mouseExited
      • Methods inherited from interface java.awt.event.MouseMotionListener

        mouseMoved
    • Field Detail

      • _currentEvent

        public java.awt.event.MouseEvent _currentEvent
      • _downPoint

        public RMPoint _downPoint
      • _lastPoint

        public RMPoint _lastPoint
      • _doPopup

        public int _doPopup
    • Constructor Detail

      • RMEditorEvents

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

      • processKeyEvent

        public void processKeyEvent​(java.awt.event.KeyEvent anEvent)
        Handles key press events.
      • mousePressed

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

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

        public void mouseReleased​(java.awt.event.MouseEvent anEvent)
        Handle mouse released.
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Overrides:
        mouseReleased in class java.awt.event.MouseAdapter
      • 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 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.