|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.AbstractAction
org.tigris.gef.base.Cmd
org.tigris.gef.base.CmdZoom
public class CmdZoom
Cmd zoom the view. Needs-More-Work:
| Field Summary | |
|---|---|
protected double |
_magnitude
|
| Fields inherited from class org.tigris.gef.base.Cmd |
|---|
_args, _resource |
| Fields inherited from class javax.swing.AbstractAction |
|---|
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
|---|
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
| Constructor Summary | |
|---|---|
CmdZoom()
Default behaviour is to restore scaling to 1.0 (1 to 1) |
|
CmdZoom(double magnitude)
Each time doIt() is invoked, adjust scaling by a
factor of magnitude. |
|
| Method Summary | |
|---|---|
void |
doIt()
Adjust the scale factor of the current editor. |
void |
undoIt()
Undo the zoom. |
protected static java.lang.String |
wordFor(double magnitude)
Convert the zoom magnitude to an English description. |
| Methods inherited from class org.tigris.gef.base.Cmd |
|---|
about, actionPerformed, cmdAtIndex, containsArg, getArg, getArg, getName, getResource, register, registeredCmds, setArg, setName, setResource, shouldBeEnabled, updateEnabled |
| Methods inherited from class javax.swing.AbstractAction |
|---|
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected double _magnitude
| Constructor Detail |
|---|
public CmdZoom()
public CmdZoom(double magnitude)
doIt() is invoked, adjust scaling by a
factor of magnitude.
magnitude - the factor by which to adjust the Editor's scaling. Must be greater than or equal to zero. If zero, resets the Editor's scale factor to 1.| Method Detail |
|---|
protected static java.lang.String wordFor(double magnitude)
public void doIt()
doIt in class Cmdpublic void undoIt()
(x * f / f) == x
undoIt in class Cmd
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||