|
||||||||||
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.AbstractLayout
com.vaadin.ui.AbsoluteLayout
public class AbsoluteLayout
AbsoluteLayout is a layout implementation that mimics html absolute positioning.
Nested Class Summary | |
---|---|
class |
AbsoluteLayout.ComponentPosition
The CompontPosition class represents a components position within the absolute layout. |
Nested classes/interfaces inherited from interface com.vaadin.ui.Layout |
---|
Layout.AlignmentHandler, Layout.MarginHandler, Layout.SpacingHandler |
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.Event, Component.Focusable, Component.Listener |
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector |
---|
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener |
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable |
---|
Sizeable.Unit |
Field Summary |
---|
Fields inherited from class com.vaadin.ui.AbstractComponent |
---|
DESIGN_ATTR_PLAIN_TEXT |
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 | |
---|---|
AbsoluteLayout()
Creates an AbsoluteLayout with full size. |
Method Summary | |
---|---|
void |
addComponent(Component c)
This only implements the events and component parent calls. |
void |
addComponent(Component c,
java.lang.String cssPosition)
Adds a component to the layout. |
void |
addLayoutClickListener(LayoutEvents.LayoutClickListener listener)
Add a click listener to the layout. |
void |
addListener(LayoutEvents.LayoutClickListener listener)
Deprecated. As of 7.0, replaced by #addLayoutClickListener(LayoutClickListener) |
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 com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutState |
getState()
Returns the shared state bean with information to be sent from the server to the client. |
java.util.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)
Removes an LayoutClickListener. |
void |
removeListener(LayoutEvents.LayoutClickListener listener)
Deprecated. As of 7.0, replaced by #removeLayoutClickListener(LayoutClickListener) |
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.vaadin.ui.ComponentContainer |
---|
addComponents, addListener, addListener, getComponentIterator, moveComponentsFrom, removeAllComponents, removeListener, removeListener |
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, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible |
Methods inherited from interface com.vaadin.server.ClientConnector |
---|
addAttachListener, addDetachListener, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
Methods inherited from interface com.vaadin.shared.Connector |
---|
getConnectorId |
Methods inherited from interface com.vaadin.server.Sizeable |
---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined |
Methods inherited from interface com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier |
---|
addComponentAttachListener, addComponentDetachListener, removeComponentAttachListener, removeComponentDetachListener |
Constructor Detail |
---|
public AbsoluteLayout()
Method Detail |
---|
protected com.vaadin.shared.ui.absolutelayout.AbsoluteLayoutState getState()
AbstractComponent
getState
in class AbstractLayout
public java.util.Iterator<Component> iterator()
iterator
in interface HasComponents
iterator
in interface java.lang.Iterable<Component>
public int getComponentCount()
AbstractComponentContainer.getComponentIterator()
.
getComponentCount
in interface ComponentContainer
public void replaceComponent(Component oldComponent, Component newComponent)
replaceComponent
in interface ComponentContainer
oldComponent
- the old component that will be replaced.newComponent
- the new component to be replaced.public void addComponent(Component c)
AbstractComponentContainer
addComponent
in interface ComponentContainer
addComponent
in class AbstractComponentContainer
c
- the component to be added.ComponentContainer.addComponent(Component)
public void addComponent(Component c, java.lang.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)
ClientConnector
This method must not alter the component hierarchy in any way. Calling
ClientConnector.markAsDirty()
from this method will have no effect.
beforeClientResponse
in interface ClientConnector
beforeClientResponse
in class AbstractComponent
initial
- 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)
AbstractComponentContainer
removeComponent
in interface ComponentContainer
removeComponent
in class AbstractComponentContainer
c
- 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 needed
public void setPosition(Component component, AbsoluteLayout.ComponentPosition position)
component
- position
- public void addLayoutClickListener(LayoutEvents.LayoutClickListener listener)
LayoutEvents.LayoutClickNotifier
LayoutEvents.LayoutClickEvent
.
Use #removeListener(LayoutClickListener)
to remove the
listener.
addLayoutClickListener
in interface LayoutEvents.LayoutClickNotifier
listener
- The listener to add@Deprecated public void addListener(LayoutEvents.LayoutClickListener listener)
#addLayoutClickListener(LayoutClickListener)
addListener
in interface LayoutEvents.LayoutClickNotifier
public void removeLayoutClickListener(LayoutEvents.LayoutClickListener listener)
LayoutEvents.LayoutClickNotifier
removeLayoutClickListener
in interface LayoutEvents.LayoutClickNotifier
listener
- LayoutClickListener to be removed@Deprecated public void removeListener(LayoutEvents.LayoutClickListener listener)
#removeLayoutClickListener(LayoutClickListener)
removeListener
in interface LayoutEvents.LayoutClickNotifier
public void readDesign(org.jsoup.nodes.Element design, DesignContext designContext)
Component
The 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 Component
readDesign
in class AbstractComponent
design
- The design as HTML to obtain the state fromdesignContext
- The DesignContext instance used for parsing the designpublic void writeDesign(org.jsoup.nodes.Element design, DesignContext designContext)
Component
The 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 Component
writeDesign
in class AbstractComponent
design
- The design as HTML to update with the current state
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |