biz.chitec.quarterback.swing
Class DynamicMenuBar.MenuMaker
java.lang.Object
biz.chitec.quarterback.swing.DynamicMenuBar.MenuMaker
- All Implemented Interfaces:
- java.lang.Runnable
- Enclosing class:
- DynamicMenuBar
- private class DynamicMenuBar.MenuMaker
- extends java.lang.Object
- implements java.lang.Runnable
Extra management class for delayed operation.
MainMenuBarHandler reacts on property changes. Those can arise multiple times within the same event handler.
To prevent the menu from being created multiple times with the same data, reaction is delayed into a new
event which is raised here - but only if it has not already been scheduled. This way the events are coaleced
within the menu bar handler. Fortunately, nothing will work in parallel, anyhow. It's just delayed execution
in the same thread.
build() and setOrg() can be called an arbitrary amount of times until run() is actually executed.
In any case, at most one of the operations is performed. Under certain conditions build() will be
called even if only setOrg() has been requested (org is set or removed completely)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
callbuild
private boolean callbuild
callcheckenabled
private boolean callcheckenabled
DynamicMenuBar.MenuMaker
private DynamicMenuBar.MenuMaker()
build
public void build()
checkEnabled
public void checkEnabled()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable