|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jeta.open.support.DefaultComponentFinder
public class DefaultComponentFinder
Interface used to define a service for locating child components within a container that have a given name. Specialized implementations of this interface are responsible for managing the parent container assocation.
Constructor Summary | |
---|---|
DefaultComponentFinder(Container parent)
ctor |
Method Summary | |
---|---|
protected void |
buildNames(Container container)
Recursively searches all Components owned by this container. |
void |
componentAdded(ContainerEvent e)
A component was added to the container |
void |
componentRemoved(ContainerEvent e)
A component was remove from the container |
void |
enableComponent(String commandId,
boolean bEnable)
Enables/Disables the menu/toolbar button associated with the commandid |
Collection |
getAllNamedComponents()
Recursively searches an associated parent container for all components that are named. |
Component |
getComponentByName(String componentName)
Recursively searches an associated parent container for a component with the given name. |
Collection |
getComponentsByName(String compName)
Recursively searches an associated parent container for all components with the given name. |
Container |
getContainer()
Returns the container associated with this component finder. |
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 menu/toolbar button associated with the commandid |
void |
unregisterComponent(Component c)
Tells the implementation that any cached components should be flushed and reloaded because the parent container might have changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultComponentFinder(Container parent)
Method Detail |
---|
protected void buildNames(Container container)
container
- the container to searchpublic void componentAdded(ContainerEvent e)
componentAdded
in interface ContainerListener
public void componentRemoved(ContainerEvent e)
componentRemoved
in interface ContainerListener
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 componentName)
ComponentFinder
getComponentByName
in interface ComponentFinder
public Collection getComponentsByName(String compName)
getComponentsByName
in interface ComponentFinder
public Container getContainer()
public void unregisterComponent(Component c)
public void setVisible(String commandId, boolean bVisible)
commandId
- the id of the command whose button to enable/disablebVisible
- show/hide the component/disablepublic void reset()
reset
in interface ComponentFinder
public Collection getAllNamedComponents()
getAllNamedComponents
in interface ComponentFinder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |