|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.SwingWorker
com.partnersoft.gui.ProgressBar
public abstract class ProgressBar
Simpler Progress Bar. Extend this class, putting all work to monitor in doInBackground(). Remember to call setProgress() as work is completed. showBar() and hideBar() are helpers to display a JFrame with this progress bar in it. They can be called from within doInBackground().
Copyright 2008 Partner Software, Inc.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.SwingWorker |
|---|
javax.swing.SwingWorker.StateValue |
| Constructor Summary | |
|---|---|
ProgressBar()
Creates a new InspectionProgressBar. |
|
ProgressBar(int min,
int max,
boolean paintStrings)
Creates a new InspectionProgressBar. |
|
| Method Summary | |
|---|---|
protected abstract java.lang.Object |
doInBackground()
This method must contain the work this progress bar will monitor. |
javax.swing.JFrame |
getBarDialog()
Returns the JFrame used to display JProgressBar by this class. |
javax.swing.JProgressBar |
getGui()
Returns the progress bar. |
void |
hideBar()
Hides the internal JFrame containing our progress bar. |
void |
propertyChange(java.beans.PropertyChangeEvent evt)
Updates the progress bar from our doInBackground() |
void |
runTask()
Starts the task that is being monitored. |
void |
setIndeterminate(boolean isIndeterminate)
Sets indeterminate mode. |
void |
showBar(java.lang.String title)
Displays a JFrame with the specified title containing our JProgressBar. |
void |
showBar(java.lang.String title,
javax.swing.JComponent gui)
Displays a JFrame with the specified title and gui contents. |
void |
showBar(java.lang.String title,
javax.swing.JComponent gui,
int x,
int y)
Displays a JFrame with the specified title and gui contents. |
void |
showBar(java.lang.String title,
javax.swing.JComponent gui,
int x,
int y,
int width,
int height)
Displays a JFrame with the specified title and gui contents. |
void |
showBar(java.lang.String title,
javax.swing.JComponent gui,
MapApp centerOnApp,
int width,
int height)
Displays a JFrame with the specified title, centered on the passed MapApp's gui window center. |
| Methods inherited from class javax.swing.SwingWorker |
|---|
addPropertyChangeListener, cancel, done, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProgressBar(int min,
int max,
boolean paintStrings)
min - - value to start progress at.max - - max value for progress.paintStrings - - if true, % complete is drawn on bar.public ProgressBar()
| Method Detail |
|---|
protected abstract java.lang.Object doInBackground()
throws java.lang.Exception
doInBackground in class javax.swing.SwingWorkerjava.lang.Exceptionpublic final void runTask()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange in interface java.beans.PropertyChangeListenerpublic javax.swing.JProgressBar getGui()
public void hideBar()
public void setIndeterminate(boolean isIndeterminate)
isIndeterminate - - if true, sets progress bar to indeterminate, determinate mode otherwise.
public void showBar(java.lang.String title,
javax.swing.JComponent gui)
title - - Title for JFramegui - - Contents for JFramepublic void showBar(java.lang.String title)
title - - title for JFrame.public javax.swing.JFrame getBarDialog()
public void showBar(java.lang.String title,
javax.swing.JComponent gui,
int x,
int y)
title - - title of JFramegui - - gui contents for JFramex - - screen x location for JFramey - - screen y location for JFrame
public void showBar(java.lang.String title,
javax.swing.JComponent gui,
int x,
int y,
int width,
int height)
title - - title of JFramegui - - gui contents for JFramex - - screen x location for JFramey - - screen y location for JFramewidth - - width in pixelsheight - - height in pixels
public void showBar(java.lang.String title,
javax.swing.JComponent gui,
MapApp centerOnApp,
int width,
int height)
title - - title of JFramegui - - gui contents for JFramecenterOnApp - - MapApp of the viewer instance to center on.width - - width in pixelsheight - - height in pixels
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||