Class StdLayoutImpl
- java.lang.Object
-
- eu.webtoolkit.jwt.WObject
-
- eu.webtoolkit.jwt.StdLayoutItemImpl
-
- eu.webtoolkit.jwt.StdLayoutImpl
-
- All Implemented Interfaces:
WLayoutImpl,WLayoutItemImpl
public abstract class StdLayoutImpl extends StdLayoutItemImpl implements WLayoutImpl
An abstract base class for implementing layout managers.- See Also:
StdLayoutItemImpl,WLayout
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
-
Constructor Summary
Constructors Constructor Description StdLayoutImpl(WLayout layout)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static StdLayoutItemImplgetImpl(WLayoutItem item)Returns aWLayoutItemimplementation.protected WLayoutgetLayout()Returns theWLayout.WLayoutItemgetLayoutItem()Returns theWLayoutas aWLayoutItem.abstract booleanisParentResized()Called when the parent is resized.abstract booleanitemResized(WLayoutItem item)Called when aWLayoutItemin theWLayoutis resized.voidsetObjectName(java.lang.String name)Sets an object name.voidupdate()Updates the layout.abstract voidupdateDom(DomElement parent)Updates the DomElements in theWLayout.-
Methods inherited from class eu.webtoolkit.jwt.StdLayoutItemImpl
createDomElement, getContainer, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getParentLayoutImpl
-
Methods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, tr
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface eu.webtoolkit.jwt.WLayoutImpl
itemAdded, itemRemoved
-
-
-
-
Constructor Detail
-
StdLayoutImpl
public StdLayoutImpl(WLayout layout)
Constructor.Creates a new
StdLayoutImplfor the givenWLayout.
-
-
Method Detail
-
updateDom
public abstract void updateDom(DomElement parent)
Updates the DomElements in theWLayout.This function should update the DomElements in the
WLayout. This means creating DomElements for newly addedStdLayoutItemImpl, deleting DomElements from deletedStdLayoutItemImpland updating the placement and size of the DomElements.
-
itemResized
public abstract boolean itemResized(WLayoutItem item)
Called when aWLayoutItemin theWLayoutis resized.When a
WLayoutItemis resized, it may be necessary to update the whole layout. Items may have moved in such a way, that it would push other items of screen, requiring other items to adapt to it.If it returns
true, a subsequentupdateDom()may be necessary.
-
isParentResized
public abstract boolean isParentResized()
Called when the parent is resized.When the parent is resized, it may be necessary to update the whole layout. More or less items could not potentially fit in the layout, or the layout's boundaries may have changed.
If it returns
true, a subsequentupdateDom()may be necessary.- See Also:
updateDom(DomElement parent)
-
getLayoutItem
public WLayoutItem getLayoutItem()
Returns theWLayoutas aWLayoutItem.- Specified by:
getLayoutItemin classStdLayoutItemImpl
-
update
public void update()
Updates the layout.By default, this will trigger a call to
updateDom().Note: Several calls to
update()may happens beforeupdateDom()is called.- Specified by:
updatein interfaceWLayoutImpl- See Also:
updateDom(DomElement parent)
-
setObjectName
public void setObjectName(java.lang.String name)
Description copied from class:WObjectSets an object name.The object name can be used to easily identify a type of object in the DOM, and does not need to be unique. It will usually reflect the widget type or role. The object name is prepended to the auto-generated object
WObject.getId().The default object name is empty.
- Overrides:
setObjectNamein classWObject- Parameters:
name- the object name.
-
getImpl
protected static StdLayoutItemImpl getImpl(WLayoutItem item)
Returns aWLayoutItemimplementation.Returns a
WLayoutItemimplementation if the implementation is a subclass ofStdLayoutItemImpl. Otherwise returnsnull.
-
-