Package tripleplay.ui
Class SizableWidget<T extends SizableWidget<T>>
java.lang.Object
tripleplay.ui.Element<T>
tripleplay.ui.Widget<T>
tripleplay.ui.SizableWidget<T>
- Direct Known Subclasses:
GlyphWidget
,Shim
A widget that allows configuring its preferred size. The size is always returned when the size
of the widget is calculated, but the widget may end up being stretched when contained in a
layout that does so.
-
Nested Class Summary
Nested classes/interfaces inherited from class tripleplay.ui.Element
Element.Take
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates the sizable widget with preferred width and height of 0.SizableWidget
(float width, float height) Creates the sizable widget with preferred width and height.SizableWidget
(pythagoras.f.IDimension size) Creates the sizable widget with the given preferred size. -
Method Summary
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
-
Field Details
-
preferredSize
The preferred size of this widget. Update at will.
-
-
Constructor Details
-
SizableWidget
public SizableWidget()Creates the sizable widget with preferred width and height of 0. Note that this will cause the base layout preferred size to be used, if overridden. -
SizableWidget
public SizableWidget(pythagoras.f.IDimension size) Creates the sizable widget with the given preferred size. -
SizableWidget
public SizableWidget(float width, float height) Creates the sizable widget with preferred width and height.
-