Package eu.webtoolkit.jwt
Class WFitLayout
java.lang.Object
eu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.WLayout
eu.webtoolkit.jwt.WFitLayout
- All Implemented Interfaces:
WLayoutItem
A layout manager which spans a single widget to all available space.
This layout manager may manage only a single child widget, and sizes that widget so that it uses all space available in the parent.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addItem
(WLayoutItem item) Adds a layout item.static void
fitWidget
(WContainerWidget container, WWidget widget) int
getCount()
Returns the number of items in this layout.getItemAt
(int index) Returns the layout item at a specific index.int
indexOf
(WLayoutItem item) Returns the index of a given item.boolean
void
iterateWidgets
(HandleWidgetMethod method) removeItem
(WLayoutItem item) Removes a layout item (widget or nested layout).void
setParentWidget
(WWidget parent) Internal method.protected void
Methods inherited from class eu.webtoolkit.jwt.WLayout
addWidget, findWidgetItem, getContentsMargin, getImpl, getImplementation, getLayout, getParentLayout, getParentWidget, getPreferredImplementation, getWidget, itemAdded, itemRemoved, removeWidget, setContentsMargins, setDefaultImplementation, setImpl, setParentLayout, setPreferredImplementation, update, update
Methods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, setObjectName, tr
-
Constructor Details
-
WFitLayout
public WFitLayout()Creates a new fit layout.
-
-
Method Details
-
fitWidget
-
addItem
Description copied from class:WLayout
Adds a layout item.The item may be a widget or nested layout.
How the item is layed out with respect to siblings is implementation specific to the layout manager. In some cases, a layout manager will overload this method with extra arguments that specify layout options.
-
removeItem
Description copied from class:WLayout
Removes a layout item (widget or nested layout).- Specified by:
removeItem
in classWLayout
- See Also:
-
getItemAt
Description copied from class:WLayout
Returns the layout item at a specific index.If there is no item at the
index
,null
is returned. -
indexOf
Description copied from class:WLayout
Returns the index of a given item.The default implementation loops over all items, and returns the index for which itemAt(index) equals
item
. -
getCount
public int getCount()Description copied from class:WLayout
Returns the number of items in this layout.This may be a theoretical number, which is greater than the actual number of items. It can be used to iterate over the items in the layout, in conjunction with
getItemAt()
. -
iterateWidgets
-
isImplementationIsFlexLayout
public boolean isImplementationIsFlexLayout()- Overrides:
isImplementationIsFlexLayout
in classWLayout
-
updateImplementation
protected void updateImplementation()- Overrides:
updateImplementation
in classWLayout
-
setParentWidget
Description copied from interface:WLayoutItem
Internal method.- Specified by:
setParentWidget
in interfaceWLayoutItem
- Overrides:
setParentWidget
in classWLayout
-