Package com.prineside.tdi2.scene2d.ui
Class Cell<T extends Actor>
java.lang.Object
com.prineside.tdi2.scene2d.ui.Cell<T>
- All Implemented Interfaces:
- Pool.Poolable
A cell for a 
Table.- Author:
- Nathan Sweet
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionalign(int align) Sets the alignment of the actor within the cell.bottom()AddsAlign.bottomand clearsAlign.topfor the alignment of the actor within the cell.center()Sets the alignment of the actor within the cell toAlign.center.Removes the current actor for the cell, if any.colspan(int colspan) static Celldefaults()Returns the defaults to use for all cells.expand()Sets expandX and expandY to 1.expand(boolean x, boolean y) Sets expandX and expandY to 1 if true, 0 if false.expand(int x, int y) expandX()Sets expandX to 1.expandY()Sets expandY to 1.fill()Sets fillX and fillY to 1.fill(boolean fill) Sets fillX and fillY to 1 if true, 0 if false.fill(boolean x, boolean y) Sets fillX and fillY to 1 if true, 0 if false.fill(float x, float y) fillX()Sets fillX to 1.fillY()Sets fillY to 1.getActor()Returns the actor for this cell, or null.floatfloatfloatfloatgetAlign()intfloatThe actual amount of combined padding and spacing from the last layout.floatThe actual amount of combined padding and spacing from the last layout.floatThe actual amount of combined padding and spacing from the last layout.floatThe actual amount of combined padding and spacing from the last layout.getFillX()getFillY()floatfloatfloatfloatfloatfloatfloatfloatfloatgetPadX()ReturnsgetPadLeft()plusgetPadRight().floatgetPadY()ReturnsgetPadTop()plusgetPadBottom().floatfloatintgetRow()floatfloatfloatfloatgetTable()grow()Sets expandX, expandY, fillX, and fillY to 1.growX()Sets expandX and fillX to 1.growY()Sets expandY and fillY to 1.booleanhasActor()Returns true if the cell's actor is not null.height(float height) Sets the minHeight, prefHeight, and maxHeight to the specified value.Sets the minHeight, prefHeight, and maxHeight to the specified value.booleanisEndRow()Returns true if this cell is the last cell in the row.left()AddsAlign.leftand clearsAlign.rightfor the alignment of the actor within the cell.maxHeight(float maxHeight) If the maxHeight is 0, no maximum height is used.If the maxHeight is 0, no maximum height is used.maxSize(float size) Sets the maxWidth and maxHeight to the specified value.maxSize(float width, float height) Sets the maxWidth and maxHeight to the specified values.Sets the maxWidth and maxHeight to the specified value.Sets the maxWidth and maxHeight to the specified values.maxWidth(float maxWidth) If the maxWidth is 0, no maximum width is used.If the maxWidth is 0, no maximum width is used.minHeight(float minHeight) minSize(float size) Sets the minWidth and minHeight to the specified value.minSize(float width, float height) Sets the minWidth and minHeight to the specified values.Sets the minWidth and minHeight to the specified value.Sets the minWidth and minHeight to the specified values.minWidth(float minWidth) pad(float pad) Sets the padTop, padLeft, padBottom, and padRight to the specified value.pad(float top, float left, float bottom, float right) Sets the padTop, padLeft, padBottom, and padRight to the specified value.padBottom(float padBottom) padLeft(float padLeft) padRight(float padRight) padTop(float padTop) prefHeight(float prefHeight) prefHeight(Value prefHeight) prefSize(float size) Sets the prefWidth and prefHeight to the specified values.prefSize(float width, float height) Sets the prefWidth and prefHeight to the specified value.Sets the prefWidth and prefHeight to the specified value.Sets the prefWidth and prefHeight to the specified values.prefWidth(float prefWidth) voidreset()Reset state so the cell can be reused, setting all constraints to theirdefaultvalues.right()AddsAlign.rightand clearsAlign.leftfor the alignment of the actor within the cell.voidrow()setActor(A newActor) Sets the actor in this cell and adds the actor to the cell's table.voidsetActorBounds(float x, float y, float width, float height) voidsetActorHeight(float actorHeight) voidsetActorWidth(float actorWidth) voidsetActorX(float actorX) voidsetActorY(float actorY) voidsize(float size) Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified value.size(float width, float height) Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified values.Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified value.Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified values.space(float space) Sets the spaceTop, spaceLeft, spaceBottom, and spaceRight to the specified value.space(float top, float left, float bottom, float right) The space cannot be < 0.Sets the spaceTop, spaceLeft, spaceBottom, and spaceRight to the specified value.spaceBottom(float spaceBottom) The space cannot be < 0.spaceBottom(Value spaceBottom) spaceLeft(float spaceLeft) The space cannot be < 0.spaceRight(float spaceRight) The space cannot be < 0.spaceRight(Value spaceRight) spaceTop(float spaceTop) The space cannot be < 0.top()AddsAlign.topand clearsAlign.bottomfor the alignment of the actor within the cell.toString()uniform()Sets uniformX and uniformY to true.uniform(boolean uniform) uniform(boolean x, boolean y) uniformX()Sets uniformX to true.uniformY()Sets uniformY to true.width(float width) Sets the minWidth, prefWidth, and maxWidth to the specified value.Sets the minWidth, prefWidth, and maxWidth to the specified value.
- 
Constructor Details- 
Cellpublic Cell()
 
- 
- 
Method Details- 
setTable
- 
setActorSets the actor in this cell and adds the actor to the cell's table. If null, removes any current actor.
- 
clearActorRemoves the current actor for the cell, if any.
- 
getActorReturns the actor for this cell, or null.
- 
hasActorpublic boolean hasActor()Returns true if the cell's actor is not null.
- 
sizeSets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified value.
- 
sizeSets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified values.
- 
sizeSets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified value.
- 
sizeSets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified values.
- 
widthSets the minWidth, prefWidth, and maxWidth to the specified value.
- 
widthSets the minWidth, prefWidth, and maxWidth to the specified value.
- 
heightSets the minHeight, prefHeight, and maxHeight to the specified value.
- 
heightSets the minHeight, prefHeight, and maxHeight to the specified value.
- 
minSizeSets the minWidth and minHeight to the specified value.
- 
minSizeSets the minWidth and minHeight to the specified values.
- 
minWidth
- 
minHeight
- 
minSizeSets the minWidth and minHeight to the specified value.
- 
minSizeSets the minWidth and minHeight to the specified values.
- 
minWidth
- 
minHeight
- 
prefSizeSets the prefWidth and prefHeight to the specified value.
- 
prefSizeSets the prefWidth and prefHeight to the specified values.
- 
prefWidth
- 
prefHeight
- 
prefSizeSets the prefWidth and prefHeight to the specified value.
- 
prefSizeSets the prefWidth and prefHeight to the specified values.
- 
prefWidth
- 
prefHeight
- 
maxSizeSets the maxWidth and maxHeight to the specified value. If the max size is 0, no maximum size is used.
- 
maxSizeSets the maxWidth and maxHeight to the specified values. If the max size is 0, no maximum size is used.
- 
maxWidthIf the maxWidth is 0, no maximum width is used.
- 
maxHeightIf the maxHeight is 0, no maximum height is used.
- 
maxSizeSets the maxWidth and maxHeight to the specified value. If the max size is 0, no maximum size is used.
- 
maxSizeSets the maxWidth and maxHeight to the specified values. If the max size is 0, no maximum size is used.
- 
maxWidthIf the maxWidth is 0, no maximum width is used.
- 
maxHeightIf the maxHeight is 0, no maximum height is used.
- 
spaceSets the spaceTop, spaceLeft, spaceBottom, and spaceRight to the specified value.
- 
space
- 
spaceTop
- 
spaceLeft
- 
spaceBottom
- 
spaceRight
- 
spaceSets the spaceTop, spaceLeft, spaceBottom, and spaceRight to the specified value. The space cannot be < 0.
- 
spaceThe space cannot be < 0.
- 
spaceTopThe space cannot be < 0.
- 
spaceLeftThe space cannot be < 0.
- 
spaceBottomThe space cannot be < 0.
- 
spaceRightThe space cannot be < 0.
- 
padSets the padTop, padLeft, padBottom, and padRight to the specified value.
- 
pad
- 
padTop
- 
padLeft
- 
padBottom
- 
padRight
- 
padSets the padTop, padLeft, padBottom, and padRight to the specified value.
- 
pad
- 
padTop
- 
padLeft
- 
padBottom
- 
padRight
- 
fillSets fillX and fillY to 1.
- 
fillXSets fillX to 1.
- 
fillYSets fillY to 1.
- 
fill
- 
fillSets fillX and fillY to 1 if true, 0 if false.
- 
fillSets fillX and fillY to 1 if true, 0 if false.
- 
alignSets the alignment of the actor within the cell. Set toAlign.center,Align.top,Align.bottom,Align.left,Align.right, or any combination of those.
- 
centerSets the alignment of the actor within the cell toAlign.center. This clears any other alignment.
- 
topAddsAlign.topand clearsAlign.bottomfor the alignment of the actor within the cell.
- 
leftAddsAlign.leftand clearsAlign.rightfor the alignment of the actor within the cell.
- 
bottomAddsAlign.bottomand clearsAlign.topfor the alignment of the actor within the cell.
- 
rightAddsAlign.rightand clearsAlign.leftfor the alignment of the actor within the cell.
- 
growSets expandX, expandY, fillX, and fillY to 1.
- 
growXSets expandX and fillX to 1.
- 
growYSets expandY and fillY to 1.
- 
expandSets expandX and expandY to 1.
- 
expandXSets expandX to 1.
- 
expandYSets expandY to 1.
- 
expand
- 
expandSets expandX and expandY to 1 if true, 0 if false.
- 
colspan
- 
uniformSets uniformX and uniformY to true.
- 
uniformXSets uniformX to true.
- 
uniformYSets uniformY to true.
- 
uniform
- 
uniform
- 
setActorBoundspublic void setActorBounds(float x, float y, float width, float height) 
- 
getActorXpublic float getActorX()
- 
setActorXpublic void setActorX(float actorX) 
- 
getActorYpublic float getActorY()
- 
setActorYpublic void setActorY(float actorY) 
- 
getActorWidthpublic float getActorWidth()
- 
setActorWidthpublic void setActorWidth(float actorWidth) 
- 
getActorHeightpublic float getActorHeight()
- 
setActorHeightpublic void setActorHeight(float actorHeight) 
- 
getColumnpublic int getColumn()
- 
getRowpublic int getRow()
- 
getMinWidthValue- Returns:
- May be null if this cell is row defaults.
 
