Package tripleplay.ui
Class SizableGroup
java.lang.Object
A group that allows configuring its preferred size. The size is always returned when the size
of the group is calculated, but the group may end up being stretched when contained in a
layout that does so.
-
Nested Class Summary
Nested classes/interfaces inherited from class tripleplay.ui.Container
Container.Mutable<T extends Container.Mutable<T>>
Nested classes/interfaces inherited from class tripleplay.ui.Element
Element.Take
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSizableGroup
(Layout layout) Creates the sizable group with preferred width and height of 0.SizableGroup
(Layout layout, float wid, float hei) Creates the sizable group with preferred width and height.SizableGroup
(Layout layout, pythagoras.f.IDimension size) Creates the sizable group with the given preferred size. -
Method Summary
Modifier and TypeMethodDescriptionSets the way in which heights are combined to calculate the resulting preferred size.forWidth
(Element.Take fn) Sets the way in which widths are combined to calculate the resulting preferred size.Methods inherited from class tripleplay.ui.Elements
add, add, childAdded, childAt, childCount, childRemoved, destroy, destroyAll, destroyAt, iterator, remove, removeAll, removeAt, setStylesheet, stylesheet
Methods inherited from class tripleplay.ui.Container
removeFromParent
Methods inherited from class tripleplay.ui.Element
addStyles, addStyles, bindEnabled, bindVisible, bounds, constraint, enabledSlot, hierarchyChanged, isAdded, isEnabled, isShowing, isVisible, location, parent, setConstraint, setEnabled, setStyles, setStyles, setVisible, size, styles, visibleSlot, x, y
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
preferredSize
The preferred size of this widget. Update at will.
-
-
Constructor Details
-
SizableGroup
Creates the sizable group with preferred width and height of 0. Note that this will cause the base layout preferred size to be used, if overridden. -
SizableGroup
Creates the sizable group with the given preferred size. -
SizableGroup
Creates the sizable group with preferred width and height.
-
-
Method Details
-
forWidth
Sets the way in which widths are combined to calculate the resulting preferred size. For example,new SizeableGroup(...).forWidth(Take.MAX)
. -
forHeight
Sets the way in which heights are combined to calculate the resulting preferred size. For example,new SizeableGroup(...).forHeight(Take.MAX)
.
-