|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.gui.swing.worker.BlockingSwingWorker
This is a variant of the SwingWorker It works in conjunction with the GlassPane class to allow users to execute timeconsuming task on a separate thread The GlassPane addition can prevent users from executing another SwingWorker task while one SwingWorker task is already executing. A message popup to provide an explaination for the long wait and beep on click capability can be also requested
Constructor Summary | |
BlockingSwingWorker(java.awt.Component aComponent)
Start a thread that will call the construct method and then exit. |
|
BlockingSwingWorker(java.awt.Component aComponent,
java.lang.String title,
java.lang.String message,
boolean beep)
Start a thread that will call the construct method and then exit. |
Method Summary | |
protected abstract void |
doNonUILogic()
This method will be implemented by the inner class of SwingWorker It should only consist of the logic that's unrelated to UI |
protected void |
doUIUpdateLogic()
This method will be implemented by the inner class of SwingWorker It should only consist of the logic that's related to UI updating, after the doNonUILogic() method is done. |
protected void |
finished()
Called on the event dispatching thread (not on the worker thread) after the construct method has returned. |
protected java.awt.Component |
getAComponent()
Getter method |
protected GlassPane |
getGlassPane()
Getter method |
void |
interrupt()
A new method that interrupts the worker thread. |
protected void |
setAComponent(java.awt.Component newAComponent)
Setter method |
protected void |
setGlassPane(GlassPane newGlassPane)
Setter method |
void |
start()
Start the worker thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BlockingSwingWorker(java.awt.Component aComponent)
construct
method and then exit. No message
nor beeps will be activated
aComponent
- a reference to the UI component that's directly using SwingWorkerpublic BlockingSwingWorker(java.awt.Component aComponent, java.lang.String title, java.lang.String message, boolean beep)
construct
method and then exit.
aComponent
- a reference to the UI component that's directly using SwingWorkertitle
- DOCUMENT ME!message
- if non null, a pupup showing the message will appar while the worker is
performing the long taskbeep
- if true, when the user clicks on the blocked user interface or pressed a key, a
beep will be produced using the standard operating system beepMethod Detail |
protected abstract void doNonUILogic() throws java.lang.RuntimeException
java.lang.RuntimeException
- thrown if there are any errors in the non-ui logicprotected void doUIUpdateLogic() throws java.lang.RuntimeException
java.lang.RuntimeException
- thrown if there are any problems executing the ui update logicprotected void finished()
construct
method has returned.
protected java.awt.Component getAComponent()
protected GlassPane getGlassPane()
public void interrupt()
protected void setAComponent(java.awt.Component newAComponent)
newAComponent
- java.awt.Componentprotected void setGlassPane(GlassPane newGlassPane)
newGlassPane
- GlassPanepublic void start()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |