APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.badlogic.gdx.scenes.scene2d.ui

public abstract Class Value

extends Object
Class Inheritance
Known Direct Subclasses
com.badlogic.gdx.scenes.scene2d.ui.Value.Fixed
Imports
com.badlogic.gdx.scenes.scene2d.Actor, com.badlogic.gdx.scenes.scene2d.utils.Layout, com.badlogic.gdx.utils.Null

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 and Inner Type Summary

Modifier and TypeClass and Description
public static class
Value.Fixed

A fixed value that is not computed each time it is used.

Field Summary

Modifier and TypeField and Description
public static Value
maxHeight

Value that is the maxHeight of the actor in the cell.

public static Value
maxWidth

Value that is the maxWidth of the actor in the cell.

public static Value
minHeight

Value that is the minHeight of the actor in the cell.

public static Value
minWidth

Value that is the minWidth of the actor in the cell.

public static Value
prefHeight

Value that is the prefHeight of the actor in the cell.

public static Value
prefWidth

Value that is the prefWidth of the actor in the cell.

public static final Value.Fixed
zero

A value that is always zero.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public float
get()

Calls get(Actor) with null.

public abstract float
get(Actor
May be null.
context
)

public static Value
percentHeight(final float percent)

Returns a value that is a percentage of the actor's height.

public static Value
percentHeight(final float percent, final Actor actor)

Returns a value that is a percentage of the specified actor's height.

public static Value
percentWidth(final float percent)

Returns a value that is a percentage of the actor's width.

public static Value
percentWidth(final float percent, final Actor actor)

Returns a value that is a percentage of the specified actor's width.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

maxHeightback to summary
public static Value maxHeight

Value that is the maxHeight of the actor in the cell.

maxWidthback to summary
public static Value maxWidth

Value that is the maxWidth of the actor in the cell.

minHeightback to summary
public static Value minHeight

Value that is the minHeight of the actor in the cell.

minWidthback to summary
public static Value minWidth

Value that is the minWidth of the actor in the cell.

prefHeightback to summary
public static Value prefHeight

Value that is the prefHeight of the actor in the cell.

prefWidthback to summary
public static Value prefWidth

Value that is the prefWidth of the actor in the cell.

zeroback to summary
public static final Value.Fixed zero

A value that is always zero.

Constructor Detail

Valueback to summary
public Value()

Method Detail

getback to summary
public float get()

Calls get(Actor) with null.

getback to summary
public abstract float get(Actor context)
Parameters
context:Actor

May be null.

percentHeightback to summary
public static Value percentHeight(final float percent)

Returns a value that is a percentage of the actor's height.

percentHeightback to summary
public static Value percentHeight(final float percent, final Actor actor)

Returns a value that is a percentage of the specified actor's height. The context actor is ignored.

percentWidthback to summary
public static Value percentWidth(final float percent)

Returns a value that is a percentage of the actor's width.

percentWidthback to summary
public static Value percentWidth(final float percent, final Actor actor)

Returns a value that is a percentage of the specified actor's width. The context actor is ignored.

com.badlogic.gdx.scenes.scene2d.ui back to summary

public Class Value.Fixed

extends Value
Class Inheritance

A fixed value that is not computed each time it is used.
Author
Nathan Sweet

Field Summary

Modifier and TypeField and Description
pack-priv static final Value.Fixed[]
private final float
Inherited from com.badlogic.gdx.scenes.scene2d.ui.Value:
maxHeightmaxWidthminHeightminWidthprefHeightprefWidthzero

Constructor Summary

AccessConstructor and Description
public
Fixed(float value)

Method Summary

Modifier and TypeMethod and Description
public float
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public static Value.Fixed
valueOf(float value)

Inherited from com.badlogic.gdx.scenes.scene2d.ui.Value:
getpercentHeightpercentHeightpercentWidthpercentWidth

Field Detail

cacheback to summary
pack-priv static final Value.Fixed[] cache
valueback to summary
private final float value

Constructor Detail

Fixedback to summary
public Fixed(float value)

Method Detail

getback to summary
public float get(Actor context)

Implements abstract com.badlogic.gdx.scenes.scene2d.ui.Value.get.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

valueOfback to summary
public static Value.Fixed valueOf(float value)