hep.wired.interaction
Class DragToScale

java.lang.Object
  extended by hep.wired.interaction.AbstractInteractionHandler
      extended by hep.wired.interaction.DefaultInteractionHandler
          extended by hep.wired.interaction.DragToScale
All Implemented Interfaces:
InteractionHandler, WiredRegistry.ID, org.freehep.xml.io.XMLIO

public class DragToScale
extends DefaultInteractionHandler

Drag/click mouse to scale plot.

Version:
$Id: DragToScale.java 8598 2006-08-14 20:38:02Z duns $
Author:
Mark Donszelmann

Field Summary
 
Fields inherited from class hep.wired.interaction.DefaultInteractionHandler
command, fixedScale, fixedTranslate, multiplyScale, multiplyTranslate
 
Constructor Summary
DragToScale()
          Create a drag handler to generate scale edits.
 
Method Summary
 boolean altKeyPressed(RecordPlot plot, KeyEvent event)
          Called when the alt key is pressed.
 boolean altKeyReleased(RecordPlot plot, KeyEvent event)
          Called when the alt key is released.
 void changeCursor(RecordPlot plot, InputEvent event)
          Called to allow the InteractionHandler to change the cursor.
 String getDescription()
          Returns a one line description.
 Icon getIcon(int size)
          Returns associated icon
 boolean isSupportedBy(GraphicsPanel panel)
          Returns true if this Interaction Handler is supported by this Graphics Panel.
 void mouseButton1Clicked(RecordPlot plot, MouseEvent event)
          Zoom in (or out if alt key pressed).
 void mouseButton1DragEnded(RecordPlot plot, MouseEvent event)
          Called when mouse button 1 is ending a drag
 void mouseButton1Dragged(RecordPlot plot, MouseEvent event)
          Called when mouse button 1 is dragged
 void mouseButton1DragStarted(RecordPlot plot, MouseEvent event)
          Called when mouse button 1 is starting a drag
 void mouseButton1Released(RecordPlot plot, MouseEvent event)
          Called when mouse button 1 is released
 void mouseEntered(RecordPlot plot, MouseEvent event)
          Called when the mouse is entering the component
 void reset(RecordPlot plot, InputEvent event)
          Called to reset the interaction handler in its initial state.
 String toString()
           
 
Methods inherited from class hep.wired.interaction.DefaultInteractionHandler
getInstance, getLastScale, isControlMetaDown, isMac, mouseWheelMoved, otherKeyPressed
 
Methods inherited from class hep.wired.interaction.AbstractInteractionHandler
ctrlKeyPressed, ctrlKeyReleased, ctrlMetaKeyPressed, ctrlMetaKeyReleased, equals, escKeyPressed, escKeyReleased, getHeight, getID, getName, getWidth, hashCode, keyTyped, metaKeyPressed, metaKeyReleased, mouseButton1Pressed, mouseExited, mouseMoved, otherKeyReleased, restore, save, setRecord, setSelected, setSize, shiftKeyPressed, shiftKeyReleased
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DragToScale

public DragToScale()
Create a drag handler to generate scale edits.

Method Detail

isSupportedBy

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

Specified by:
isSupportedBy in interface InteractionHandler
Overrides:
isSupportedBy in class DefaultInteractionHandler

getIcon

public Icon getIcon(int size)
Description copied from interface: InteractionHandler
Returns associated icon

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

getDescription

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

Specified by:
getDescription in interface InteractionHandler
Overrides:
getDescription in class DefaultInteractionHandler

changeCursor

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

Specified by:
changeCursor in interface InteractionHandler
Overrides:
changeCursor in class DefaultInteractionHandler

reset

public void reset(RecordPlot plot,
                  InputEvent event)
Description copied from interface: InteractionHandler
Called to reset the interaction handler in its initial state.

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

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 DefaultInteractionHandler

mouseButton1DragStarted

public void mouseButton1DragStarted(RecordPlot plot,
                                    MouseEvent event)
Description copied from interface: InteractionHandler
Called when mouse button 1 is starting a drag

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

mouseButton1Dragged

public void mouseButton1Dragged(RecordPlot plot,
                                MouseEvent event)
Description copied from interface: InteractionHandler
Called when mouse button 1 is dragged

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

mouseButton1DragEnded

public void mouseButton1DragEnded(RecordPlot plot,
                                  MouseEvent event)
Description copied from interface: InteractionHandler
Called when mouse button 1 is ending a drag

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

mouseButton1Released

public void mouseButton1Released(RecordPlot plot,
                                 MouseEvent event)
Description copied from interface: InteractionHandler
Called when mouse button 1 is released

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

altKeyPressed

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

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

altKeyReleased

public boolean altKeyReleased(RecordPlot plot,
                              KeyEvent event)
Description copied from interface: InteractionHandler
Called when the alt key is released. Return true if the event is handled.

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

mouseButton1Clicked

public void mouseButton1Clicked(RecordPlot plot,
                                MouseEvent event)
Zoom in (or out if alt key pressed).

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1996-2013 FreeHEP. All Rights Reserved.