com.vaadin.terminal.gwt.client.ui.layout.


Class CellBasedLayout

java.lang.Object
  com.google.gwt.user.client.ui.UIObject
      com.google.gwt.user.client.ui.Widget
          com.google.gwt.user.client.ui.Panel
              com.google.gwt.user.client.ui.ComplexPanel
                  com.vaadin.terminal.gwt.client.ui.layout.CellBasedLayout

All Implemented Interfaces:

com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, Container, Paintable, Iterable<com.google.gwt.user.client.ui.Widget>

Direct Known Subclasses:

VOrderedLayout

public abstract class CellBasedLayout
extends com.google.gwt.user.client.ui.ComplexPanel
implements Container

Nested Class Summary
static class CellBasedLayout.Spacing
           
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
protected  Margins activeMargins
           
protected  VMarginInfo activeMarginsInfo
           
protected  CellBasedLayout.Spacing activeSpacing
           
protected  ApplicationConnection client
           
static int ORIENTATION_HORIZONTAL
           
static int ORIENTATION_VERTICAL
           
protected  com.google.gwt.dom.client.DivElement root
           
protected  boolean spacingEnabled
           
protected  CellBasedLayout.Spacing spacingFromCSS
           
protected  String STYLENAME_MARGIN_BOTTOM
           
protected  String STYLENAME_MARGIN_LEFT
           
protected  String STYLENAME_MARGIN_RIGHT
           
protected  String STYLENAME_MARGIN_TOP
           
protected  String STYLENAME_SPACING
           
protected  Map<com.google.gwt.user.client.ui.Widget,ChildComponentContainer> widgetToComponentContainer
           
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
CellBasedLayout()
           
 
Method Summary
protected  void addOrMoveChild(ChildComponentContainer childComponent, int position)
           
protected  ChildComponentContainer getComponentContainer(com.google.gwt.user.client.ui.Widget child)
           
protected  ChildComponentContainer getFirstChildComponentContainer()
           
 boolean hasChildComponent(com.google.gwt.user.client.ui.Widget component)
          Is a given component child of this layout.
protected  boolean isDynamicHeight()
           
protected  boolean isDynamicWidth()
           
protected  boolean measureMarginsAndSpacing()
           
protected  void removeChildrenAfter(int pos)
           
 void replaceChildComponent(com.google.gwt.user.client.ui.Widget oldComponent, com.google.gwt.user.client.ui.Widget newComponent)
          Replace child of this layout with another component.
 void setHeight(String height)
           
 void setStyleName(String styleName)
           
 void setWidth(String width)
           
 void updateFromUIDL(UIDL uidl, ApplicationConnection client)
           
 
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.vaadin.terminal.gwt.client.Container
getAllocatedSpace, requestLayout, updateCaption
 

Field Detail

widgetToComponentContainer

protected Map<com.google.gwt.user.client.ui.Widget,ChildComponentContainer> widgetToComponentContainer

client

protected ApplicationConnection client

root

protected com.google.gwt.dom.client.DivElement root

ORIENTATION_VERTICAL

public static final int ORIENTATION_VERTICAL

See Also:

Constant Field Values

ORIENTATION_HORIZONTAL

public static final int ORIENTATION_HORIZONTAL

See Also:

Constant Field Values

activeMargins

protected Margins activeMargins

activeMarginsInfo

protected VMarginInfo activeMarginsInfo

spacingEnabled

protected boolean spacingEnabled

spacingFromCSS

protected final CellBasedLayout.Spacing spacingFromCSS

activeSpacing

protected final CellBasedLayout.Spacing activeSpacing

STYLENAME_SPACING

protected String STYLENAME_SPACING

STYLENAME_MARGIN_TOP

protected String STYLENAME_MARGIN_TOP

STYLENAME_MARGIN_RIGHT

protected String STYLENAME_MARGIN_RIGHT

STYLENAME_MARGIN_BOTTOM

protected String STYLENAME_MARGIN_BOTTOM

STYLENAME_MARGIN_LEFT

protected String STYLENAME_MARGIN_LEFT
Constructor Detail

CellBasedLayout

public CellBasedLayout()
Method Detail

hasChildComponent

public boolean hasChildComponent(com.google.gwt.user.client.ui.Widget component)

Description copied from interface: Container

Is a given component child of this layout.

Specified by:
hasChildComponent in interface Container

Parameters:
component - Component to test.
Returns:
true iff component is a child of this layout.

updateFromUIDL

public void updateFromUIDL(UIDL uidl,
                           ApplicationConnection client)

Specified by:
updateFromUIDL in interface Paintable

setStyleName

public void setStyleName(String styleName)

Overrides:
setStyleName in class com.google.gwt.user.client.ui.UIObject

setWidth

public void setWidth(String width)

Overrides:
setWidth in class com.google.gwt.user.client.ui.UIObject

setHeight

public void setHeight(String height)

Overrides:
setHeight in class com.google.gwt.user.client.ui.UIObject

addOrMoveChild

protected void addOrMoveChild(ChildComponentContainer childComponent,
                              int position)

getComponentContainer

protected ChildComponentContainer getComponentContainer(com.google.gwt.user.client.ui.Widget child)

isDynamicWidth

protected boolean isDynamicWidth()

isDynamicHeight

protected boolean isDynamicHeight()

measureMarginsAndSpacing

protected boolean measureMarginsAndSpacing()

getFirstChildComponentContainer

protected ChildComponentContainer getFirstChildComponentContainer()

removeChildrenAfter

protected void removeChildrenAfter(int pos)

replaceChildComponent

public void replaceChildComponent(com.google.gwt.user.client.ui.Widget oldComponent,
                                  com.google.gwt.user.client.ui.Widget newComponent)

Description copied from interface: Container

Replace child of this layout with another component. Each layout must be able to switch children. To to this, one must just give references to a current and new child.

Specified by:
replaceChildComponent in interface Container

Parameters:
oldComponent - Child to be replaced
newComponent - Child that replaces the oldComponent