public class ActionWorker<R,P> extends SwingWorker<R,P>
| Modifier and Type | Class and Description |
|---|---|
static class |
ActionWorker.ActionStatus
State of a running action
|
SwingWorker.StateValue| Modifier and Type | Field and Description |
|---|---|
protected String |
actionLabel |
protected long |
endTime |
protected Exception |
error |
protected long |
startTime |
protected ActionWorker.ActionStatus |
status |
protected Callable<R> |
target |
| Constructor and Description |
|---|
ActionWorker(String actionLabel) |
ActionWorker(String actionLabel,
Runnable target) |
| Modifier and Type | Method and Description |
|---|---|
protected R |
doInBackground() |
protected void |
done() |
String |
getActionLabel() |
long |
getEndTime() |
Exception |
getError() |
long |
getStartTime() |
ActionWorker.ActionStatus |
getStatus() |
Callable<R> |
getTarget() |
String |
getTime() |
boolean |
isFailed() |
void |
setTarget(Callable<R> target)
Set the target to execute.
|
void |
setTarget(Runnable target) |
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgressprotected final String actionLabel
protected ActionWorker.ActionStatus status
protected Exception error
protected long startTime
protected long endTime
public ActionWorker(String actionLabel)
public void setTarget(Runnable target)
public void setTarget(Callable<R> target)
target - the target to executeprotected R doInBackground()
doInBackground in class SwingWorker<R,P>public boolean isFailed()
public Exception getError()
public ActionWorker.ActionStatus getStatus()
public String getActionLabel()
protected void done()
done in class SwingWorker<R,P>public String getTime()
public long getStartTime()
public long getEndTime()
Copyright © 2008–2017 Ultreia.io. All rights reserved.