|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jeta.open.support.CompositeComponentFinder
public class CompositeComponentFinder
A component finder that is composed of multipe component finders. This is very useful for Frames that contain multiple containers with components that have the same command. For example, you might have a menu item, toolbar button, and popup menu item that have the same cut, copy, and paste commands. These commands should route to the same action listener in the controller. To handle this case, use a CompositeComponentFinder which is composed of a finder for the menu, toolbar, and popup. You can then define your Frame as a JETAContainer and delegate the most of the JETAContainer methods to this finder.
Constructor Summary | |
---|---|
CompositeComponentFinder()
Constructor |
|
CompositeComponentFinder(ComponentFinder finder)
Constructor |
Method Summary | |
---|---|
void |
add(ComponentFinder finder)
Adds a finder to this composite. |
void |
enableComponent(String commandId,
boolean bEnable)
Enables/Disables the component associated with the commandid |
Collection |
getAllNamedComponents()
Recursively searches an associated parent container for all components that are named. |
Component |
getComponentByName(String compName)
Since we have multiple finders, the only approach we can take is to return the first component found. |
Collection |
getComponentsByName(String compName)
Recursively searches an associated parent container for all components with the given name. |
Collection |
getFinders()
Return a collection of ComponentFinder instances that are contained by this composite. |
void |
reset()
Tells the implementation that any cached components should be flushed and reloaded because the parent container might have changed. |
void |
setVisible(String commandId,
boolean bVisible)
Shows/Hides the component associated with the commandid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeComponentFinder()
public CompositeComponentFinder(ComponentFinder finder)
Method Detail |
---|
public void add(ComponentFinder finder)
public void enableComponent(String commandId, boolean bEnable)
commandId
- the id of the command whose button to enable/disablebEnable
- true/false to enable/disablepublic Component getComponentByName(String compName)
getComponentByName
in interface ComponentFinder
public Collection getComponentsByName(String compName)
getComponentsByName
in interface ComponentFinder
public Collection getFinders()
public void reset()
reset
in interface ComponentFinder
public void setVisible(String commandId, boolean bVisible)
commandId
- the id of the command whose button to enable/disablebVisible
- show/hide the component/disablepublic Collection getAllNamedComponents()
getAllNamedComponents
in interface ComponentFinder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |