|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.refractions.udig.project.command.CommandManager
public class CommandManager
A commands Manager executes commands in a seperate thread, either synchronously or a synchronously.
Nested Class Summary | |
---|---|
class |
CommandManager.Executor
Executes commands in a seperate thread from the requesting thread. |
static class |
CommandManager.Request
TODO Purpose of net.refractions.udig.project.command |
Constructor Summary | |
---|---|
CommandManager(java.lang.String managerName,
ErrorHandler handler)
Creates a new instance of CommandManager |
|
CommandManager(java.lang.String managerName,
ErrorHandler handler,
CommandListener commandCompletionListener)
Creates a new instance of CommandManager |
|
CommandManager(java.lang.String managerName,
ErrorHandler handler,
CommandListener commandCompletionListener,
long timeout2)
Creates a new instance of CommandManager |
Method Summary | |
---|---|
void |
addErrorHandler(ErrorHandler handler)
Adds an Errorhandler to the list of error handlers |
boolean |
aSyncExecute(Command command)
Execute Command asyncrounously. |
boolean |
canRedo()
return true if a command is available to be redone. |
boolean |
canUndo()
|
boolean |
execute(Command command,
boolean async)
Executes a command. |
int |
getMaxHistorySize()
|
boolean |
hasBackHistory()
|
boolean |
hasForwardHistory()
|
void |
redo(boolean runAsync)
Executes the last undone command, if there are any commands to undo. |
void |
removeErrorHandler(ErrorHandler handler)
Removes an Errorhandler from the list of error handlers |
boolean |
syncExecute(Command command)
Execute Command syncrounously. |
void |
undo(boolean runAsync)
Undoes the last command if possible. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandManager(java.lang.String managerName, ErrorHandler handler, CommandListener commandCompletionListener)
handler
- an error handler to use to handle thrown exceptions.public CommandManager(java.lang.String managerName, ErrorHandler handler)
handler
- an error handler to use to handle thrown exceptions.public CommandManager(java.lang.String managerName, ErrorHandler handler, CommandListener commandCompletionListener, long timeout2)
handler
- an error handler to use to handle thrown exceptions.Method Detail |
---|
public boolean execute(Command command, boolean async)
command
- The command to executeasync
- flag indicating wether command should be executed sync vs async.
public void redo(boolean runAsync)
runAsync
- true to run undo asynchronouslypublic void undo(boolean runAsync)
runAsync
- true to run undo asynchronouslypublic void addErrorHandler(ErrorHandler handler)
handler
- the error handler to add.ErrorHandler
public void removeErrorHandler(ErrorHandler handler)
handler
- the error handler to remove.ErrorHandler
public boolean canUndo()
canUndo
in interface CommandStack
true
if the last command can be undone.CommandStack.canUndo()
public boolean canRedo()
CommandStack
true
if a command is available to be redone.
canRedo
in interface CommandStack
CommandStack.canRedo()
public boolean hasBackHistory()
hasBackHistory
in interface NavCommandStack
true
if there is a position in the command stack that the viewport can
return to.NavCommandStack.hasBackHistory()
public boolean hasForwardHistory()
hasForwardHistory
in interface NavCommandStack
true
if the backHistory method has been called and no new nav commands
have occurred;NavCommandStack.hasForwardHistory()
public boolean syncExecute(Command command)
public int getMaxHistorySize()
public boolean aSyncExecute(Command command)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |