QJCC homepage

biz.chitec.quarterback.swing
Class DynamicMenuBar.MenuElement

java.lang.Object
  extended bybiz.chitec.quarterback.swing.DynamicMenuBar.MenuElement
Direct Known Subclasses:
DynamicMenuBar.ActionMenuElement, DynamicMenuBar.GroupMenuElement, DynamicMenuBar.SeparatorMenuElement, DynamicMenuBar.SimpleMenuMenuElement
Enclosing class:
DynamicMenuBar

protected abstract class DynamicMenuBar.MenuElement
extends java.lang.Object

Logical menu element. Can be any thing, from simple, action-driven menu element up to multi-structured data like the provider menu. MenuElements are mainly driven imperatively, they do not return result values in the deeper sense.


Constructor Summary
protected DynamicMenuBar.MenuElement()
           
 
Method Summary
 java.awt.Container add(java.awt.Component[] cm, java.awt.Container c)
          Adds the given components to the container.
 java.awt.Container add(java.awt.Container c)
          Add anything to the given Container if this is needed.
 void checkEnabled()
          Enforce an enabled check for all components generated by this menu element.
abstract  java.awt.Component[] getElements()
          Return all components generated by this menu element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicMenuBar.MenuElement

protected DynamicMenuBar.MenuElement()
Method Detail

add

public final java.awt.Container add(java.awt.Component[] cm,
                                    java.awt.Container c)
Adds the given components to the container. Used with the results of getElements. If the addition does not contain additional handling steps, the combined addition method can be used.

Parameters:
cm - Components to add. May be null.
c - Container to add to
Returns:
Same container, potentially with one or more added components

add

public final java.awt.Container add(java.awt.Container c)
Add anything to the given Container if this is needed.

Parameters:
c - Container to add to
Returns:
Same container, potentially with one or more added components

getElements

public abstract java.awt.Component[] getElements()
Return all components generated by this menu element. One element can create multiple components.

Returns:
Array of components or null if no components have been created

checkEnabled

public void checkEnabled()
Enforce an enabled check for all components generated by this menu element. The element can go through all its created components and set or reset their enabled state.


QJCC homepage