- 
getMinWidthpublic float getMinWidth()
- 
getMinHeightValue- Returns:
- May be null if this cell is row defaults.
 
- 
getMinHeightpublic float getMinHeight()
- 
getPrefWidthValue- Returns:
- May be null if this cell is row defaults.
 
- 
getPrefWidthpublic float getPrefWidth()
- 
getPrefHeightValue- Returns:
- May be null if this cell is row defaults.
 
- 
getPrefHeightpublic float getPrefHeight()
- 
getMaxWidthValue- Returns:
- May be null if this cell is row defaults.
 
- 
getMaxWidthpublic float getMaxWidth()
- 
getMaxHeightValue- Returns:
- May be null if this cell is row defaults.
 
- 
getMaxHeightpublic float getMaxHeight()
- 
getSpaceTopValue- Returns:
- May be null if this value is not set.
 
- 
getSpaceToppublic float getSpaceTop()
- 
getSpaceLeftValue- Returns:
- May be null if this value is not set.
 
- 
getSpaceLeftpublic float getSpaceLeft()
- 
getSpaceBottomValue- Returns:
- May be null if this value is not set.
 
- 
getSpaceBottompublic float getSpaceBottom()
- 
getSpaceRightValue- Returns:
- May be null if this value is not set.
 
- 
getSpaceRightpublic float getSpaceRight()
- 
getPadTopValue- Returns:
- May be null if this value is not set.
 
- 
getPadToppublic float getPadTop()
- 
getPadLeftValue- Returns:
- May be null if this value is not set.
 
- 
getPadLeftpublic float getPadLeft()
- 
getPadBottomValue- Returns:
- May be null if this value is not set.
 
- 
getPadBottompublic float getPadBottom()
- 
getPadRightValue- Returns:
- May be null if this value is not set.
 
- 
getPadRightpublic float getPadRight()
- 
getPadXpublic float getPadX()ReturnsgetPadLeft()plusgetPadRight().
- 
getPadYpublic float getPadY()ReturnsgetPadTop()plusgetPadBottom().
- 
getFillX
- 
getFillY
- 
getAlign
- 
getExpandX
- 
getExpandY
- 
getColspan
- 
getUniformX
- 
getUniformY
- 
isEndRowpublic boolean isEndRow()Returns true if this cell is the last cell in the row.
- 
getComputedPadToppublic float getComputedPadTop()The actual amount of combined padding and spacing from the last layout.
- 
getComputedPadLeftpublic float getComputedPadLeft()The actual amount of combined padding and spacing from the last layout.
- 
getComputedPadBottompublic float getComputedPadBottom()The actual amount of combined padding and spacing from the last layout.
- 
getComputedPadRightpublic float getComputedPadRight()The actual amount of combined padding and spacing from the last layout.
- 
rowpublic void row()
- 
getTable
- 
resetpublic void reset()Reset state so the cell can be reused, setting all constraints to theirdefaultvalues.- Specified by:
- resetin interface- Pool.Poolable
 
- 
toString
- 
defaultsReturns the defaults to use for all cells. This can be used to avoid needing to set the same defaults for every table (eg, for spacing).
 
-