edu.umd.cs.jazz.event
Class ZSelectionScaleHandler

java.lang.Object
  |
  +--edu.umd.cs.jazz.event.ZFilteredEventHandler
        |
        +--edu.umd.cs.jazz.event.ZSelectionScaleHandler
All Implemented Interfaces:
ZEventHandler

public class ZSelectionScaleHandler
extends ZFilteredEventHandler

ZSelectionScaleHandler is a selection handler for use with a ZSelectionManager. ZSelectionScaleHandler allows the user to scale the current selection using the PgUp / PgDn keys.

Author:
Antony Courtney, Yale University
, Lance Good, University of Maryland , Benjamin Bederson, University of Maryland , Jesse Grosjean, University of Maryland
See Also:
ZSelectionManager, ZCompositeSelectionHandler

Nested Class Summary
 
Nested classes inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler
ZFilteredEventHandler.ZFilteredEventDispatcher
 
Field Summary
 
Fields inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler
fFilteredEventDispatcher, fMouseFilter
 
Constructor Summary
ZSelectionScaleHandler(ZCamera aIgnoredCamera, ZCanvas aFilteredKeyEventSouce)
          Deprecated. As of Jazz version 1.2, use ZSelectionScaleHandler(ZCanvas aFilteredKeyEventSouce) instead.
ZSelectionScaleHandler(ZCanvas aFilteredKeyEventSouce)
          Constructs a new ZSelectionScaleHandler.
 
Method Summary
protected  void filteredKeyPressed(java.awt.event.KeyEvent e)
          Invoked when a key is pressed on the key event souce and the event filter accepts the event.
 double getScaleFactor()
          Get the scale factor for incremental scales.
protected  void scaleSelectionBy(double aScaleFactor)
          Scale the selection by the given scale factor around the centerpoint of the bounds for the entire selection.
protected  void scaleSelectionDown()
          Scale the selection down by the current scale factor.
protected  void scaleSelectionUp()
          Scale the selection up by the current scale factor.
 void setScaleFactor(double aScaleFactor)
          Set the scale factor for incremental scales.
 
Methods inherited from class edu.umd.cs.jazz.event.ZFilteredEventHandler
filteredKeyReleased, filteredKeyTyped, filteredMouseClicked, filteredMouseDragged, filteredMouseEntered, filteredMouseExited, filteredMouseMoved, filteredMousePressed, filteredMouseReleased, getCurrentFilteredMouseEvent, getCurrentSelection, getFilteredEventDispatcher, getFilteredKeyEventSource, getFilteredMouseEventSource, getInteractionCamera, getMouseFilter, getTopCamera, isActive, setActive, setFilteredKeyEventSource, setFilteredMouseEventSource, setMouseFilter, wantsKeyEvents, wantsMouseEvents, wantsMouseMotionEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZSelectionScaleHandler

public ZSelectionScaleHandler(ZCanvas aFilteredKeyEventSouce)
Constructs a new ZSelectionScaleHandler.

Parameters:
aFilteredKeyEventSouce - the source for filtered KeyEvents. See the ZFilteredEventHandler class comment to customize this behavior.

ZSelectionScaleHandler

public ZSelectionScaleHandler(ZCamera aIgnoredCamera,
                              ZCanvas aFilteredKeyEventSouce)
Deprecated. As of Jazz version 1.2, use ZSelectionScaleHandler(ZCanvas aFilteredKeyEventSouce) instead.

Method Detail

getScaleFactor

public double getScaleFactor()
Get the scale factor for incremental scales.


setScaleFactor

public void setScaleFactor(double aScaleFactor)
Set the scale factor for incremental scales.


filteredKeyPressed

protected void filteredKeyPressed(java.awt.event.KeyEvent e)
Invoked when a key is pressed on the key event souce and the event filter accepts the event.

Overrides:
filteredKeyPressed in class ZFilteredEventHandler
Parameters:
e - the filtered key pressed event accepted by the event filter.

scaleSelectionUp

protected void scaleSelectionUp()
Scale the selection up by the current scale factor.


scaleSelectionDown

protected void scaleSelectionDown()
Scale the selection down by the current scale factor.


scaleSelectionBy

protected void scaleSelectionBy(double aScaleFactor)
Scale the selection by the given scale factor around the centerpoint of the bounds for the entire selection.



Copyright 2003 by University of Maryland, College Park, MD 20742, USA All rights reserved.