|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.visuals.util.DisableCommand
public class DisableCommand
A command for disabling a component. Disabling a component involves setting its enabled state to false and setting its cursor to a busy cursor. The command may be executed any number of times with different components and supports undo, and thus provides an easy way to temporarily disable a set of components. For example,
// create the command
DisableCommand cmd = new DisableCommand ();
// apply the command to our container and all its children
com.sas.swing.visuals.util.Util.apply (container, cmd);
// do some work
[...]
// restore the container and its children back to their original cursors
cmd.undoAll ();
ChangeCursorCommand
,
ChangeEnabledStateCommand
,
Util.apply(java.awt.Component, com.sas.util.ApplyInterface)
Field Summary |
---|
Fields inherited from interface com.sas.util.ApplyInterface |
---|
ABORT, CONTINUE |
Constructor Summary | |
---|---|
DisableCommand()
Constructor. |
Method Summary | |
---|---|
void |
undoAll()
Undoes all changes, if any. |
Methods inherited from class com.sas.util.CompositeCommand |
---|
apply, clone, execute, getFirstCommand, getSecondCommand, getText, isExecutable, isUndoable, setText, undo |
Constructor Detail |
---|
public DisableCommand()
Method Detail |
---|
public void undoAll()
undo()
which only undoes
the most recent execute()
, undoAll()
undoes
all of them.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |