|
2004.04.29 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.jdc.gui.html.ProgressBar
ProgressBar creates the HTML required to display the progress of a
CPU-intensive task for a web application. This allows the web application to
provide an indication of the progress of the task to the user at specified intervals.
z-index to 100.
The position and appearance of the progress bar are controlled via the following
CSS styles:
In <head> section of the JSP page, add code similar to the following:
<% if (progressBar != null)
{ %>
<%= progressBar.getRefresh() %>
<%= progressBar.getStyles () %>
<% } %>
Note: Invoking getStyles() is optional. The required styles (see
above) may be contained in an external style sheet.
In <body> section of the JSP page, add code similar to the following:
<% if (progressBar != null)
{ %>
<%= progressBar //.toString() %>
<% } %>
This will invoke the toString() method of ProgressBar to
create the required HTML.
Reference: JSP Progress Bars
| Field Summary | |
static int |
MAXIMUM_INCREMENT
The maximum progress bar percentage complete increment. |
static int |
MINIMUM_INCREMENT
The minimum progress bar percentage complete increment. |
| Constructor Summary | |
ProgressBar()
Constructs a new ProgressBar object. |
|
| Method Summary | |
void |
addPercentComplete(int increment)
Adds to (increments) the progress bar percentage complete for the task. |
String |
getCurrentActivity()
Returns the current activity in progress for the task. |
String |
getCurrentStatus()
Returns the current status for the activity in progress for the task. |
int |
getIncrement()
Returns the progress bar percentage complete increment. |
int |
getPercentComplete()
Returns the progress bar percentage complete for the task. |
String |
getRefresh()
Returns the HTML meta tag that will automatically refresh, i.e. |
String |
getStyle()
Returns the <div> CSS style for the progress bar. |
String |
getStyles()
Returns the CSS styles for the progress bar. |
Object |
getTask()
Returns a reference to the object controlling the task for this progress bar. |
boolean |
isComplete()
Returns true if the progress bar is complete. |
void |
setColor(String barColor)
Sets the progress bar color. |
void |
setCurrentActivity(String currentActivity)
Sets the current activity in progress for the task. |
void |
setCurrentStatus(String currentStatus)
Sets the current status for the activity in progress for the task. |
void |
setHeight(int height)
Sets the height of the progress bar as a percentage or in pixels. |
void |
setIncrement(int progressIncrement)
Sets the progress bar percentage complete increment. |
void |
setLeft(int left)
Sets the position of the progress bar relative to the left-hand side of the page as a percentage or in pixels. |
void |
setPercentComplete(int percentComplete)
Sets the progress bar percentage complete for the task. |
void |
setRefreshInterval(int refreshInterval)
Sets the progress bar refresh interval (in seconds). |
void |
setRefreshURL(String refreshURL)
Sets the Uniform Resource Locator (URL) to forward to in order to recalculate the progress of the task and refresh the progress bar. |
void |
setTask(Object taskObject)
Sets the reference to the object controlling the task for this progress bar. |
void |
setTop(int top)
Sets the position of the progress bar relative to the top of the page as a percentage or in pixels. |
void |
setWidth(int width)
Sets the width of the progress bar as a percentage or in pixels. |
String |
toString()
Returns the progress bar. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MINIMUM_INCREMENT
public static final int MAXIMUM_INCREMENT
| Constructor Detail |
public ProgressBar()
ProgressBar object.
| Method Detail |
public void addPercentComplete(int increment)
public String getCurrentActivity()
public String getCurrentStatus()
public int getIncrement()
public int getPercentComplete()
public String getRefresh()
meta tag that will automatically refresh, i.e.
reload, the page from the specified URL after the specified refresh interval.
meta tag that will refresh the page.public String getStyle()
public String getStyles()
public Object getTask()
public boolean isComplete()
true if the progress bar is complete.
True if the progress bar is complete.
False if the progress bar is not complete.public void setColor(String barColor)
public void setCurrentActivity(String currentActivity)
public void setCurrentStatus(String currentStatus)
public void setHeight(int height)
public void setIncrement(int progressIncrement)
public void setLeft(int left)
public void setPercentComplete(int percentComplete)
public void setRefreshInterval(int refreshInterval)
public void setRefreshURL(String refreshURL)
public void setTask(Object taskObject)
public void setTop(int top)
public void setWidth(int width)
public String toString()
toString in class Object
|
2004.04.29 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||