QJCC homepage

biz.chitec.quarterback.swing
Class DynamicMenuBar.MenuMaker

java.lang.Object
  extended bybiz.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)


Field Summary
private  boolean callbuild
           
private  boolean callcheckenabled
           
 
Constructor Summary
private DynamicMenuBar.MenuMaker()
           
 
Method Summary
 void build()
           
 void checkEnabled()
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

callbuild

private boolean callbuild

callcheckenabled

private boolean callcheckenabled
Constructor Detail

DynamicMenuBar.MenuMaker

private DynamicMenuBar.MenuMaker()
Method Detail

build

public void build()

checkEnabled

public void checkEnabled()

run

public void run()
Specified by:
run in interface java.lang.Runnable

QJCC homepage