Documentation of 'org.jplot2d.interaction.InteractionHandler' Java class
InteractionHandler
org.jplot2d.interaction

Class InteractionHandler

  • All Implemented Interfaces:
    VisualFeedbackDrawer


    public class InteractionHandler
    extends java.lang.Object
    implements VisualFeedbackDrawer
    This class handle the mouse actions that can respond to user's mouse events like left-click, double-click, right-click. The mouse event will translate to application level behavior, such as select an object, select data points in a layer, zoom in/out, etc. The translation can be configured by register and unregister the binding between application behavior to mouse events.

    Notice: most methods in this class is not thread-safe. They should be called within EDT.

    • Method Detail

      • init

        public void init()
        create mode handler and fill them with behavior handlers
        Parameters:
        ihandler -
      • keyPressed

        public void keyPressed(int modifiers,
                               int modifierKey)
        Parameters:
        modifiers - the modifiers mask after a modifier key pressed
        modifierKey - the modifiers mask of the modifier key pressed
      • keyReleased

        public void keyReleased(int modifiers,
                                int modifierKey)
        Parameters:
        modifiers - the modifiers mask after a modifier key released
        modifierKey - the modifiers mask of the modifier key released
      • mouseWheelMoved

        public void mouseWheelMoved(GenericMouseEvent e)
        Parameters:
        e - the negative count values if the mouse wheel was rotated up/away from the user, and positive count values if the mouse wheel was rotated down/ towards the user
      • getInteractionModeHandler

        public InteractionModeHandler getInteractionModeHandler(java.lang.String modeName)
      • getValue

        public java.lang.Object getValue(java.lang.String key)
        Gets the Object associated with the specified key.
        Parameters:
        key - a string containing the specified key
        Returns:
        the binding Object stored with this key; if there are no keys, it will return null
        See Also:
        Action#getValue
      • putValue

        public void putValue(java.lang.String key,
                             java.lang.Object newValue)
        Sets the Value associated with the specified key.
        Parameters:
        key - the String that identifies the stored object
        newValue - the Object to store using this key
        See Also:
        Action#putValue

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.