|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itmill.toolkit.ui.AbstractComponent
com.itmill.toolkit.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.itmill.toolkit.ui.AbstractComponent |
|---|
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.ComponentContainer |
|---|
ComponentContainer.ComponentAttachEvent, ComponentContainer.ComponentAttachListener, ComponentContainer.ComponentDetachEvent, ComponentContainer.ComponentDetachListener |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Component |
|---|
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.terminal.Paintable |
|---|
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
| Field Summary |
|---|
| Fields inherited from interface com.itmill.toolkit.terminal.Sizeable |
|---|
SIZE_UNDEFINED, UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS, UNITS_ROWS |
| Constructor Summary | |
|---|---|
AbstractComponentContainer()
Constructs a new component container. |
|
| Method Summary | |
|---|---|
void |
addComponent(Component c)
This only implements the events and component parent calls. |
void |
addListener(ComponentContainer.ComponentAttachListener listener)
Listens the component attach events. |
void |
addListener(ComponentContainer.ComponentDetachListener listener)
Listens the component detach events. |
void |
attach()
Notifies all contained components that the container is attached to a window. |
void |
detach()
Notifies all contained components that the container is detached from a window. |
protected void |
fireComponentAttachEvent(Component component)
Fires the component attached event. |
protected void |
fireComponentDetachEvent(Component component)
Fires the component detached event. |
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 |
removeListener(ComponentContainer.ComponentAttachListener listener)
Stops the listening component attach events. |
void |
removeListener(ComponentContainer.ComponentDetachListener listener)
Stops the listening component detach events. |
void |
requestRepaintAll()
Causes a repaint of this component, and all components below it. |
void |
setEnabled(boolean enabled)
Enables or disables the component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.itmill.toolkit.ui.ComponentContainer |
|---|
getComponentIterator, replaceComponent |
| Methods inherited from interface com.itmill.toolkit.ui.Component |
|---|
addListener, addStyleName, childRequestedRepaint, getApplication, getCaption, getIcon, getLocale, getParent, getStyleName, getWindow, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setIcon, setParent, setReadOnly, setStyleName, setVisible |
| Methods inherited from interface com.itmill.toolkit.terminal.Paintable |
|---|
addListener, getDebugId, paint, removeListener, requestRepaint, requestRepaintRequests, setDebugId |
| Methods inherited from interface com.itmill.toolkit.terminal.VariableOwner |
|---|
changeVariables, isImmediate |
| Methods inherited from interface com.itmill.toolkit.terminal.Sizeable |
|---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUnits, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUnits |
| 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 attach()
attach in interface Componentattach in class AbstractComponentComponent.attach()public void detach()
detach in interface Componentdetach in class AbstractComponentComponent.detach()public void addListener(ComponentContainer.ComponentAttachListener listener)
ComponentContainer
addListener in interface ComponentContainerlistener - the listener to add.public void addListener(ComponentContainer.ComponentDetachListener listener)
ComponentContainer
addListener in interface ComponentContainerpublic void removeListener(ComponentContainer.ComponentAttachListener listener)
ComponentContainer
removeListener in interface ComponentContainerlistener - the listener to removed.public void removeListener(ComponentContainer.ComponentDetachListener listener)
ComponentContainer
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 added.ComponentContainer.removeComponent(Component)public void setEnabled(boolean enabled)
ComponentRepaintRequestEvent.
Note that after enabling a component, Component.isEnabled() might
still return false if the parent is disabled.
Also note that if the component contains child-components, it should recursively call requestRepaint() for all descendant components.
setEnabled in interface ComponentsetEnabled in class AbstractComponentenabled - the boolean value specifying if the component should be
enabled after the call or notpublic void requestRepaintAll()
ComponentContainer
requestRepaintAll in interface ComponentContainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||