com.esotericsoftware.tablelayout
Class Value

java.lang.Object
  extended by com.esotericsoftware.tablelayout.Value
Direct Known Subclasses:
Value.CellValue, Value.FixedValue, Value.TableValue

public abstract class Value
extends Object

Base class for a table or cell property value. Values are provided a table or cell for context. Eg, the value may compute its size taking into consideration the size of the table or the widget in the cell. Some values may be only valid for use with either call.

Author:
Nathan Sweet

Nested Class Summary
static class Value.CellValue
          A value that is only valid for use with a cell.
static class Value.FixedValue
          A fixed value that is not computed each time it is used.
static class Value.TableValue
          A value that is valid for use with a table or a cell.
 
Field Summary
static Value maxHeight
          Value for a cell that is the maxHeight of the widget in the cell.
static Value maxWidth
          Value for a cell that is the maxWidth of the widget in the cell.
static Value minHeight
          Value for a cell that is the minHeight of the widget in the cell.
static Value minWidth
          Value for a cell that is the minWidth of the widget in the cell.
static Value prefHeight
          Value for a cell that is the prefHeight of the widget in the cell.
static Value prefWidth
          Value for a cell that is the prefWidth of the widget in the cell.
static Value zero
          A value that is always zero.
 
Constructor Summary
Value()
           
 
Method Summary
abstract  float get(Cell cell)
          Returns the value in the context of the specified cell.
abstract  float get(Object table)
          Returns the value in the context of the specified table.
 float height(Cell cell)
          Returns the value in the context of a height for the specified cell.
 float height(Object table)
          Returns the value in the context of a height for the specified table.
static Value percentHeight(float percent)
          Returns a value that is a percentage of the table's height.
static Value percentHeight(float percent, Object widget)
          Returns a value that is a percentage of the specified widget's height.
static Value percentWidth(float percent)
          Returns a value that is a percentage of the table's width.
static Value percentWidth(float percent, Object widget)
          Returns a value that is a percentage of the specified widget's width.
 float width(Cell cell)
          Returns the value in the context of a width for the specified cell.
 float width(Object table)
          Returns the value in the context of a width for the specified table.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

zero

public static final Value zero
A value that is always zero.


minWidth

public static Value minWidth
Value for a cell that is the minWidth of the widget in the cell.


minHeight

public static Value minHeight
Value for a cell that is the minHeight of the widget in the cell.


prefWidth

public static Value prefWidth
Value for a cell that is the prefWidth of the widget in the cell.


prefHeight

public static Value prefHeight
Value for a cell that is the prefHeight of the widget in the cell.


maxWidth

public static Value maxWidth
Value for a cell that is the maxWidth of the widget in the cell.


maxHeight

public static Value maxHeight
Value for a cell that is the maxHeight of the widget in the cell.

Constructor Detail

Value

public Value()
Method Detail

get

public abstract float get(Object table)
Returns the value in the context of the specified table.


get

public abstract float get(Cell cell)
Returns the value in the context of the specified cell.


width

public float width(Object table)
Returns the value in the context of a width for the specified table.


height

public float height(Object table)
Returns the value in the context of a height for the specified table.


width

public float width(Cell cell)
Returns the value in the context of a width for the specified cell.


height

public float height(Cell cell)
Returns the value in the context of a height for the specified cell.


percentWidth

public static Value percentWidth(float percent)
Returns a value that is a percentage of the table's width.


percentHeight

public static Value percentHeight(float percent)
Returns a value that is a percentage of the table's height.


percentWidth

public static Value percentWidth(float percent,
                                 Object widget)
Returns a value that is a percentage of the specified widget's width.


percentHeight

public static Value percentHeight(float percent,
                                  Object widget)
Returns a value that is a percentage of the specified widget's height.



Copyright © 2013. All Rights Reserved.