|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.standard.AbstractCommand
org.jhotdraw.contrib.zoom.ZoomCommand
A ZoomCommand allows for applying a zoom factor to a ZoomDrawingView.
Several ZoomCommand objects can be created in a menu or toolbar, set to various
predefined zoom factors
Nested Class Summary |
Nested classes inherited from class org.jhotdraw.standard.AbstractCommand |
AbstractCommand.EventDispatcher |
Field Summary | |
protected float |
scale
The scale factor to apply |
Constructor Summary | |
ZoomCommand(java.lang.String newSame,
float newScale,
DrawingEditor newDrawingEditor)
Constructor for the ZoomCommand object |
Method Summary | |
void |
execute()
Executes the command |
float |
getScale()
Gets the scale attribute of the ZoomCommand object |
protected boolean |
isExecutableWithView()
Returns true if the command is executable with the current view |
void |
setScale(float newScale)
Sets the scale attribute of the ZoomCommand object |
ZoomDrawingView |
zoomView()
Sets the zoom factor of the view |
Methods inherited from class org.jhotdraw.standard.AbstractCommand |
addCommandListener, createEventDispatcher, createViewChangeListener, dispose, figureSelectionChanged, getDrawingEditor, getEventDispatcher, getUndoActivity, isExecutable, isViewRequired, name, removeCommandListener, setName, setUndoActivity, view, viewCreated, viewDestroying, viewSelectionChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected float scale
Constructor Detail |
public ZoomCommand(java.lang.String newSame, float newScale, DrawingEditor newDrawingEditor)
newDrawingEditor
- the DrawingEditor which manages the viewsMethod Detail |
public void execute()
execute
in interface Command
execute
in class AbstractCommand
public ZoomDrawingView zoomView()
public float getScale()
public void setScale(float newScale)
newScale
- The new scale valueprotected boolean isExecutableWithView()
isExecutableWithView
in class AbstractCommand
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |