com.esotericsoftware.tablelayout
Class Cell<C>

java.lang.Object
  extended by com.esotericsoftware.tablelayout.Cell<C>

public class Cell<C>
extends Object

A cell in a table.

Author:
Nathan Sweet

Constructor Summary
Cell()
           
 
Method Summary
 Cell align(Integer align)
          Sets the alignment of the widget within the cell.
 Cell bottom()
          Adds #BOTTOM and clears #TOP for the alignment of the widget within the cell.
 Cell center()
          Sets the alignment of the widget within the cell to #CENTER.
 void clear()
          Sets all constraint fields to null.
 Cell colspan(Integer colspan)
           
 Cell expand()
          Sets expandX and expandY to 1.
 Cell expand(boolean x, boolean y)
          Sets expandX and expandY to 1 if true, 0 if false.
 Cell expand(Integer x, Integer y)
           
 Cell expandX()
          Sets expandX to 1.
 Cell expandY()
          Sets expandY to 1.
 Cell fill()
          Sets fillX and fillY to 1.
 Cell fill(boolean fill)
          Sets fillX and fillY to 1 if true, 0 if false.
 Cell fill(boolean x, boolean y)
          Sets fillX and fillY to 1 if true, 0 if false.
 Cell fill(Float x, Float y)
           
 Cell fillX()
          Sets fillX to 1.
 Cell fillY()
          Sets fillY to 1.
 void free()
          Reset state so the cell can be reused.
 Integer getAlign()
           
 Integer getColspan()
           
 int getColumn()
           
 float getComputedPadBottom()
          The actual amount of combined padding and spacing from the last layout.
 float getComputedPadLeft()
          The actual amount of combined padding and spacing from the last layout.
 float getComputedPadRight()
          The actual amount of combined padding and spacing from the last layout.
 float getComputedPadTop()
          The actual amount of combined padding and spacing from the last layout.
 Integer getExpandX()
           
 Integer getExpandY()
           
 Float getFillX()
           
 Float getFillY()
           
 boolean getIgnore()
           
 BaseTableLayout getLayout()
           
 float getMaxHeight()
           
 Value getMaxHeightValue()
           
 float getMaxWidth()
           
 Value getMaxWidthValue()
           
 float getMinHeight()
           
 Value getMinHeightValue()
           
 float getMinWidth()
           
 Value getMinWidthValue()
           
 float getPadBottom()
           
 Value getPadBottomValue()
           
 float getPadLeft()
           
 Value getPadLeftValue()
           
 float getPadRight()
           
 Value getPadRightValue()
           
 float getPadTop()
           
 Value getPadTopValue()
           
 float getPrefHeight()
           
 Value getPrefHeightValue()
           
 float getPrefWidth()
           
 Value getPrefWidthValue()
           
 int getRow()
           
 float getSpaceBottom()
           
 Value getSpaceBottomValue()
           
 float getSpaceLeft()
           
 Value getSpaceLeftValue()
           
 float getSpaceRight()
           
 Value getSpaceRightValue()
           
 float getSpaceTop()
           
 Value getSpaceTopValue()
           
 Boolean getUniformX()
           
 Boolean getUniformY()
           
 C getWidget()
          Returns the widget for this cell, or null.
 float getWidgetHeight()
           
 float getWidgetWidth()
           
 float getWidgetX()
           
 float getWidgetY()
           
 boolean hasWidget()
          Returns true if the cell's widget is not null.
 Cell height(float height)
          Sets the minHeight, prefHeight, and maxHeight to the specified value.
 Cell height(Value height)
          Sets the minHeight, prefHeight, and maxHeight to the specified value.
 Cell ignore()
          Sets ignore to true.
 Cell ignore(Boolean ignore)
           
 boolean isEndRow()
          Returns true if this cell is the last cell in the row.
 Cell left()
          Adds #LEFT and clears #RIGHT for the alignment of the widget within the cell.
 Cell maxHeight(float maxHeight)
           
 Cell maxHeight(Value maxHeight)
           
 Cell maxSize(float size)
          Sets the maxWidth and maxHeight to the specified value.
 Cell maxSize(float width, float height)
          Sets the maxWidth and maxHeight to the specified values.
 Cell maxSize(Value size)
          Sets the maxWidth and maxHeight to the specified value.
 Cell maxSize(Value width, Value height)
          Sets the maxWidth and maxHeight to the specified values.
 Cell maxWidth(float maxWidth)
           
 Cell maxWidth(Value maxWidth)
           
 Cell minHeight(float minHeight)
           
 Cell minHeight(Value minHeight)
           
 Cell minSize(float size)
          Sets the minWidth and minHeight to the specified value.
 Cell minSize(float width, float height)
          Sets the minWidth and minHeight to the specified values.
 Cell minSize(Value size)
          Sets the minWidth and minHeight to the specified value.
 Cell minSize(Value width, Value height)
          Sets the minWidth and minHeight to the specified values.
 Cell minWidth(float minWidth)
           
 Cell minWidth(Value minWidth)
           
 Cell pad(float pad)
          Sets the padTop, padLeft, padBottom, and padRight to the specified value.
 Cell pad(float top, float left, float bottom, float right)
           
 Cell pad(Value pad)
          Sets the padTop, padLeft, padBottom, and padRight to the specified value.
 Cell pad(Value top, Value left, Value bottom, Value right)
           
 Cell padBottom(float padBottom)
           
 Cell padBottom(Value padBottom)
           
 Cell padLeft(float padLeft)
           
 Cell padLeft(Value padLeft)
           
 Cell padRight(float padRight)
           
 Cell padRight(Value padRight)
           
 Cell padTop(float padTop)
           
 Cell padTop(Value padTop)
           
 Cell prefHeight(float prefHeight)
           
 Cell prefHeight(Value prefHeight)
           
 Cell prefSize(float size)
          Sets the prefWidth and prefHeight to the specified values.
 Cell prefSize(float width, float height)
          Sets the prefWidth and prefHeight to the specified value.
 Cell prefSize(Value size)
          Sets the prefWidth and prefHeight to the specified value.
 Cell prefSize(Value width, Value height)
          Sets the prefWidth and prefHeight to the specified values.
 Cell prefWidth(float prefWidth)
           
 Cell prefWidth(Value prefWidth)
           
 Cell right()
          Adds #RIGHT and clears #LEFT for the alignment of the widget within the cell.
 Cell row()
           
 void setLayout(BaseTableLayout layout)
           
 Cell setWidget(C widget)
          Sets the widget in this cell and adds the widget to the cell's table.
 void setWidgetBounds(float x, float y, float width, float height)
           
 void setWidgetHeight(float widgetHeight)
           
 void setWidgetWidth(float widgetWidth)
           
 void setWidgetX(float widgetX)
           
 void setWidgetY(float widgetY)
           
 Cell size(float size)
          Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified value.
 Cell size(float width, float height)
          Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified values.
 Cell size(Value size)
          Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified value.
 Cell size(Value width, Value height)
          Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified values.
 Cell space(float space)
          Sets the spaceTop, spaceLeft, spaceBottom, and spaceRight to the specified value.
 Cell space(float top, float left, float bottom, float right)
           
 Cell space(Value space)
          Sets the spaceTop, spaceLeft, spaceBottom, and spaceRight to the specified value.
 Cell space(Value top, Value left, Value bottom, Value right)
           
 Cell spaceBottom(float spaceBottom)
           
 Cell spaceBottom(Value spaceBottom)
           
 Cell spaceLeft(float spaceLeft)
           
 Cell spaceLeft(Value spaceLeft)
           
 Cell spaceRight(float spaceRight)
           
 Cell spaceRight(Value spaceRight)
           
 Cell spaceTop(float spaceTop)
           
 Cell spaceTop(Value spaceTop)
           
 Cell top()
          Adds #TOP and clears #BOTTOM for the alignment of the widget within the cell.
 Cell uniform()
          Sets uniformX and uniformY to true.
 Cell uniform(Boolean x, Boolean y)
           
 Cell uniformX()
          Sets uniformX to true.
 Cell uniformY()
          Sets uniformY to true.
 Cell width(float width)
          Sets the minWidth, prefWidth, and maxWidth to the specified value.
 Cell width(Value width)
          Sets the minWidth, prefWidth, and maxWidth to the specified value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cell

public Cell()
Method Detail

setLayout

public void setLayout(BaseTableLayout layout)

setWidget

public Cell setWidget(C widget)
Sets the widget in this cell and adds the widget to the cell's table. If null, removes any current widget.


getWidget

public C getWidget()
Returns the widget for this cell, or null.


hasWidget

public boolean hasWidget()
Returns true if the cell's widget is not null.


size

public Cell size(Value size)
Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified value.


size

public Cell size(Value width,
                 Value height)
Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified values.


size

public Cell size(float size)
Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified value.


size

public Cell size(float width,
                 float height)
Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified values.


width

public Cell width(Value width)
Sets the minWidth, prefWidth, and maxWidth to the specified value.


width

public Cell width(float width)
Sets the minWidth, prefWidth, and maxWidth to the specified value.


height

public Cell height(Value height)
Sets the minHeight, prefHeight, and maxHeight to the specified value.


height

public Cell height(float height)
Sets the minHeight, prefHeight, and maxHeight to the specified value.


minSize

public Cell minSize(Value size)
Sets the minWidth and minHeight to the specified value.


minSize

public Cell minSize(Value width,
                    Value height)
Sets the minWidth and minHeight to the specified values.


minWidth

public Cell minWidth(Value minWidth)

minHeight

public Cell minHeight(Value minHeight)

minSize

public Cell minSize(float size)
Sets the minWidth and minHeight to the specified value.


minSize

public Cell minSize(float width,
                    float height)
Sets the minWidth and minHeight to the specified values.


minWidth

public Cell minWidth(float minWidth)

minHeight

public Cell minHeight(float minHeight)

prefSize

public Cell prefSize(Value size)
Sets the prefWidth and prefHeight to the specified value.


prefSize

public Cell prefSize(Value width,
                     Value height)
Sets the prefWidth and prefHeight to the specified values.


prefWidth

public Cell prefWidth(Value prefWidth)

prefHeight

public Cell prefHeight(Value prefHeight)

prefSize

public Cell prefSize(float width,
                     float height)
Sets the prefWidth and prefHeight to the specified value.


prefSize

public Cell prefSize(float size)
Sets the prefWidth and prefHeight to the specified values.


prefWidth

public Cell prefWidth(float prefWidth)

prefHeight

public Cell prefHeight(float prefHeight)

maxSize

public Cell maxSize(Value size)
Sets the maxWidth and maxHeight to the specified value.


maxSize

public Cell maxSize(Value width,
                    Value height)
Sets the maxWidth and maxHeight to the specified values.


maxWidth

public Cell maxWidth(Value maxWidth)

maxHeight

public Cell maxHeight(Value maxHeight)

maxSize

public Cell maxSize(float size)
Sets the maxWidth and maxHeight to the specified value.


maxSize

public Cell maxSize(float width,
                    float height)
Sets the maxWidth and maxHeight to the specified values.


maxWidth

public Cell maxWidth(float maxWidth)

maxHeight

public Cell maxHeight(float maxHeight)

space

public Cell space(Value space)
Sets the spaceTop, spaceLeft, spaceBottom, and spaceRight to the specified value.


space

public Cell space(Value top,
                  Value left,
                  Value bottom,
                  Value right)

spaceTop

public Cell spaceTop(Value spaceTop)

spaceLeft

public Cell spaceLeft(Value spaceLeft)

spaceBottom

public Cell spaceBottom(Value spaceBottom)

spaceRight

public Cell spaceRight(Value spaceRight)

space

public Cell space(float space)
Sets the spaceTop, spaceLeft, spaceBottom, and spaceRight to the specified value.


space

public Cell space(float top,
                  float left,
                  float bottom,
                  float right)

spaceTop

public Cell spaceTop(float spaceTop)

spaceLeft

public Cell spaceLeft(float spaceLeft)

spaceBottom

public Cell spaceBottom(float spaceBottom)

spaceRight

public Cell spaceRight(float spaceRight)

pad

public Cell pad(Value pad)
Sets the padTop, padLeft, padBottom, and padRight to the specified value.


pad

public Cell pad(Value top,
                Value left,
                Value bottom,
                Value right)

padTop

public Cell padTop(Value padTop)

padLeft

public Cell padLeft(Value padLeft)

padBottom

public Cell padBottom(Value padBottom)

padRight

public Cell padRight(Value padRight)

pad

public Cell pad(float pad)
Sets the padTop, padLeft, padBottom, and padRight to the specified value.


pad

public Cell pad(float top,
                float left,
                float bottom,
                float right)

padTop

public Cell padTop(float padTop)

padLeft

public Cell padLeft(float padLeft)

padBottom

public Cell padBottom(float padBottom)

padRight

public Cell padRight(float padRight)

fill

public Cell fill()
Sets fillX and fillY to 1.


fillX

public Cell fillX()
Sets fillX to 1.


fillY

public Cell fillY()
Sets fillY to 1.


fill

public Cell fill(Float x,
                 Float y)

fill

public Cell fill(boolean x,
                 boolean y)
Sets fillX and fillY to 1 if true, 0 if false.


fill

public Cell fill(boolean fill)
Sets fillX and fillY to 1 if true, 0 if false.


align

public Cell align(Integer align)
Sets the alignment of the widget within the cell. Set to #CENTER, #TOP, #BOTTOM, #LEFT, #RIGHT, or any combination of those.


center

public Cell center()
Sets the alignment of the widget within the cell to #CENTER. This clears any other alignment.


top

public Cell top()
Adds #TOP and clears #BOTTOM for the alignment of the widget within the cell.


left

public Cell left()
Adds #LEFT and clears #RIGHT for the alignment of the widget within the cell.


bottom

public Cell bottom()
Adds #BOTTOM and clears #TOP for the alignment of the widget within the cell.


right

public Cell right()
Adds #RIGHT and clears #LEFT for the alignment of the widget within the cell.


expand

public Cell expand()
Sets expandX and expandY to 1.


expandX

public Cell expandX()
Sets expandX to 1.


expandY

public Cell expandY()
Sets expandY to 1.


expand

public Cell expand(Integer x,
                   Integer y)

expand

public Cell expand(boolean x,
                   boolean y)
Sets expandX and expandY to 1 if true, 0 if false.


ignore

public Cell ignore(Boolean ignore)

ignore

public Cell ignore()
Sets ignore to true.


getIgnore

public boolean getIgnore()

colspan

public Cell colspan(Integer colspan)

uniform

public Cell uniform()
Sets uniformX and uniformY to true.


uniformX

public Cell uniformX()
Sets uniformX to true.


uniformY

public Cell uniformY()
Sets uniformY to true.


uniform

public Cell uniform(Boolean x,
                    Boolean y)

setWidgetBounds

public void setWidgetBounds(float x,
                            float y,
                            float width,
                            float height)

getWidgetX

public float getWidgetX()

setWidgetX

public void setWidgetX(float widgetX)

getWidgetY

public float getWidgetY()

setWidgetY

public void setWidgetY(float widgetY)

getWidgetWidth

public float getWidgetWidth()

setWidgetWidth

public void setWidgetWidth(float widgetWidth)

getWidgetHeight

public float getWidgetHeight()

setWidgetHeight

public void setWidgetHeight(float widgetHeight)

getColumn

public int getColumn()

getRow

public int getRow()

getMinWidthValue

public Value getMinWidthValue()
Returns:
May be null if this cell is row defaults.

getMinWidth

public float getMinWidth()

getMinHeightValue

public Value getMinHeightValue()
Returns:
May be null if this cell is row defaults.

getMinHeight

public float getMinHeight()

getPrefWidthValue

public Value getPrefWidthValue()
Returns:
May be null if this cell is row defaults.

getPrefWidth

public float getPrefWidth()

getPrefHeightValue

public Value getPrefHeightValue()
Returns:
May be null if this cell is row defaults.

getPrefHeight

public float getPrefHeight()

getMaxWidthValue

public Value getMaxWidthValue()
Returns:
May be null if this cell is row defaults.

getMaxWidth

public float getMaxWidth()

getMaxHeightValue

public Value getMaxHeightValue()
Returns:
May be null if this cell is row defaults.

getMaxHeight

public float getMaxHeight()

getSpaceTopValue

public Value getSpaceTopValue()
Returns:
May be null if this value is not set.

getSpaceTop

public float getSpaceTop()

getSpaceLeftValue

public Value getSpaceLeftValue()
Returns:
May be null if this value is not set.

getSpaceLeft

public float getSpaceLeft()

getSpaceBottomValue

public Value getSpaceBottomValue()
Returns:
May be null if this value is not set.

getSpaceBottom

public float getSpaceBottom()

getSpaceRightValue

public Value getSpaceRightValue()
Returns:
May be null if this value is not set.

getSpaceRight

public float getSpaceRight()

getPadTopValue

public Value getPadTopValue()
Returns:
May be null if this value is not set.

getPadTop

public float getPadTop()

getPadLeftValue

public Value getPadLeftValue()
Returns:
May be null if this value is not set.

getPadLeft

public float getPadLeft()

getPadBottomValue

public Value getPadBottomValue()
Returns:
May be null if this value is not set.

getPadBottom

public float getPadBottom()

getPadRightValue

public Value getPadRightValue()
Returns:
May be null if this value is not set.

getPadRight

public float getPadRight()

getFillX

public Float getFillX()
Returns:
May be null if this value is not set.

getFillY

public Float getFillY()
Returns:
May be null.

getAlign

public Integer getAlign()
Returns:
May be null.

getExpandX

public Integer getExpandX()
Returns:
May be null.

getExpandY

public Integer getExpandY()
Returns:
May be null.

getColspan

public Integer getColspan()
Returns:
May be null.

getUniformX

public Boolean getUniformX()
Returns:
May be null.

getUniformY

public Boolean getUniformY()
Returns:
May be null.

isEndRow

public boolean isEndRow()
Returns true if this cell is the last cell in the row.


getComputedPadTop

public float getComputedPadTop()
The actual amount of combined padding and spacing from the last layout.


getComputedPadLeft

public float getComputedPadLeft()
The actual amount of combined padding and spacing from the last layout.


getComputedPadBottom

public float getComputedPadBottom()
The actual amount of combined padding and spacing from the last layout.


getComputedPadRight

public float getComputedPadRight()
The actual amount of combined padding and spacing from the last layout.


row

public Cell row()

getLayout

public BaseTableLayout getLayout()

clear

public void clear()
Sets all constraint fields to null.


free

public void free()
Reset state so the cell can be reused. Doesn't reset the constraint fields.



Copyright © 2013. All Rights Reserved.