hep.wired.interaction
Class DragAngledRectangleToScale

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

public class DragAngledRectangleToScale
extends DefaultInteractionHandler

Drag/click mouse to define an (angled) rectangle to scale, rotate and translate plot. Implements: 1. CMCMC - Click, Move, Click, Move, Click 2. CMD - Click, Move, Drag 3. DMC - Drag, Move, Click 4. DMD - Drag, Move, Drag

Version:
$Id: DragAngledRectangleToScale.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
DragAngledRectangleToScale()
          Create a angled rectangle handler to generate scal edits.
 
Method Summary
 void changeCursor(RecordPlot plot, InputEvent event)
          Called to allow the InteractionHandler to change the cursor.
 boolean ctrlMetaKeyPressed(RecordPlot plot, KeyEvent event)
          Called when the ctrl (other OSs) or meta (MacOS) key is pressed key is pressed.
 boolean ctrlMetaKeyReleased(RecordPlot plot, KeyEvent event)
          Called when the ctrl (other OSs) or meta (MacOS) key is released.
 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)
          Called when mouse button 1 is clicked
 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 mouseEntered(RecordPlot plot, MouseEvent event)
          Called when the mouse is entering the component
 void mouseMoved(RecordPlot plot, MouseEvent event)
          Called when the mouse is moved
 void reset(RecordPlot plot, InputEvent event)
          Called to reset the interaction handler in its initial state.
 boolean shiftKeyPressed(RecordPlot plot, KeyEvent event)
          Called when the shift key is pressed.
 boolean shiftKeyReleased(RecordPlot plot, KeyEvent event)
          Called when the esc key is released.
 String toString()
           
 
Methods inherited from class hep.wired.interaction.DefaultInteractionHandler
getInstance, getLastScale, isControlMetaDown, isMac, mouseWheelMoved, otherKeyPressed
 
Methods inherited from class hep.wired.interaction.AbstractInteractionHandler
altKeyPressed, altKeyReleased, ctrlKeyPressed, ctrlKeyReleased, equals, escKeyPressed, escKeyReleased, getHeight, getID, getName, getWidth, hashCode, keyTyped, metaKeyPressed, metaKeyReleased, mouseButton1Pressed, mouseButton1Released, mouseExited, otherKeyReleased, restore, save, setRecord, setSelected, setSize
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DragAngledRectangleToScale

public DragAngledRectangleToScale()
Create a angled rectangle handler to generate scal edits.

Method Detail

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

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

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

mouseButton1Clicked

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

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

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

mouseMoved

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

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

shiftKeyPressed

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

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

shiftKeyReleased

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

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

ctrlMetaKeyPressed

public boolean ctrlMetaKeyPressed(RecordPlot plot,
                                  KeyEvent event)
Description copied from interface: InteractionHandler
Called when the ctrl (other OSs) or meta (MacOS) key is pressed key is pressed. Return true if the event is handled. If handles ctrlKeyPressed or metaKeyPressed will NOT be called.

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

ctrlMetaKeyReleased

public boolean ctrlMetaKeyReleased(RecordPlot plot,
                                   KeyEvent event)
Description copied from interface: InteractionHandler
Called when the ctrl (other OSs) or meta (MacOS) key is released. Return true if the event is handled. If handled crlKeyPressed or metaKeyPressed will NOT be called.

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1996-2013 FreeHEP. All Rights Reserved.