Class mxRotationHandler

  • All Implemented Interfaces:
    java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener

    public class mxRotationHandler
    extends mxMouseAdapter
    Basic example of implementing a handler for rotation. This can be used as follows: new mxRotationHandler(graphComponent) Note that the Java core does actually not support rotation for the selection handles, perimeter points etc. Feel free to contribute a fix!
    • Field Detail

      • ROTATE_ICON

        public static javax.swing.ImageIcon ROTATE_ICON
      • graphComponent

        protected mxGraphComponent graphComponent
        Reference to the enclosing graph component.
      • enabled

        protected boolean enabled
        Specifies if this handler is enabled. Default is true.
      • handle

        protected javax.swing.JComponent handle
      • initialAngle

        protected double initialAngle
      • currentAngle

        protected double currentAngle
      • first

        protected java.awt.Point first
    • Constructor Detail

      • mxRotationHandler

        public mxRotationHandler​(mxGraphComponent graphComponent)
        Constructs a new rotation handler.
    • Method Detail

      • isEnabled

        public boolean isEnabled()
      • setEnabled

        public void setEnabled​(boolean value)
      • createHandle

        protected javax.swing.JComponent createHandle()
      • isStateHandled

        public boolean isStateHandled​(mxCellState state)
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent e)
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
        Overrides:
        mousePressed in class mxMouseAdapter
      • start

        public void start​(java.awt.event.MouseEvent e)
      • mouseMoved

        public void mouseMoved​(java.awt.event.MouseEvent e)
        Specified by:
        mouseMoved in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseMoved in class mxMouseAdapter
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent e)
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseDragged in class mxMouseAdapter
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent e)
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Overrides:
        mouseReleased in class mxMouseAdapter
      • reset

        public void reset()
      • paint

        public void paint​(java.awt.Graphics g)