|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.pietschy.command.Command
com.pietschy.command.ActionCommand
com.pietschy.command.worker.CancelSwingWorkerCommand
public class CancelSwingWorkerCommand
An action command that tracks and SwingWorkerCommand and cancels it
when executed. This command will automatically enable and disable while the
command is working.
| Field Summary |
|---|
| Fields inherited from class com.pietschy.command.ActionCommand |
|---|
PARAMETER_ACTION_EVENT, PARAMETER_INVOKER, PARAMETER_INVOKER_WINDOW, PARAMETER_MODIFIERS |
| Fields inherited from class com.pietschy.command.Command |
|---|
internalLog, PROPERTY_ENABLED, PROPERTY_VISIBLE |
| Constructor Summary | |
|---|---|
CancelSwingWorkerCommand()
Creates a new anonymous instance. |
|
CancelSwingWorkerCommand(java.lang.String id)
Creates a new instance with the specified id. |
|
CancelSwingWorkerCommand(java.lang.String id,
SwingWorkerCommand command)
Creates a new instance with the specified id that cancels the specified SwingWorkerCommand. |
|
CancelSwingWorkerCommand(SwingWorkerCommand command)
Creates a new instance that cancels the specified SwingWorkerCommand. |
|
| Method Summary | |
|---|---|
SwingWorkerCommand |
getWorkerCommand()
Gets the SwingWorkerCommand that this command is associated with. |
protected void |
handleExecute()
Cancels the current worker command. |
boolean |
isMayInteruptIfRunning()
Checks if this command may interrupt the worker thread to enact the cancel. |
void |
setMayInteruptIfRunning(boolean mayInteruptIfRunning)
Configures if this command can interrupt the worker thread while it's running. |
void |
setWorkerCommand(SwingWorkerCommand workerCommand)
Sets the SwingWorkerCommand that this instance will track and cancel when
executed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.pietschy.command.ActionCommandExecutor |
|---|
addPropertyChangeListener, addPropertyChangeListener, isEnabled, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.pietschy.command.Identifiable |
|---|
getId |
| Constructor Detail |
|---|
public CancelSwingWorkerCommand()
setWorkerCommand(SwingWorkerCommand)public CancelSwingWorkerCommand(java.lang.String id)
id - the command id.setWorkerCommand(SwingWorkerCommand)public CancelSwingWorkerCommand(SwingWorkerCommand command)
SwingWorkerCommand.
command - the command to cancel.
public CancelSwingWorkerCommand(java.lang.String id,
SwingWorkerCommand command)
SwingWorkerCommand.
id - the command id.command - the command to cancel.| Method Detail |
|---|
protected void handleExecute()
handleExecute in class ActionCommandpublic SwingWorkerCommand getWorkerCommand()
SwingWorkerCommand that this command is associated with.
SwingWorkerCommand that this command is associated with.public void setWorkerCommand(SwingWorkerCommand workerCommand)
SwingWorkerCommand that this instance will track and cancel when
executed.
workerCommand - the command to cancel.public boolean isMayInteruptIfRunning()
true to interrupt the worker, false otherwise.public void setMayInteruptIfRunning(boolean mayInteruptIfRunning)
SwingWorkerCommand.cancel(boolean).
mayInteruptIfRunning - true the cancel operation may
interrupt the background thread.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||