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 StdLayoutItemImpl
getImpl
(WLayoutItem item) Returns aWLayoutItem
implementation.protected WLayout
Returns theWLayout
.Returns theWLayout
as aWLayoutItem
.abstract boolean
Called when the parent is resized.abstract boolean
itemResized
(WLayoutItem item) Called when aWLayoutItem
in theWLayout
is resized.void
update()
Updates the layout.abstract void
updateDom
(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, setObjectName, 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 Details
-
StdLayoutImpl
Constructor.Creates a new
StdLayoutImpl
for 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 deletedStdLayoutItemImpl
and updating the placement and size of the DomElements. -
itemResized
Called when aWLayoutItem
in theWLayout
is resized.When a
WLayoutItem
is 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 theWLayout
as aWLayoutItem
.- Specified by:
getLayoutItem
in 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:
update
in interfaceWLayoutImpl
- See Also:
-
getLayout
Returns theWLayout
. -
getImpl
Returns aWLayoutItem
implementation.Returns a
WLayoutItem
implementation if the implementation is a subclass ofStdLayoutItemImpl
. Otherwise returnsnull
.
-