|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Container
Component that allows for addition and removal of child components.
A layout component is iterable over its child components, and can be used in short for(:) form.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.guiseframework.component.Component |
|---|
Component.FlyoverStrategy<S extends Component> |
| Field Summary |
|---|
| 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 |
| 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,
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 |
get(int index)
Returns the component at the specified index in the container. |
|
int |
indexOf(java.lang.Object component)
Returns the index in the container of the first occurrence of the specified component. |
|
boolean |
isEmpty()
|
|
int |
lastIndexOf(java.lang.Object component)
Returns the index in this container of the last occurrence of the specified compoent. |
|
Component |
remove(int index)
Removes the child component at the specified position in this container. |
|
boolean |
remove(java.lang.Object component)
Removes a component from the container. |
|
|
setLayout(Layout<T> newLayout)
Sets the layout definition for the container. |
|
int |
size()
|
|
| Methods inherited from interface com.guiseframework.component.LayoutComponent |
|---|
getLayout, isLayoutThemeApplied, setLayoutThemeApplied |
| Methods inherited from interface com.guiseframework.component.CompositeComponent |
|---|
addCompositeComponentListener, getChildComponents, 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 |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
int size()
boolean isEmpty()
boolean contains(java.lang.Object component)
component - The component to check.
true if this container contains the given component.int indexOf(java.lang.Object component)
component - The component the index of which should be returned.
int lastIndexOf(java.lang.Object component)
component - The component the last index of which should be returned.
Component get(int index)
index - The index of component to return.
java.lang.IndexOutOfBoundsException - if the index is out of range.boolean add(Component component)
component - 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.
void add(int index,
Component component,
Constraints constraints)
index - 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.
boolean add(Component component,
Constraints constraints)
component - 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.
Component add(int index,
Prototype prototype)
index - 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)Component add(Prototype prototype)
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.#createComponent(Prototype)
Component add(int index,
Prototype prototype,
Constraints constraints)
index - 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)
Component add(Prototype prototype,
Constraints constraints)
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.#createComponent(Prototype)boolean remove(java.lang.Object component)
object - 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.Component remove(int index)
index - The index of the component to removed.
java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= size()).void clear()
<T extends Constraints> void setLayout(Layout<T> newLayout)
newLayout - The new layout definition for the container.
java.lang.NullPointerException - if the given layout is null.
java.lang.IllegalStateException - if a new layout is requested while this container has one or more children.LayoutComponent.LAYOUT_PROPERTY
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||