hep.wired.interaction
Class DefaultInteractionHandler

java.lang.Object
  extended by hep.wired.interaction.AbstractInteractionHandler
      extended by hep.wired.interaction.DefaultInteractionHandler
All Implemented Interfaces:
InteractionHandler, WiredRegistry.ID, org.freehep.xml.io.XMLIO
Direct Known Subclasses:
DragAngledRectangleToScale, DragBallToRotate, DragRectangleToScale, DragToRotate, DragToScale, DragToTranslate

public class DefaultInteractionHandler
extends AbstractInteractionHandler

Default implementation of InteractionHandler that handles mouse wheel events to scroll, cursor keys to translate.

Version:
$Id: DefaultInteractionHandler.java 14093 2013-01-09 21:57:40Z onoprien $
Author:
Mark Donszelmann

Field Summary
static String command
           
protected static double fixedScale
           
protected static double fixedTranslate
           
protected static double multiplyScale
           
protected static double multiplyTranslate
           
 
Constructor Summary
protected DefaultInteractionHandler(String name)
          Creates a DefaultInteractionHandler.
 
Method Summary
 void changeCursor(RecordPlot plot, InputEvent event)
          Called to allow the InteractionHandler to change the cursor.
 String getDescription()
          Returns a one line description.
static DefaultInteractionHandler getInstance()
           
protected  double getLastScale()
           
static boolean isControlMetaDown(InputEvent event)
           
static boolean isMac()
           
 boolean isSupportedBy(GraphicsPanel panel)
          Returns true if this Interaction Handler is supported by this Graphics Panel.
 void mouseEntered(RecordPlot plot, MouseEvent event)
          Called when the mouse is entering the component
 void mouseWheelMoved(RecordPlot plot, MouseWheelEvent event)
          Called when the mousewheel is moved
 boolean otherKeyPressed(RecordPlot plot, KeyEvent event)
          Called when any other key is pressed.
 
Methods inherited from class hep.wired.interaction.AbstractInteractionHandler
altKeyPressed, altKeyReleased, ctrlKeyPressed, ctrlKeyReleased, ctrlMetaKeyPressed, ctrlMetaKeyReleased, equals, escKeyPressed, escKeyReleased, getHeight, getIcon, getID, getName, getWidth, hashCode, keyTyped, metaKeyPressed, metaKeyReleased, mouseButton1Clicked, mouseButton1DragEnded, mouseButton1Dragged, mouseButton1DragStarted, mouseButton1Pressed, mouseButton1Released, mouseExited, mouseMoved, otherKeyReleased, reset, restore, save, setRecord, setSelected, setSize, shiftKeyPressed, shiftKeyReleased
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fixedScale

protected static final double fixedScale

multiplyScale

protected static final double multiplyScale
See Also:
Constant Field Values

fixedTranslate

protected static final double fixedTranslate
See Also:
Constant Field Values

multiplyTranslate

protected static final double multiplyTranslate
See Also:
Constant Field Values

command

public static final String command
See Also:
Constant Field Values
Constructor Detail

DefaultInteractionHandler

protected DefaultInteractionHandler(String name)
Creates a DefaultInteractionHandler.

Method Detail

getInstance

public static DefaultInteractionHandler getInstance()

getDescription

public String getDescription()
Description copied from interface: InteractionHandler
Returns a one line description.


isSupportedBy

public boolean isSupportedBy(GraphicsPanel panel)
Description copied from interface: InteractionHandler
Returns true if this Interaction Handler is supported by this Graphics Panel.


changeCursor

public void changeCursor(RecordPlot plot,
                         InputEvent event)
Description copied from interface: InteractionHandler
Called to allow the InteractionHandler to change the cursor.


mouseEntered

public void mouseEntered(RecordPlot plot,
                         MouseEvent event)
Description copied from interface: InteractionHandler
Called when the mouse is entering the component

Specified by:
mouseEntered in interface InteractionHandler
Overrides:
mouseEntered in class AbstractInteractionHandler

getLastScale

protected double getLastScale()

mouseWheelMoved

public void mouseWheelMoved(RecordPlot plot,
                            MouseWheelEvent event)
Description copied from interface: InteractionHandler
Called when the mousewheel is moved

Specified by:
mouseWheelMoved in interface InteractionHandler
Overrides:
mouseWheelMoved in class AbstractInteractionHandler

otherKeyPressed

public boolean otherKeyPressed(RecordPlot plot,
                               KeyEvent event)
Description copied from interface: InteractionHandler
Called when any other key is pressed. Return true if the event is handled.

Specified by:
otherKeyPressed in interface InteractionHandler
Overrides:
otherKeyPressed in class AbstractInteractionHandler

isControlMetaDown

public static boolean isControlMetaDown(InputEvent event)

isMac

public static boolean isMac()


Copyright © 1996-2013 FreeHEP. All Rights Reserved.