|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.bielefeld.umweltamt.aui.utils.SwingWorkerVariant
public abstract class SwingWorkerVariant
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 Ein bisschen von mir ans AUI-K angepasst und modifiziert um HibernateExceptions korrekt zu fangen.
Field Summary | |
---|---|
protected boolean |
fatalError
|
Constructor Summary | |
---|---|
SwingWorkerVariant(java.awt.Component aComponent)
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 abstract 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 |
Field Detail |
---|
protected boolean fatalError
Constructor Detail |
---|
public SwingWorkerVariant(java.awt.Component aComponent)
construct
method
and then exit.
aComponent
- a reference to the UI component that's directly using
SwingWorkerMethod Detail |
---|
protected abstract void doNonUILogic() throws java.lang.RuntimeException
java.lang.RuntimeException
- thrown if there are any errors in the non-ui logicprotected abstract 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 |