|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.terminal.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 class com.vaadin.ui.AbstractComponent |
---|
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler |
Nested classes/interfaces inherited from interface com.vaadin.ui.Layout |
---|
Layout.AlignmentHandler, Layout.MarginHandler, Layout.MarginInfo, Layout.SpacingHandler |
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.terminal.Sizeable |
---|
Sizeable.Unit |
Field Summary |
---|
Fields inherited from class com.vaadin.ui.AbstractLayout |
---|
margins |
Fields inherited from interface com.vaadin.terminal.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,
String cssPosition)
Adds a component to the layout. |
void |
addListener(LayoutEvents.LayoutClickListener listener)
Add a click listener to the layout. |
int |
getComponentCount()
Gets the number of contained components. |
Iterator<Component> |
getComponentIterator()
Gets an iterator for going through all components enclosed in the absolute layout. |
AbsoluteLayout.ComponentPosition |
getPosition(Component component)
Gets the position of a component in the layout. |
AbsoluteLayoutState |
getState()
Returns the shared state bean with information to be sent from the server to the client. |
void |
removeComponent(Component c)
This only implements the events and component parent calls. |
void |
removeListener(LayoutEvents.LayoutClickListener listener)
Removes an 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 |
updateState()
Called before the shared state is sent to the client. |
Methods inherited from class com.vaadin.ui.AbstractLayout |
---|
getMargin, setMargin, setMargin, setMargin |
Methods inherited from class com.vaadin.ui.AbstractComponentContainer |
---|
addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, isComponentVisible, iterator, moveComponentsFrom, removeAllComponents, removeListener, removeListener, setHeight, setVisible, setWidth |
Methods inherited from class com.vaadin.terminal.AbstractClientConnector |
---|
addExtension, addMethodInvocationToQueue, createState, getAllChildrenIterable, getConnectorId, getExtensions, getRpcManager, getRpcProxy, getStateType, registerRpc, registerRpc, removeExtension, requestRepaintAll, retrievePendingRpcCalls |
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 |
---|
addListener, addListener, moveComponentsFrom, removeAllComponents, removeListener, removeListener |
Methods inherited from interface com.vaadin.ui.HasComponents |
---|
isComponentVisible |
Methods inherited from interface com.vaadin.ui.Component |
---|
addListener, addStyleName, attach, getApplication, getCaption, getDebugId, getIcon, getLocale, getParent, getRoot, getStyleName, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setDebugId, setEnabled, setIcon, setReadOnly, setStyleName, setVisible |
Methods inherited from interface com.vaadin.terminal.gwt.server.ClientConnector |
---|
detach, getExtensions, getStateType, isConnectorEnabled, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setParent |
Methods inherited from interface com.vaadin.terminal.gwt.client.Connector |
---|
getConnectorId |
Methods inherited from interface com.vaadin.terminal.gwt.server.RpcTarget |
---|
getRpcManager |
Methods inherited from interface com.vaadin.terminal.Sizeable |
---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setSizeFull, setSizeUndefined, setWidth, setWidth |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Constructor Detail |
---|
public AbsoluteLayout()
Method Detail |
---|
public AbsoluteLayoutState getState()
AbstractComponent
getState
in interface Connector
getState
in interface Component
getState
in class AbstractLayout
public Iterator<Component> getComponentIterator()
getComponentIterator
in interface HasComponents
public int getComponentCount()
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, 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 updateState()
Component
This method must not alter the component hierarchy in any way.
updateState
in interface Component
updateState
in class AbstractComponent
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 addListener(LayoutEvents.LayoutClickListener listener)
LayoutEvents.LayoutClickNotifier
LayoutEvents.LayoutClickEvent
.
Use #removeListener(LayoutClickListener)
to remove the
listener.
addListener
in interface LayoutEvents.LayoutClickNotifier
listener
- The listener to addpublic void removeListener(LayoutEvents.LayoutClickListener listener)
LayoutEvents.LayoutClickNotifier
removeListener
in interface LayoutEvents.LayoutClickNotifier
listener
- LayoutClickListener to be removed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |