|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.scenes.scene2d.Actor
com.badlogic.gdx.scenes.scene2d.Group
com.badlogic.gdx.scenes.scene2d.ui.tablelayout.Table
public class Table
Field Summary | |
---|---|
boolean |
isPressed
|
Fields inherited from class com.badlogic.gdx.scenes.scene2d.Group |
---|
batchTransform, children, debug, debugTexture, focusedActor, groups, immutableChildren, immutableGroups, keyboardFocusedActor, lastTouchedChild, localTransform, namesToActors, oldBatchTransform, point, scrollFocusedActor, transform, worldTransform |
Fields inherited from class com.badlogic.gdx.scenes.scene2d.Actor |
---|
actions, color, height, name, originX, originY, parent, rotation, scaleX, scaleY, touchable, visible, width, x, y |
Constructor Summary | |
---|---|
Table()
|
|
Table(java.lang.String name)
|
|
Table(TableLayout layout)
|
|
Table(TableLayout layout,
java.lang.String name)
|
Method Summary | |
---|---|
Cell |
add(Actor actor)
Adds a new cell to the table with the specified actor. |
Table |
align(int align)
Alignment of the table within the actor being laid out. |
Table |
align(java.lang.String value)
Alignment of the table within the actor being laid out. |
Table |
bottom()
Sets the alignment of the table within the actor being laid out to Align.BOTTOM . |
Table |
center()
Sets the alignment of the table within the actor being laid out to Align.CENTER . |
void |
clear()
Removes all actors and cells from the table. |
void |
click()
|
Cell |
columnDefaults(int column)
Gets the cell values that will be used as the defaults for all cells in the specified column. |
Table |
debug()
Turns on all debug lines. |
Table |
debug(int debug)
Turns on debug lines. |
Table |
debug(java.lang.String value)
Turns on debug lines. |
Cell |
defaults()
The cell values that will be used as the defaults for all cells. |
void |
draw(SpriteBatch batch,
float parentAlpha)
Draws the Actor. |
static void |
drawDebug(Stage stage)
Draws the debug lines for all TableLayouts in the stage. |
void |
enableClipping(Stage stage)
Causes the contents to be clipped if they exceed the table bounds. |
int |
getAlign()
|
java.util.List<Cell> |
getAllCells()
Returns all cells, anywhere in the table hierarchy. |
java.util.List<Cell> |
getAllCells(java.lang.String namePrefix)
Returns all cells with the specified name prefix, anywhere in the table hierarchy. |
Cell |
getCell(Actor actor)
Returns the cell for the specified actor, anywhere in the table hierarchy. |
Cell |
getCell(java.lang.String name)
Returns the cell with the specified name, anywhere in the table hierarchy. |
java.util.List<Cell> |
getCells()
Returns the cells for this table. |
int |
getDebug()
|
java.lang.String |
getHeight()
|
float |
getMaxHeight()
|
float |
getMaxWidth()
|
float |
getMinHeight()
|
float |
getMinWidth()
|
java.lang.String |
getPadBottom()
|
java.lang.String |
getPadLeft()
|
java.lang.String |
getPadRight()
|
java.lang.String |
getPadTop()
|
float |
getPrefHeight()
|
float |
getPrefWidth()
|
TableLayout |
getTableLayout()
|
Actor |
getWidget(java.lang.String name)
Returns the widget with the specified name, anywhere in the table hierarchy. |
java.util.List<Actor> |
getWidgets()
Returns all named widgets, anywhere in the table hierarchy. |
java.util.List<Actor> |
getWidgets(java.lang.String namePrefix)
Returns all widgets with the specified name prefix, anywhere in the table hierarchy. |
Table |
height(int height)
The fixed height of the table. |
Table |
height(java.lang.String height)
The fixed height of the table, or null. |
Actor |
hit(float x,
float y)
|
void |
invalidate()
Invalidates the layout, forcing the next call to Layout.layout() to relayout. |
void |
invalidateHierarchy()
Invalides the layout of this actor and every parent actor to the root of the hierarchy. |
void |
layout()
Positions and sizes children of the actor being laid out using the cell associated with each child. |
Table |
left()
Sets the alignment of the table within the actor being laid out to Align.LEFT . |
Table |
pad(int pad)
Padding around the table. |
Table |
pad(int top,
int left,
int bottom,
int right)
Padding around the table. |
Table |
pad(java.lang.String pad)
Padding around the table. |
Table |
pad(java.lang.String top,
java.lang.String left,
java.lang.String bottom,
java.lang.String right)
Padding around the table. |
Table |
padBottom(int padBottom)
Padding at the bottom of the table. |
Table |
padBottom(java.lang.String padBottom)
Padding at the bottom of the table. |
Table |
padLeft(int padLeft)
Padding at the left of the table. |
Table |
padLeft(java.lang.String padLeft)
Padding at the left of the table. |
Table |
padRight(int padRight)
Padding at the right of the table. |
Table |
padRight(java.lang.String padRight)
Padding at the right of the table. |
Table |
padTop(int padTop)
Padding at the top of the table. |
Table |
padTop(java.lang.String padTop)
Padding at the top of the table. |
void |
parse(FileHandle tableDescriptionFile)
|
void |
parse(java.lang.String tableDescription)
Parses a table description and adds the actors and cells to the table. |
Actor |
register(java.lang.String name,
Actor widget)
|
void |
reset()
Removes all actors and cells from the table (same as clear() ) and additionally resets all table properties and
cell, column, and row defaults. |
Table |
right()
Sets the alignment of the table within the actor being laid out to Align.RIGHT . |
Cell |
row()
Indicates that subsequent cells should be added to a new row and returns the cell values that will be used as the defaults for all cells in the new row. |
void |
setActor(java.lang.String name,
Actor actor)
Sets the actor in the cell with the specified name. |
void |
setBackground(NinePatch background)
|
void |
setClickListener(ClickListener listener)
|
Table |
size(int width,
int height)
The fixed size of the table. |
Table |
size(java.lang.String width,
java.lang.String height)
The fixed size of the table. |
Cell |
stack(Actor... actor)
Adds a new cell to the table with the specified actors in a Stack . |
Table |
top()
Sets the alignment of the table within the actor being laid out to Align.TOP . |
boolean |
touchDown(float x,
float y,
int pointer)
|
void |
touchUp(float x,
float y,
int pointer)
|
Table |
width(int width)
The fixed width of the table. |
Table |
width(java.lang.String width)
The fixed width of the table, or null. |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Group |
---|
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, disableDebugging, drawChild, drawChildren, enableDebugging, findActor, focus, getActors, getGroups, keyboardFocus, keyDown, keyTyped, keyUp, removeActor, removeActorRecursive, resetTransform, scrolled, scrollFocus, sortChildren, swapActor, swapActor, toChildCoordinates, touchDragged, touchMoved, unfocusAll, unfocusAll, updateTransform |
Methods inherited from class com.badlogic.gdx.scenes.scene2d.Actor |
---|
action, clearActions, isMarkedToRemove, markToRemove, remove, toLocalCoordinates, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean isPressed
Constructor Detail |
---|
public Table()
public Table(TableLayout layout)
public Table(java.lang.String name)
public Table(TableLayout layout, java.lang.String name)
Method Detail |
---|
public void draw(SpriteBatch batch, float parentAlpha)
Actor
FadeIn
and
other Actions to have an effect even if they are only set on the parent of the Actor.
draw
in class Group
batch
- the spritebatch to render withparentAlpha
- the parent's alpha value.public float getPrefWidth()
getPrefWidth
in interface Layout
public float getPrefHeight()
getPrefHeight
in interface Layout
public float getMinWidth()
getMinWidth
in interface Layout
public float getMinHeight()
getMinHeight
in interface Layout
public float getMaxWidth()
getMaxWidth
in interface Layout
public float getMaxHeight()
getMaxHeight
in interface Layout
public void setBackground(NinePatch background)
background
- May be null.public void enableClipping(Stage stage)
Group.transform
to true.
public void setClickListener(ClickListener listener)
public boolean touchDown(float x, float y, int pointer)
touchDown
in class Group
public void touchUp(float x, float y, int pointer)
touchUp
in class Group
public void click()
public Actor hit(float x, float y)
hit
in class Group
public TableLayout getTableLayout()
public void clear()
clear
in class Group
public Actor register(java.lang.String name, Actor widget)
public Cell add(Actor actor)
actor
- May be null to add a cell without an actor.TableLayout#add(Actor)
public Cell stack(Actor... actor)
Stack
.
actor
- May be null to add a cell without an actor.TableLayout#stack(Actor...)
public Cell row()
TableLayout#row()
public void parse(FileHandle tableDescriptionFile)
public void parse(java.lang.String tableDescription)
TableLayout#parse(String)
public Cell columnDefaults(int column)
TableLayout#columnDefaults(int)
public Cell defaults()
TableLayout#defaults()
public void layout()
layout
in interface Layout
TableLayout.layout()
public void invalidate()
Layout
Layout.layout()
to relayout. If an actor is resized or otherwise changed
in a way that affects its layout, Layout.invalidate()
should be called.
invalidate
in interface Layout
public void invalidateHierarchy()
TableLayout.invalidateHierarchy()
public void reset()
clear()
) and additionally resets all table properties and
cell, column, and row defaults.
TableLayout#reset()
public Actor getWidget(java.lang.String name)
public java.util.List<Actor> getWidgets()
public java.util.List<Actor> getWidgets(java.lang.String namePrefix)
public Cell getCell(Actor actor)
TableLayout#getCell(Actor)
public Cell getCell(java.lang.String name)
TableLayout#getCell(String)
public java.util.List<Cell> getAllCells()
TableLayout#getAllCells()
public java.util.List<Cell> getAllCells(java.lang.String namePrefix)
TableLayout#getAllCells(String)
public java.util.List<Cell> getCells()
TableLayout#getCells()
public void setActor(java.lang.String name, Actor actor)
TableLayout#setWidget(String, Actor)
public Table size(java.lang.String width, java.lang.String height)
TableLayout#size(String, String)
public Table width(java.lang.String width)
TableLayout#width(String)
public Table height(java.lang.String height)
TableLayout#height(String)
public Table size(int width, int height)
TableLayout#size(int, int)
public Table width(int width)
TableLayout#width(int)
public Table height(int height)
TableLayout#height(int)
public Table pad(java.lang.String pad)
TableLayout#pad(String)
public Table pad(java.lang.String top, java.lang.String left, java.lang.String bottom, java.lang.String right)
TableLayout#pad(String, String, String, String)
public Table padTop(java.lang.String padTop)
TableLayout#padTop(String)
public Table padLeft(java.lang.String padLeft)
TableLayout#padLeft(String)
public Table padBottom(java.lang.String padBottom)
TableLayout#padBottom(String)
public Table padRight(java.lang.String padRight)
TableLayout#padRight(String)
public Table pad(int pad)
TableLayout#pad(int)
public Table pad(int top, int left, int bottom, int right)
TableLayout#pad(int, int, int, int)
public Table padTop(int padTop)
TableLayout#padTop(int)
public Table padLeft(int padLeft)
TableLayout#padLeft(int)
public Table padBottom(int padBottom)
TableLayout#padBottom(int)
public Table padRight(int padRight)
TableLayout#padRight(int)
public Table align(int align)
Align.CENTER
, Align.TOP
, Align.BOTTOM
, Align.LEFT
, Align.RIGHT
, or any combination of those.
TableLayout#align(int)
public Table align(java.lang.String value)
TableLayout#align(String)
public Table center()
Align.CENTER
.
TableLayout#center()
public Table top()
Align.TOP
.
TableLayout#top()
public Table left()
Align.LEFT
.
TableLayout#left()
public Table bottom()
Align.BOTTOM
.
TableLayout#bottom()
public Table right()
Align.RIGHT
.
TableLayout#right()
public Table debug()
TableLayout#debug()
public Table debug(int debug)
TableLayout#debug()
public Table debug(java.lang.String value)
TableLayout#debug(String)
public int getDebug()
public java.lang.String getHeight()
public java.lang.String getPadTop()
public java.lang.String getPadLeft()
public java.lang.String getPadBottom()
public java.lang.String getPadRight()
public int getAlign()
public static void drawDebug(Stage stage)
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |