|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractComponentContainer
public abstract class AbstractComponentContainer
Extension to AbstractComponent that defines the default
implementation for the methods in ComponentContainer. Basic UI
components that need to contain other components inherit this class to easily
qualify as a component container.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent |
|---|
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler |
| Nested classes/interfaces inherited from interface com.vaadin.ui.ComponentContainer |
|---|
ComponentContainer.ComponentAttachEvent, ComponentContainer.ComponentAttachListener, ComponentContainer.ComponentDetachEvent, ComponentContainer.ComponentDetachListener |
| Nested classes/interfaces inherited from interface com.vaadin.ui.Component |
|---|
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener |
| Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable |
|---|
Sizeable.Unit |
| Field Summary |
|---|
| Fields inherited from interface com.vaadin.server.Sizeable |
|---|
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
| Constructor Summary | |
|---|---|
AbstractComponentContainer()
Constructs a new component container. |
|
| Method Summary | |
|---|---|
void |
addComponent(Component c)
This only implements the events and component parent calls. |
void |
addComponentAttachListener(ComponentContainer.ComponentAttachListener listener)
Listens the component attach events. |
void |
addComponentDetachListener(ComponentContainer.ComponentDetachListener listener)
Listens the component detach events. |
void |
addListener(ComponentContainer.ComponentAttachListener listener)
Deprecated. Since 7.0, replaced by addComponentAttachListener(com.vaadin.ui.ComponentContainer.ComponentAttachListener) |
void |
addListener(ComponentContainer.ComponentDetachListener listener)
Deprecated. Since 7.0, replaced by addComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener) |
protected void |
fireComponentAttachEvent(Component component)
Fires the component attached event. |
protected void |
fireComponentDetachEvent(Component component)
Fires the component detached event. |
boolean |
isComponentVisible(Component childComponent)
Checks if the child component is visible. |
java.util.Iterator<Component> |
iterator()
|
void |
moveComponentsFrom(ComponentContainer source)
Moves all components from an another container into this container. |
void |
removeAllComponents()
Removes all components from the container. |
void |
removeComponent(Component c)
This only implements the events and component parent calls. |
void |
removeComponentAttachListener(ComponentContainer.ComponentAttachListener listener)
Stops the listening component attach events. |
void |
removeComponentDetachListener(ComponentContainer.ComponentDetachListener listener)
Stops the listening component detach events. |
void |
removeListener(ComponentContainer.ComponentAttachListener listener)
Deprecated. Since 7.0, replaced by removeComponentAttachListener(com.vaadin.ui.ComponentContainer.ComponentAttachListener) |
void |
removeListener(ComponentContainer.ComponentDetachListener listener)
Deprecated. Since 7.0, replaced by removeComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener) |
void |
setHeight(float height,
Sizeable.Unit unit)
Sets the height of the object. |
void |
setVisible(boolean visible)
Sets the visibility of the component. |
void |
setWidth(float width,
Sizeable.Unit unit)
Sets the width of the object. |
| Methods inherited from class com.vaadin.server.AbstractClientConnector |
|---|
addExtension, addMethodInvocationToQueue, createState, encodeState, getAllChildrenIterable, getConnectorId, getExtensions, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setResource |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.vaadin.ui.ComponentContainer |
|---|
getComponentCount, replaceComponent |
| Methods inherited from interface com.vaadin.ui.HasComponents |
|---|
getComponentIterator |
| Methods inherited from interface com.vaadin.ui.Component |
|---|
addListener, addStyleName, attach, getCaption, getIcon, getId, getLocale, getParent, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setReadOnly, setStyleName |
| Methods inherited from interface com.vaadin.server.ClientConnector |
|---|
beforeClientResponse, detach, encodeState, getExtensions, getStateType, handleConnectorRequest, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setParent |
| Methods inherited from interface com.vaadin.shared.Connector |
|---|
getConnectorId |
| Methods inherited from interface com.vaadin.server.RpcTarget |
|---|
getRpcManager |
| Methods inherited from interface com.vaadin.server.Sizeable |
|---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setSizeFull, setSizeUndefined, setWidth |
| Constructor Detail |
|---|
public AbstractComponentContainer()
| Method Detail |
|---|
public void removeAllComponents()
removeAllComponents in interface ComponentContainerpublic void moveComponentsFrom(ComponentContainer source)
ComponentContainersource.
moveComponentsFrom in interface ComponentContainersource - the container which contains the components that are to be
moved to this container.public void addComponentAttachListener(ComponentContainer.ComponentAttachListener listener)
ComponentContainer
addComponentAttachListener in interface ComponentContainerlistener - the listener to add.@Deprecated public void addListener(ComponentContainer.ComponentAttachListener listener)
addComponentAttachListener(com.vaadin.ui.ComponentContainer.ComponentAttachListener)
addListener in interface ComponentContainerpublic void addComponentDetachListener(ComponentContainer.ComponentDetachListener listener)
ComponentContainer
addComponentDetachListener in interface ComponentContainer@Deprecated public void addListener(ComponentContainer.ComponentDetachListener listener)
addComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener)
addListener in interface ComponentContainerpublic void removeComponentAttachListener(ComponentContainer.ComponentAttachListener listener)
ComponentContainer
removeComponentAttachListener in interface ComponentContainerlistener - the listener to removed.@Deprecated public void removeListener(ComponentContainer.ComponentAttachListener listener)
removeComponentAttachListener(com.vaadin.ui.ComponentContainer.ComponentAttachListener)
removeListener in interface ComponentContainerpublic void removeComponentDetachListener(ComponentContainer.ComponentDetachListener listener)
ComponentContainer
removeComponentDetachListener in interface ComponentContainer@Deprecated public void removeListener(ComponentContainer.ComponentDetachListener listener)
removeComponentDetachListener(com.vaadin.ui.ComponentContainer.ComponentDetachListener)
removeListener in interface ComponentContainerprotected void fireComponentAttachEvent(Component component)
component - the component that has been added to this container.protected void fireComponentDetachEvent(Component component)
component - the component that has been removed from this container.public void addComponent(Component c)
addComponent in interface ComponentContainerc - the component to be added.ComponentContainer.addComponent(Component)public void removeComponent(Component c)
removeComponent in interface ComponentContainerc - the component to be removed.ComponentContainer.removeComponent(Component)public void setVisible(boolean visible)
ComponentVisible components are drawn in the user interface, while invisible ones are not. The effect is not merely a cosmetic CSS change - no information about an invisible component will be sent to the client. The effect is thus the same as removing the component from its parent.
TextField readonly = new TextField("Read-Only");
readonly.setValue("You can't see this!");
readonly.setVisible(false);
layout.addComponent(readonly);
A component is visible only if all of its parents are also visible. If a component is explicitly set to be invisible, changes in the visibility of its parents will not change the visibility of the component.
setVisible in interface ComponentsetVisible in class AbstractComponentvisible - the boolean value specifying if the component should be
visible after the call or not.Component.isVisible()
public void setWidth(float width,
Sizeable.Unit unit)
Sizeable
setWidth in interface SizeablesetWidth in class AbstractComponentwidth - the width of the object.unit - the unit used for the width.
public void setHeight(float height,
Sizeable.Unit unit)
Sizeable
setHeight in interface SizeablesetHeight in class AbstractComponentheight - the height of the object.unit - the unit used for the width.public java.util.Iterator<Component> iterator()
iterator in interface java.lang.Iterable<Component>public boolean isComponentVisible(Component childComponent)
HasComponentsNote that this will prevent updates from reaching the child even though the child itself is set to visible. Also if a child is set to invisible this will not force it to be visible.
isComponentVisible in interface HasComponentschildComponent - The child component to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||