Package com.prineside.tdi2.scene2d.ui
Class Value
java.lang.Object
com.prineside.tdi2.scene2d.ui.Value
- Direct Known Subclasses:
Value.Fixed
Value placeholder, allowing the value to be computed on request. Values can be provided an actor for context to reduce the
number of value instances that need to be created and reduce verbosity in code that specifies values.
- Author:
- Nathan Sweet
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A fixed value that is not computed each time it is used. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Value
Value that is the maxHeight of the actor in the cell.static Value
Value that is the maxWidth of the actor in the cell.static Value
Value that is the minHeight of the actor in the cell.static Value
Value that is the minWidth of the actor in the cell.static Value
Value that is the prefHeight of the actor in the cell.static Value
Value that is the prefWidth of the actor in the cell.static final Value.Fixed
A value that is always zero. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloat
get()
Callsget(Actor)
with null.abstract float
static Value
percentHeight
(float percent) Returns a value that is a percentage of the actor's height.static Value
percentHeight
(float percent, Actor actor) Returns a value that is a percentage of the specified actor's height.static Value
percentWidth
(float percent) Returns a value that is a percentage of the actor's width.static Value
percentWidth
(float percent, Actor actor) Returns a value that is a percentage of the specified actor's width.
-
Field Details
-
zero
A value that is always zero. -
minWidth
Value that is the minWidth of the actor in the cell. -
minHeight
Value that is the minHeight of the actor in the cell. -
prefWidth
Value that is the prefWidth of the actor in the cell. -
prefHeight
Value that is the prefHeight of the actor in the cell. -
maxWidth
Value that is the maxWidth of the actor in the cell. -
maxHeight
Value that is the maxHeight of the actor in the cell.
-
-
Constructor Details
-
Value
public Value()
-
-
Method Details
-
get
public float get()Callsget(Actor)
with null. -
get
- Parameters:
context
- May be null.
-
percentWidth
Returns a value that is a percentage of the actor's width. -
percentHeight
Returns a value that is a percentage of the actor's height. -
percentWidth
Returns a value that is a percentage of the specified actor's width. The context actor is ignored. -
percentHeight
Returns a value that is a percentage of the specified actor's height. The context actor is ignored.
-