|
||||||||||
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
public class 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/interfaces inherited from class org.jhotdraw.standard.AbstractCommand |
---|
AbstractCommand.EventDispatcher |
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 |
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, dispose, figureSelectionChanged, getDrawingEditor, getUndoActivity, isExecutable, name, removeCommandListener, setName, setUndoActivity, view |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ZoomCommand(java.lang.String newSame, float newScale, DrawingEditor newDrawingEditor)
name
- the command namescale
- Description of the ParameternewDrawingEditor
- 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 value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |