Package com.reportmill.editor
Class RMEditorEvents
- java.lang.Object
-
- java.awt.event.MouseAdapter
-
- javax.swing.event.MouseInputAdapter
-
- com.reportmill.editor.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.MouseInputAdapterHandles editor methods specific to event operations.
-
-
Field Summary
Fields Modifier and Type Field Description java.awt.event.MouseEvent_currentEventint_doPopupRMPoint_downPointRMPoint_lastPoint
-
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.MouseEventgetCurrentEvent()Returns the current event.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 floatgetGuideLocation(RMDocument aDoc, int anIndex)Returns the guide location for the given index.bytegetGuideOrientation(RMDocument aDoc, int anIndex)Returns the guide orientation for the given index.voidmouseDragged(java.awt.event.MouseEvent anEvent)Handle mouse dragged.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.-
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
-
-
-
-
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:
mousePressedin interfacejava.awt.event.MouseListener- Overrides:
mousePressedin classjava.awt.event.MouseAdapter
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent anEvent)
Handle mouse dragged.- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener- Overrides:
mouseDraggedin classjava.awt.event.MouseAdapter
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent anEvent)
Handle mouse released.- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener- Overrides:
mouseReleasedin classjava.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.
-
-