public class InternalHandle extends Object
Modifier and Type | Field and Description |
---|---|
static int |
NO_INCREASE |
static int |
STATE_FINISHED |
static int |
STATE_INITIALIZED |
static int |
STATE_REQUEST_STOP |
static int |
STATE_RUNNING |
Modifier | Constructor and Description |
---|---|
protected |
InternalHandle(String displayName,
Cancellable cancel,
boolean userInitiated)
Creates a new instance of ProgressHandle
|
Modifier and Type | Method and Description |
---|---|
ProgressHandle |
createProgressHandle()
Creates a
ProgressHandle instance, which works with this SPI. |
void |
finish()
finish the task, remove the task's component from the progress bar UI.
|
String |
getDisplayName() |
int |
getInitialDelay() |
long |
getLastPingTime()
Returns the last time the progress was updated.
|
double |
getPercentageDone()
public because of tests.
|
int |
getState()
XXX - called from UI, threading
|
long |
getTimeStampStarted() |
int |
getTotalUnits() |
boolean |
isAllowCancel() |
boolean |
isAllowView() |
boolean |
isCustomPlaced() |
boolean |
isInSleepMode() |
boolean |
isUserInitialized() |
protected void |
markCustomPlaced()
Marks this handle as custom-placed.
|
void |
progress(String message,
int workunit) |
boolean |
requestAction(String actionCommand,
Action action)
Request a interaction callback to be attached to the Handle.
|
void |
requestCancel() |
void |
requestDisplayNameChange(String newDisplayName) |
void |
requestExplicitSelection() |
ProgressEvent |
requestStateSnapshot() |
void |
requestView() |
protected void |
setController(Controller ctrl) |
void |
setInitialDelay(int millis) |
void |
start(String message,
int workunits,
long estimate)
start the progress indication for a task with known number of steps and known
time estimate for completing the task.
|
void |
toDeterminate(int workunits,
long estimate) |
void |
toIndeterminate() |
void |
toSilent(String message) |
String |
toString() |
public static final int STATE_INITIALIZED
public static final int STATE_RUNNING
public static final int STATE_FINISHED
public static final int STATE_REQUEST_STOP
public static final int NO_INCREASE
protected InternalHandle(String displayName, Cancellable cancel, boolean userInitiated)
public final ProgressHandle createProgressHandle()
ProgressHandle
instance, which works with this SPI.public String getDisplayName()
public int getState()
public boolean isAllowCancel()
public boolean isAllowView()
public boolean isCustomPlaced()
public final boolean isUserInitialized()
public int getTotalUnits()
public void setInitialDelay(int millis)
public int getInitialDelay()
public void toSilent(String message)
public boolean isInSleepMode()
public void toIndeterminate()
public void toDeterminate(int workunits, long estimate)
protected final void setController(Controller ctrl)
public void start(String message, int workunits, long estimate)
message
- workunits
- estimate
- estimated time to process the task in secondspublic void finish()
public void progress(String message, int workunit)
message
- workunit
- public void requestCancel()
public void requestView()
public void requestExplicitSelection()
public boolean requestAction(String actionCommand, Action action)
ProgressHandle.ACTION_VIEW
is defined as a default command (action) for
the progress handle presentation. Implementations are free to ignore request
for adding actions.actionCommand
- command to bind the action for.action
- action instancepublic void requestDisplayNameChange(String newDisplayName)
public ProgressEvent requestStateSnapshot()
public double getPercentageDone()
public long getLastPingTime()
public long getTimeStampStarted()
protected final void markCustomPlaced()