public class ProgressHandle extends Object
ProgressHandle
has a name property and a task property. the name
is fixed for the whole running time of the progress and identify the
ProgressHandle
action as a whole. Task name represent a single step
and can be changed.
For example, a UI client that downloads a file over the network and then
copy its content into a local database may set the ProgressHandle
UI clients as "Performing File Copy" and the task as "Downloading file".
Once the first task is complete, it may then change the task to
"Copying file".
Modifier and Type | Class and Description |
---|---|
static class |
ProgressHandle.Status |
Constructor and Description |
---|
ProgressHandle(LocalizedString name)
Create a new
ProgressHandle with the given name and task set
as LocalizedString.EMPTY_STRING . |
Modifier and Type | Method and Description |
---|---|
void |
addProgressListener(ActionListener<ProgressHandle.Status> listener) |
boolean |
equals(Object obj) |
LocalizedString |
getName() |
int |
getProgress() |
Range<Integer> |
getRange() |
LocalizedString |
getTask()
Gets the task
LocalizedString currently associated with this
ProgressHandle . |
int |
hashCode() |
boolean |
isIndeterminate() |
void |
removeProgressListener(ActionListener<ProgressHandle.Status> listener) |
void |
setIndeterminate(boolean indeterminate) |
void |
setProgress(int currentProgress) |
void |
setRange(Range<Integer> range) |
void |
setTask(LocalizedString task)
Sets the task currently associated
|
void |
start() |
void |
stop() |
String |
toString() |
public ProgressHandle(LocalizedString name)
ProgressHandle
with the given name and task set
as LocalizedString.EMPTY_STRING
.public LocalizedString getTask()
LocalizedString
currently associated with this
ProgressHandle
.public void setTask(LocalizedString task)
public void setIndeterminate(boolean indeterminate)
public void setProgress(int currentProgress)
public boolean isIndeterminate()
public int getProgress()
public LocalizedString getName()
public void start()
public void stop()
public void addProgressListener(ActionListener<ProgressHandle.Status> listener)
public void removeProgressListener(ActionListener<ProgressHandle.Status> listener)
Copyright © 2014. All rights reserved.