Class AbstractGraphMousePlugin

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.awt.Cursor cursor
      the special cursor that plugins may display
      protected java.awt.Point down
      the location in the View where the mouse was pressed
      protected int modifiers
      modifiers to compare against mouse event modifiers
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractGraphMousePlugin​(int modifiers)
      Creates an instance with the specified mouse event modifiers.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean checkModifiers​(java.awt.event.MouseEvent e)
      check the mouse event modifiers against the instance member modifiers.
      java.awt.Cursor getCursor()  
      int getModifiers()
      getter for mouse modifiers
      void setCursor​(java.awt.Cursor cursor)  
      void setModifiers​(int modifiers)
      setter for mouse modifiers
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • modifiers

        protected int modifiers
        modifiers to compare against mouse event modifiers
      • down

        protected java.awt.Point down
        the location in the View where the mouse was pressed
      • cursor

        protected java.awt.Cursor cursor
        the special cursor that plugins may display
    • Constructor Detail

      • AbstractGraphMousePlugin

        public AbstractGraphMousePlugin​(int modifiers)
        Creates an instance with the specified mouse event modifiers.
        Parameters:
        modifiers - the mouse event modifiers to use
    • Method Detail

      • getModifiers

        public int getModifiers()
        getter for mouse modifiers
        Specified by:
        getModifiers in interface GraphMousePlugin
        Returns:
        the mouse event modifiers that will activate this plugin
      • setModifiers

        public void setModifiers​(int modifiers)
        setter for mouse modifiers
        Specified by:
        setModifiers in interface GraphMousePlugin
        Parameters:
        modifiers - the mouse event modifiers that will activate this plugin
      • checkModifiers

        public boolean checkModifiers​(java.awt.event.MouseEvent e)
        check the mouse event modifiers against the instance member modifiers. Default implementation checks equality. Can be overridden to test with a mask
        Specified by:
        checkModifiers in interface GraphMousePlugin
        Parameters:
        e - an event to compare to
        Returns:
        whether the member modifiers match the event modifiers
      • getCursor

        public java.awt.Cursor getCursor()
        Returns:
        Returns the cursor.
      • setCursor

        public void setCursor​(java.awt.Cursor cursor)
        Parameters:
        cursor - The cursor to set.