Class StdLayoutImpl
- All Implemented Interfaces:
WLayoutImpl,WLayoutItemImpl
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StdLayoutItemImplgetImpl(WLayoutItem item) Returns aWLayoutItemimplementation.protected WLayoutReturns theWLayout.Returns theWLayoutas aWLayoutItem.abstract booleanCalled when the parent is resized.abstract booleanitemResized(WLayoutItem item) Called when aWLayoutItemin theWLayoutis resized.voidsetObjectName(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, getParentLayoutImplMethods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, trMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface eu.webtoolkit.jwt.WLayoutImpl
itemAdded, itemRemoved
-
Constructor Details
-
StdLayoutImpl
Constructor.Creates a new
StdLayoutImplfor the givenWLayout.
-
-
Method Details
-
updateDom
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
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:
-
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:
-
setObjectName
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.
-
getLayout
Returns theWLayout. -
getImpl
Returns aWLayoutItemimplementation.Returns a
WLayoutItemimplementation if the implementation is a subclass ofStdLayoutItemImpl. Otherwise returnsnull.
-