public class DragRectangleToScale extends DefaultInteractionHandler
command, fixedTranslate, multiplyScale, multiplyTranslate| Constructor and Description |
|---|
DragRectangleToScale()
Create a rectangle handler to generate scale edits.
|
| Modifier and Type | Method and Description |
|---|---|
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)
Translate point to center and zoom in (or out if alt key pressed).
|
void |
mouseButton1DragEnded(RecordPlot plot,
MouseEvent event)
Update end point of rectangle, translate and scale, and remove rectangle.
|
void |
mouseButton1Dragged(RecordPlot plot,
MouseEvent event)
Update moving point of rectangle and draw.
|
void |
mouseButton1DragStarted(RecordPlot plot,
MouseEvent event)
Store starting point of rectangle.
|
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.
|
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() |
static void |
translateAndScale(RecordPlot plot,
Rectangle2D rectangle,
boolean fixedRatio) |
getInstance, getLastScale, isControlMetaDown, isMac, mouseWheelMoved, otherKeyPressedctrlKeyPressed, ctrlKeyReleased, ctrlMetaKeyPressed, ctrlMetaKeyReleased, equals, escKeyPressed, escKeyReleased, getHeight, getID, getName, getWidth, hashCode, keyTyped, metaKeyPressed, metaKeyReleased, mouseButton1Pressed, mouseExited, mouseMoved, otherKeyReleased, restore, save, setRecord, setSelected, setSizepublic DragRectangleToScale()
public Icon getIcon(int size)
InteractionHandlergetIcon in interface InteractionHandlergetIcon in class AbstractInteractionHandlerpublic String getDescription()
InteractionHandlergetDescription in interface InteractionHandlergetDescription in class DefaultInteractionHandlerpublic boolean isSupportedBy(GraphicsPanel panel)
InteractionHandlerisSupportedBy in interface InteractionHandlerisSupportedBy in class DefaultInteractionHandlerpublic void changeCursor(RecordPlot plot, InputEvent event)
InteractionHandlerchangeCursor in interface InteractionHandlerchangeCursor in class DefaultInteractionHandlerpublic void reset(RecordPlot plot, InputEvent event)
InteractionHandlerreset in interface InteractionHandlerreset in class AbstractInteractionHandlerpublic void mouseEntered(RecordPlot plot, MouseEvent event)
InteractionHandlermouseEntered in interface InteractionHandlermouseEntered in class DefaultInteractionHandlerpublic void mouseButton1DragStarted(RecordPlot plot, MouseEvent event)
mouseButton1DragStarted in interface InteractionHandlermouseButton1DragStarted in class AbstractInteractionHandlerpublic void mouseButton1Dragged(RecordPlot plot, MouseEvent event)
mouseButton1Dragged in interface InteractionHandlermouseButton1Dragged in class AbstractInteractionHandlerpublic void mouseButton1DragEnded(RecordPlot plot, MouseEvent event)
mouseButton1DragEnded in interface InteractionHandlermouseButton1DragEnded in class AbstractInteractionHandlerpublic static void translateAndScale(RecordPlot plot, Rectangle2D rectangle, boolean fixedRatio)
public void mouseButton1Released(RecordPlot plot, MouseEvent event)
InteractionHandlermouseButton1Released in interface InteractionHandlermouseButton1Released in class AbstractInteractionHandlerpublic boolean shiftKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandlershiftKeyPressed in interface InteractionHandlershiftKeyPressed in class AbstractInteractionHandlerpublic boolean shiftKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandlershiftKeyReleased in interface InteractionHandlershiftKeyReleased in class AbstractInteractionHandlerpublic boolean altKeyPressed(RecordPlot plot, KeyEvent event)
InteractionHandleraltKeyPressed in interface InteractionHandleraltKeyPressed in class AbstractInteractionHandlerpublic boolean altKeyReleased(RecordPlot plot, KeyEvent event)
InteractionHandleraltKeyReleased in interface InteractionHandleraltKeyReleased in class AbstractInteractionHandlerpublic void mouseButton1Clicked(RecordPlot plot, MouseEvent event)
mouseButton1Clicked in interface InteractionHandlermouseButton1Clicked in class AbstractInteractionHandlerCopyright © 1996-2014 FreeHEP. All Rights Reserved.