|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.guiseframework.component.Components
public class Components
Utility methods for working with components.
| Constructor Summary | |
|---|---|
Components()
|
|
| Method Summary | ||
|---|---|---|
static
|
getChildComponents(CompositeComponent compositeComponent,
java.lang.Class<C> componentClass,
T componentCollection,
boolean deep,
boolean below)
Retrieves all child components that are instances of the of the given class. |
|
static java.util.Collection<Component> |
getComponents(Component component)
Retrieves all components, including the given component and all descendant components. |
|
static
|
getComponents(Component component,
java.lang.Class<C> componentClass,
T componentCollection,
boolean deep,
boolean below)
Retrieves all components, including the given component, that are instances of the of the given class. |
|
static
|
getComponents(Component component,
T componentCollection)
Retrieves all components, including the given component and all descendant components. |
|
static java.util.Collection<Component> |
getDescendantComponents(CompositeComponent compositeComponent)
Retrieves all descendant components. |
|
static
|
getDescendantComponents(CompositeComponent compositeComponent,
T componentCollection)
Retrieves all descendant components. |
|
static boolean |
hasChildComponent(CompositeComponent compositeComponent,
Component component)
Determines if the given composite component has the given component as one of its descendants. |
|
static boolean |
hasChildComponent(CompositeComponent compositeComponent,
Component component,
boolean deep)
Determines if the given composite component has the given component as one of its descendants. |
|
static boolean |
hasComponent(Component component,
Component hasComponent)
Determines if the given component is or has as a descendant the given other component. |
|
static boolean |
hasComponent(Component component,
Component hasComponent,
boolean deep)
Determines if the given component is or has as a descendant the given other component. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Components()
| Method Detail |
|---|
public static java.util.Collection<Component> getComponents(Component component)
component - The component to search.
java.lang.NullPointerException - if the given component is null.
public static <T extends java.util.Collection<Component>> T getComponents(Component component,
T componentCollection)
component - The component to search.componentCollection - The collection into which the components will be collected.
java.lang.NullPointerException - if the given component and/or collection is null.
public static <C,T extends java.util.Collection<C>> T getComponents(Component component,
java.lang.Class<C> componentClass,
T componentCollection,
boolean deep,
boolean below)
true, the component's child components are recursively searched if the component is a composite component.
If below is set to true, the child components of any composite component that is an instance of the given class are also recursively searched.
component - The component to search.componentClass - The type of component to retrieve.componentCollection - The collection into which the components will be collected.deep - true if the children of composite components should resursively be searched.below - true if the children of composite components that are instances of the given class should resursively be searched, if deep is set to true.
java.lang.NullPointerException - if the given component, component class, and/or collection is null.public static java.util.Collection<Component> getDescendantComponents(CompositeComponent compositeComponent)
component - The component to search.
java.lang.NullPointerException - if the given component is null.
public static <T extends java.util.Collection<Component>> T getDescendantComponents(CompositeComponent compositeComponent,
T componentCollection)
compositeComponent - The component to search.componentCollection - The collection into which the components will be collected.
java.lang.NullPointerException - if the given component and/or collection is null.
public static <C,T extends java.util.Collection<C>> T getChildComponents(CompositeComponent compositeComponent,
java.lang.Class<C> componentClass,
T componentCollection,
boolean deep,
boolean below)
true, a component's child components are recursively searched if that component is a composite component.
If below is set to true, the child components of any composite component that is an instance of the given class are also recursively searched.
compositeComponent - The component to search.componentClass - The type of component to retrieve.componentCollection - The collection into which the components will be collected.deep - true if the children of composite components should resursively be searched.below - true if the children of composite components that are instances of the given class should resursively be searched, if deep is set to true.
java.lang.NullPointerException - if the given component, component class, and/or collection is null.
public static boolean hasComponent(Component component,
Component hasComponent)
component - The component to search.hasComponent - The component to find.
true if the given component is the composite component or is a descendant of the given composite component.
java.lang.NullPointerException - if one of the given components is null.
public static boolean hasComponent(Component component,
Component hasComponent,
boolean deep)
component - The component to search.hasComponent - The component to find.deep - true if the children of composite components should resursively be searched.
true if the given component is the composite component or is a descendant of the given composite component.
java.lang.NullPointerException - if one of the given components is null.
public static boolean hasChildComponent(CompositeComponent compositeComponent,
Component component)
compositeComponent - The component to search.component - The component to find.
java.lang.NullPointerException - if the given composite component or component is null.
public static boolean hasChildComponent(CompositeComponent compositeComponent,
Component component,
boolean deep)
compositeComponent - The component to search.component - The component to find.deep - true if the children of composite components should resursively be searched.
java.lang.NullPointerException - if the given composite component or component is null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||