|
||||||||||
| 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
com.vaadin.ui.CustomComponent
public class CustomComponent
Custom component provides simple implementation of Component interface for creation of new UI components by composition of existing components.
The component is used by inheriting the CustomComponent class and setting composite root inside the Custom component. The composite root itself can contain more components, but their interfaces are hidden from the users.
| 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.HasComponents |
|---|
HasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.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 | |
|---|---|
CustomComponent()
Constructs a new custom component. |
|
CustomComponent(Component compositionRoot)
Constructs a new custom component. |
|
| Method Summary | |
|---|---|
void |
addComponent(Component c)
This method is not supported by CustomComponent. |
int |
getComponentCount()
Gets the number of contained components. |
protected Component |
getCompositionRoot()
Returns the composition root. |
java.util.Iterator<Component> |
iterator()
Gets an iterator to the collection of contained components. |
void |
moveComponentsFrom(ComponentContainer source)
This method is not supported by CustomComponent. |
void |
removeAllComponents()
This method is not supported by CustomComponent. |
void |
removeComponent(Component c)
This method is not supported by CustomComponent. |
void |
replaceComponent(Component oldComponent,
Component newComponent)
This method is not supported by CustomComponent. |
protected void |
setCompositionRoot(Component compositionRoot)
Sets the compositions root. |
| 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.Component |
|---|
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setPrimaryStyleName, 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 CustomComponent()
The component is implemented by wrapping the methods of the composition root component given as parameter. The composition root must be set before the component can be used.
public CustomComponent(Component compositionRoot)
The component is implemented by wrapping the methods of the composition root component given as parameter. The composition root must not be null and can not be changed after the composition.
compositionRoot - the root of the composition component tree.| Method Detail |
|---|
protected Component getCompositionRoot()
protected void setCompositionRoot(Component compositionRoot)
The composition root must be set to non-null value before the component can be used. The composition root can only be set once.
compositionRoot - the root of the composition component tree.public java.util.Iterator<Component> iterator()
HasComponents
public int getComponentCount()
AbstractComponentContainer.getComponentIterator().
public void replaceComponent(Component oldComponent,
Component newComponent)
oldComponent - the old component that will be replaced.newComponent - the new component to be replaced.ComponentContainer.replaceComponent(com.vaadin.ui.Component,
com.vaadin.ui.Component)public void addComponent(Component c)
setCompositionRoot(Component) to set
CustomComponents "child".
addComponent in interface ComponentContaineraddComponent in class AbstractComponentContainerc - the component to be added.AbstractComponentContainer.addComponent(com.vaadin.ui.Component)public void moveComponentsFrom(ComponentContainer source)
moveComponentsFrom in interface ComponentContainermoveComponentsFrom in class AbstractComponentContainersource - the container which contains the components that are to be
moved to this container.AbstractComponentContainer.moveComponentsFrom(com.vaadin.ui.ComponentContainer)public void removeAllComponents()
removeAllComponents in interface ComponentContainerremoveAllComponents in class AbstractComponentContainerAbstractComponentContainer.removeAllComponents()public void removeComponent(Component c)
removeComponent in interface ComponentContainerremoveComponent in class AbstractComponentContainerc - the component to be removed.AbstractComponentContainer.removeComponent(com.vaadin.ui.Component)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||