|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.event.GuiseBoundPropertyObject
com.guiseframework.model.ui.AbstractPresentationModel
com.guiseframework.component.AbstractComponent
com.guiseframework.component.AbstractCompositeComponent
com.guiseframework.component.AbstractMultipleCompositeComponent
com.guiseframework.component.AbstractListCompositeComponent
com.guiseframework.component.AbstractLayoutComponent
com.guiseframework.component.AbstractContainer
public abstract class AbstractContainer
Abstract implementation of a container component. Iterating over child components is thread safe.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.guiseframework.component.AbstractComponent |
|---|
AbstractComponent.AbstractFlyoverFrameStrategy<S extends Component>, AbstractComponent.AbstractFlyoverStrategy<S extends Component>, AbstractComponent.DefaultFlyoverStrategy<S extends Component> |
| Nested classes/interfaces inherited from interface com.guiseframework.component.Component |
|---|
Component.FlyoverStrategy<S extends Component> |
| Field Summary |
|---|
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Fields inherited from interface com.guiseframework.component.LayoutComponent |
|---|
LAYOUT_PROPERTY, LAYOUT_THEME_APPLIED_PROPERTY |
| Fields inherited from interface com.guiseframework.component.Component |
|---|
BOOKMARK_ENABLED_PROPERTY, CONSTRAINTS_PROPERTY, DRAG_ENABLED_PROPERTY, DROP_ENABLED_PROPERTY, FLYOVER_ENABLED_PROPERTY, FLYOVER_STRATEGY_PROPERTY, INPUT_STRATEGY_PROPERTY, NAME_PROPERTY, NOTIFICATION_PROPERTY, ORIENTATION_PROPERTY, THEME_APPLIED_PROPERTY, VALID_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Displayable |
|---|
DISPLAYED_PROPERTY |
| Fields inherited from interface com.guiseframework.model.InfoModel |
|---|
DESCRIPTION_CONTENT_TYPE_PROPERTY, DESCRIPTION_PROPERTY, INFO_CONTENT_TYPE_PROPERTY, INFO_PROPERTY |
| Fields inherited from interface com.guiseframework.model.LabelModel |
|---|
GLYPH_URI_PROPERTY, LABEL_CONTENT_TYPE_PROPERTY, LABEL_PROPERTY |
| Fields inherited from interface com.guiseframework.model.Model |
|---|
PLAIN_TEXT_CONTENT_TYPE, XHTML_CONTENT_TYPE, XHTML_FRAGMENT_CONTENT_TYPE |
| Constructor Summary | |
|---|---|
AbstractContainer(InfoModel infoModel,
Layout<? extends Constraints> layout)
Info model and layout constructor. |
|
AbstractContainer(Layout<? extends Constraints> layout)
Layout constructor with a default info model. |
|
| Method Summary | ||
|---|---|---|
boolean |
add(Component component)
Adds a component with default constraints to the container. |
|
boolean |
add(Component component,
Constraints constraints)
Adds a component along with constraints to the container. |
|
void |
add(int index,
Component component)
Adds a child component with default constraints to the container at the specified index. |
|
void |
add(int index,
Component component,
Constraints constraints)
Adds a component along with constraints to the container at the specified index. |
|
Component |
add(int index,
Prototype prototype)
Adds a component based upon the given prototype to the container with default constraints at the specified index. |
|
Component |
add(int index,
Prototype prototype,
Constraints constraints)
Adds a component based upon the given prototype to the container along with constraints at the specified index. |
|
Component |
add(Prototype prototype)
Adds a component based upon the given prototype to the container with default constraints. |
|
Component |
add(Prototype prototype,
Constraints constraints)
Adds a component based upon the given prototype to the container along with constraints. |
|
void |
clear()
Removes all of the components from this container. |
|
boolean |
contains(java.lang.Object component)
Determines whether this container contains the given component. |
|
Component |
createComponent(Prototype prototype)
Creates a component appropriate for the context of this component from the given prototype. |
|
Component |
get(int index)
Returns the component at the specified index in the container. |
|
java.util.List<Component> |
getChildComponents()
Returns a list of children. |
|
int |
indexOf(java.lang.Object component)
Returns the index in the container of the first occurrence of the specified component. |
|
boolean |
isEmpty()
|
|
java.util.Iterator<Component> |
iterator()
|
|
int |
lastIndexOf(java.lang.Object component)
Returns the index in this container of the last occurrence of the specified component. |
|
Component |
remove(int index)
Removes the child component at the specified position in this container. |
|
boolean |
remove(java.lang.Object componentObject)
Removes a component from the container. |
|
void |
setChildren(java.util.List<Component> children)
Sets the children in this container. |
|
|
setLayout(Layout<T> newLayout)
Sets the layout definition for the component. |
|
int |
size()
|
|
| Methods inherited from class com.guiseframework.component.AbstractLayoutComponent |
|---|
addComponent, applyTheme, applyTheme, getLayout, isLayoutThemeApplied, removeComponent, resetTheme, setLayoutThemeApplied, updateTheme |
| Methods inherited from class com.guiseframework.component.AbstractListCompositeComponent |
|---|
addComponent, getComponentList, hasChildComponents |
| Methods inherited from class com.guiseframework.event.GuiseBoundPropertyObject |
|---|
getSession |
| Methods inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.guiseframework.component.LayoutComponent |
|---|
getLayout, isLayoutThemeApplied, setLayoutThemeApplied |
| Methods inherited from interface com.guiseframework.component.CompositeComponent |
|---|
addCompositeComponentListener, hasChildComponents, removeCompositeComponentListener |
| Methods inherited from interface com.guiseframework.platform.DepictedObject |
|---|
depict, getDepictID, getSession, processEvent |
| Methods inherited from interface com.guiseframework.model.InfoModel |
|---|
getDescription, getDescriptionContentType, getInfo, getInfoContentType, setDescription, setDescriptionContentType, setInfo, setInfoContentType |
| Methods inherited from interface com.guiseframework.model.LabelModel |
|---|
getGlyphURI, getLabel, getLabelContentType, setGlyphURI, setLabel, setLabelContentType |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.beans.PropertyConstrainable |
|---|
addVetoableChangeListener, addVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, hasVetoableChangeListeners, removeVetoableChangeListener, removeVetoableChangeListener |
| Constructor Detail |
|---|
public AbstractContainer(Layout<? extends Constraints> layout)
layout - The layout definition for the container.
java.lang.NullPointerException - if the given layout is null.
public AbstractContainer(InfoModel infoModel,
Layout<? extends Constraints> layout)
infoModel - The component info model.layout - The layout definition for the container.
java.lang.NullPointerException - if the given info model and/or layout is null.| Method Detail |
|---|
public int size()
size in interface Containersize in class AbstractListCompositeComponentpublic boolean isEmpty()
isEmpty in interface ContainerisEmpty in class AbstractListCompositeComponentpublic boolean contains(java.lang.Object component)
contains in interface Containercontains in class AbstractListCompositeComponentcomponent - The component to check.
true if this container contains the given component.public int indexOf(java.lang.Object component)
indexOf in interface ContainerindexOf in class AbstractListCompositeComponentcomponent - The component the index of which should be returned.
public int lastIndexOf(java.lang.Object component)
lastIndexOf in interface ContainerlastIndexOf in class AbstractListCompositeComponentcomponent - The component the last index of which should be returned.
public Component get(int index)
get in interface Containerget in class AbstractListCompositeComponentindex - The index of the component to return.
java.lang.IndexOutOfBoundsException - if the index is out of range.
public void add(int index,
Component component)
index - The index at which the component should be added.component - The component to add to this container.
java.lang.IllegalArgumentException - if the component already has a parent.
java.lang.IllegalStateException - if the installed layout does not support default constraints.
java.lang.IndexOutOfBoundsException - if the index is less than zero or greater than the number of child components.public boolean add(Component component)
add in interface Containercomponent - The component to add to this container.
true if this container changed as a result of the operation.
java.lang.IllegalArgumentException - if the component already has a parent.
java.lang.IllegalStateException - if the installed layout does not support default constraints.
public void add(int index,
Component component,
Constraints constraints)
add in interface Containerindex - The index at which the component should be added.component - The component to add to this container.constraints - The constraints for the layout, or null if default constraints should be used.
java.lang.IllegalArgumentException - if the component already has a parent.
java.lang.ClassCastException - if the provided constraints are not appropriate for the installed layout.
java.lang.IllegalStateException - if no constraints were provided and the installed layout does not support default constraints.
java.lang.IndexOutOfBoundsException - if the index is less than zero or greater than the number of child components.
public boolean add(Component component,
Constraints constraints)
add in interface Containercomponent - The component to add to this container.constraints - The constraints for the layout, or null if default constraints should be used.
true if this container changed as a result of the operation.
java.lang.IllegalArgumentException - if the component already has a parent.
java.lang.ClassCastException - if the provided constraints are not appropriate for the installed layout.
java.lang.IllegalStateException - if no constraints were provided and the installed layout does not support default constraints.
public Component add(int index,
Prototype prototype)
add(int, Component).
add in interface Containerindex - The index at which the component should be added.prototype - The prototype of the component to add.
java.lang.IllegalArgumentException - if no component can be created from the given prototype
java.lang.IllegalStateException - if the installed layout does not support default constraints.
java.lang.IndexOutOfBoundsException - if the index is less than zero or greater than the number of child components.createComponent(Prototype)public Component add(Prototype prototype)
add(Component).
add in interface Containerprototype - The prototype of the component to add.
java.lang.IllegalArgumentException - if no component can be created from the given prototype
java.lang.IllegalStateException - if the installed layout does not support default constraints.createComponent(Prototype)
public Component add(int index,
Prototype prototype,
Constraints constraints)
add(int, Component, Constraints).
add in interface Containerindex - The index at which the component should be added.prototype - The prototype of the component to add.constraints - The constraints for the layout, or null if default constraints should be used.
java.lang.IllegalArgumentException - if no component can be created from the given prototype
java.lang.ClassCastException - if the provided constraints are not appropriate for the installed layout.
java.lang.IllegalStateException - if no constraints were provided and the installed layout does not support default constraints.
java.lang.IndexOutOfBoundsException - if the index is less than zero or greater than the number of child components.createComponent(Prototype)
public Component add(Prototype prototype,
Constraints constraints)
add(Component, Constraints).
add in interface Containerprototype - The prototype of the component to add.constraints - The constraints for the layout, or null if default constraints should be used.
java.lang.IllegalArgumentException - if no component can be created from the given prototype
java.lang.ClassCastException - if the provided constraints are not appropriate for the installed layout.
java.lang.IllegalStateException - if no constraints were provided and the installed layout does not support default constraints.createComponent(Prototype)public Component createComponent(Prototype prototype)
ActionPrototypeButtonLabelPrototypeLabelMenuPrototypeDropMenuTogglePrototypeBooleanSelectButtonValuePrototype<Boolean>CheckControlValuePrototype<Number> with installed RangeValidatorSliderControlValuePrototype<?>TextControl
prototype - The prototype of the component to create.
java.lang.IllegalArgumentException - if no component can be created from the given prototypepublic boolean remove(java.lang.Object componentObject)
remove in interface ContainercomponentObject - The component to remove.
true if this collection changed as a result of the operation.
java.lang.ClassCastException - if given element is not a component.
java.lang.IllegalArgumentException - if the component is not a member of the container.public Component remove(int index)
remove in interface Containerindex - The index of the component to removed.
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).public void clear()
clear in interface Containerpublic java.util.Iterator<Component> iterator()
iterator in interface java.lang.Iterable<Component>public java.util.List<Component> getChildComponents()
#setChildren() provides a children property for alternate children access.
getChildComponents in interface CompositeComponentgetChildComponents in class AbstractListCompositeComponentiterator()public void setChildren(java.util.List<Component> children)
getChildComponents() provides a children property for alternate children access.
children - The new children for this container in order.clear(),
add(Component)public <T extends Constraints> void setLayout(Layout<T> newLayout)
setLayout in interface ContainersetLayout in class AbstractLayoutComponentnewLayout - The new layout definition for the container.
java.lang.NullPointerException - if the given layout is null.LayoutComponent.LAYOUT_PROPERTY,
#setPropertiesInitialized(boolean)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||