public class AbsoluteLayout extends AbstractLayout implements LayoutEvents.LayoutClickNotifier
| Modifier and Type | Class and Description |
|---|---|
class |
AbsoluteLayout.ComponentPosition
The CompontPosition class represents a components position within the
absolute layout.
|
Layout.AlignmentHandler, Layout.MarginHandler, Layout.SpacingHandlerHasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListenerComponent.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.UnitDESIGN_ATTR_PLAIN_TEXTSIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS| Constructor and Description |
|---|
AbsoluteLayout()
Creates an AbsoluteLayout with full size.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addComponent(Component c)
This only implements the events and component parent calls.
|
void |
addComponent(Component c,
String cssPosition)
Adds a component to the layout.
|
Registration |
addLayoutClickListener(LayoutEvents.LayoutClickListener listener)
Add a click listener to the layout.
|
void |
beforeClientResponse(boolean initial)
Called before the shared state and RPC invocations are sent to the
client.
|
int |
getComponentCount()
Gets the number of contained components.
|
AbsoluteLayout.ComponentPosition |
getPosition(Component component)
Gets the position of a component in the layout.
|
protected AbsoluteLayoutState |
getState()
Returns the shared state bean with information to be sent from the server
to the client.
|
protected AbsoluteLayoutState |
getState(boolean markAsDirty)
Returns the shared state for this connector.
|
Iterator<Component> |
iterator()
Gets an iterator for going through all components enclosed in the
absolute layout.
|
void |
readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Reads the component state from the given design.
|
void |
removeComponent(Component c)
This only implements the events and component parent calls.
|
void |
removeLayoutClickListener(LayoutEvents.LayoutClickListener listener)
Deprecated.
|
void |
replaceComponent(Component oldComponent,
Component newComponent)
Replaces one component with another one.
|
void |
setPosition(Component component,
AbsoluteLayout.ComponentPosition position)
Sets the position of a component in the layout.
|
void |
writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Writes the component state to the given design.
|
readMargin, writeMarginaddComponentAttachListener, addComponentDetachListener, addComponents, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, setHeight, setWidthaddContextClickListener, addListener, addShortcutListener, addStyleName, attach, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getCustomAttributes, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setReadOnly, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setStyleName, setVisible, setWidth, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddComponents, getComponentIterator, moveComponentsFrom, removeAllComponentsaddListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setVisibleaddAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetConnectorIdgetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedforEach, spliteratoraddComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListenerprotected AbsoluteLayoutState getState()
AbstractComponentgetState in class AbstractLayoutprotected AbsoluteLayoutState getState(boolean markAsDirty)
AbstractClientConnectorgetState in class AbstractLayoutmarkAsDirty - true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()public Iterator<Component> iterator()
iterator in interface HasComponentsiterator in interface Iterable<Component>public int getComponentCount()
AbstractComponentContainer.getComponentIterator().getComponentCount in interface ComponentContainerpublic void replaceComponent(Component oldComponent, Component newComponent)
replaceComponent in interface ComponentContaineroldComponent - the old component that will be replaced.newComponent - the new component to be replaced.public void addComponent(Component c)
AbstractComponentContaineraddComponent in interface ComponentContaineraddComponent in class AbstractComponentContainerc - the component to be added.ComponentContainer.addComponent(Component)public void addComponent(Component c, String cssPosition)
For example the string "top:10px;left:10px" will position the component 10 pixels from the left and 10 pixels from the top. The identifiers: "top","left","right" and "bottom" can be used to specify the position.
c - The component to add to the layoutcssPosition - The css position stringpublic void beforeClientResponse(boolean initial)
ClientConnectorbeforeClientResponse in interface ClientConnectorbeforeClientResponse in class AbstractComponentinitial - true if the client-side connector will be created
and initialized after this method has been invoked.
false if there is already an initialized
client-side connector.public void removeComponent(Component c)
AbstractComponentContainerremoveComponent in interface ComponentContainerremoveComponent in class AbstractComponentContainerc - the component to be removed.ComponentContainer.removeComponent(Component)public AbsoluteLayout.ComponentPosition getPosition(Component component)
Note that you cannot update the position by updating this object. Call
setPosition(Component, ComponentPosition) with the updated
AbsoluteLayout.ComponentPosition object.
component - The component which position is neededpublic void setPosition(Component component, AbsoluteLayout.ComponentPosition position)
component - position - public Registration addLayoutClickListener(LayoutEvents.LayoutClickListener listener)
LayoutEvents.LayoutClickNotifierLayoutEvents.LayoutClickEvent.addLayoutClickListener in interface LayoutEvents.LayoutClickNotifierlistener - The listener to addRegistration@Deprecated public void removeLayoutClickListener(LayoutEvents.LayoutClickListener listener)
LayoutEvents.LayoutClickNotifierremoveLayoutClickListener in interface LayoutEvents.LayoutClickNotifierlistener - LayoutClickListener to be removedpublic void readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
ComponentThe component is responsible not only for updating its own state but also for ensuring that its children update their state based on the design.
It is assumed that the component is in its default state when this method is called. Reading should only take into consideration attributes specified in the design and not reset any unspecified attributes to their defaults.
This method must not modify the design.
readDesign in interface ComponentreadDesign in class AbstractComponentdesign - The element to obtain the state fromdesignContext - The DesignContext instance used for parsing the designpublic void writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
ComponentThe component is responsible not only for writing its own state but also for ensuring that its children write their state to the design.
This method must not modify the component state.
writeDesign in interface ComponentwriteDesign in class AbstractComponentdesign - The element to write the component state to. Any previous
attributes or child nodes are not cleared.designContext - The DesignContext instance used for writing the designCopyright © 2017 Vaadin Ltd. All rights reserved.