Class Value
- java.lang.Object
-
- com.badlogic.gdx.scenes.scene2d.ui.Value
-
- Direct Known Subclasses:
Value.Fixed
public abstract class Value extends java.lang.ObjectValue 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classValue.FixedA fixed value that is not computed each time it is used.
-
Field Summary
Fields Modifier and Type Field Description static ValuemaxHeightValue that is the maxHeight of the actor in the cell.static ValuemaxWidthValue that is the maxWidth of the actor in the cell.static ValueminHeightValue that is the minHeight of the actor in the cell.static ValueminWidthValue that is the minWidth of the actor in the cell.static ValueprefHeightValue that is the prefHeight of the actor in the cell.static ValueprefWidthValue that is the prefWidth of the actor in the cell.static Value.FixedzeroA value that is always zero.
-
Constructor Summary
Constructors Constructor Description Value()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description floatget()Callsget(Actor)with null.abstract floatget(Actor context)static ValuepercentHeight(float percent)Returns a value that is a percentage of the actor's height.static ValuepercentHeight(float percent, Actor actor)Returns a value that is a percentage of the specified actor's height.static ValuepercentWidth(float percent)Returns a value that is a percentage of the actor's width.static ValuepercentWidth(float percent, Actor actor)Returns a value that is a percentage of the specified actor's width.
-
-
-
Field Detail
-
zero
public static final Value.Fixed zero
A value that is always zero.
-
minWidth
public static Value minWidth
Value that is the minWidth of the actor in the cell.
-
minHeight
public static Value minHeight
Value that is the minHeight of the actor in the cell.
-
prefWidth
public static Value prefWidth
Value that is the prefWidth of the actor in the cell.
-
prefHeight
public static Value prefHeight
Value that is the prefHeight of the actor in the cell.
-
maxWidth
public static Value maxWidth
Value that is the maxWidth of the actor in the cell.
-
maxHeight
public static Value maxHeight
Value that is the maxHeight of the actor in the cell.
-
-
Method Detail
-
get
public float get()
Callsget(Actor)with null.
-
percentWidth
public static Value percentWidth(float percent)
Returns a value that is a percentage of the actor's width.
-
percentHeight
public static Value percentHeight(float percent)
Returns a value that is a percentage of the actor's height.
-
percentWidth
public static Value percentWidth(float percent, Actor actor)
Returns a value that is a percentage of the specified actor's width. The context actor is ignored.
-
-