| java.lang.Object com.jeta.open.support.CompositeComponentFinder
CompositeComponentFinder | public class CompositeComponentFinder implements ComponentFinder(Code) | | 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.
author: Jeff Tassin |
Method Summary | |
public void | add(ComponentFinder finder) Adds a finder to this composite. | public void | enableComponent(String commandId, boolean bEnable) | public Collection | getAllNamedComponents() Recursively searches an associated parent container for all components
that are named. | public Component | getComponentByName(String compName) Since we have multiple finders, the only approach we can take is to
return the first component found. | public Collection | getComponentsByName(String compName) Recursively searches an associated parent container for all components
with the given name. | public Collection | getFinders() Return a collection of ComponentFinder instances that are contained by
this composite. | public void | reset() Tells the implementation that any cached components should be flushed and
reloaded because the parent container might have changed. | public void | setVisible(String commandId, boolean bVisible) |
CompositeComponentFinder | public CompositeComponentFinder()(Code) | | Constructor
|
enableComponent | public void enableComponent(String commandId, boolean bEnable)(Code) | | Enables/Disables the component associated with the commandid
Parameters: commandId - the id of the command whose button to enable/disable Parameters: bEnable - true/false to enable/disable |
getAllNamedComponents | public Collection getAllNamedComponents()(Code) | | Recursively searches an associated parent container for all components
that are named. An empty collection is returned if no names components
exist.
a collection of all named Component objects. |
getComponentByName | public Component getComponentByName(String compName)(Code) | | Since we have multiple finders, the only approach we can take is to
return the first component found.
|
getComponentsByName | public Collection getComponentsByName(String compName)(Code) | | Recursively searches an associated parent container for all components
with the given name. An empty collection is returned if no components are
found with the given name.
|
getFinders | public Collection getFinders()(Code) | | Return a collection of ComponentFinder instances that are contained by
this composite.
the collection of ComponentFinder instances owned by thiscomposite. |
reset | public void reset()(Code) | | Tells the implementation that any cached components should be flushed and
reloaded because the parent container might have changed.
|
setVisible | public void setVisible(String commandId, boolean bVisible)(Code) | | Shows/Hides the component associated with the commandid
Parameters: commandId - the id of the command whose button to enable/disable Parameters: bVisible - show/hide the component/disable |
|
|