C# 클래스 Nez.UI.Table

A group that sizes and positions children using table constraints. By default, {@link #getTouchable()} is {@link Touchable#childrenOnly}. The preferred and minimum sizes are that of the chdebugn when laid out in columns and rows.
상속: Group
파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
backgroundBottom Value
backgroundLeft Value
backgroundRight Value
backgroundTop Value
clip bool
debugCellColor Color
debugElementColor Color
debugTableColor Color

보호된 프로퍼티들

프로퍼티 타입 설명
_background IDrawable

공개 메소드들

메소드 설명
Table ( ) : System
add ( ) : Cell

Adds a cell without an element

add ( Element element ) : Cell

Adds a new cell to the table with the specified element.

add ( string text ) : Cell

Adds a new cell with a label

addDebugRect ( float x, float y, float w, float h, Color color ) : void
align ( int align ) : Table

Alignment of the logical table within the table element. Set to {@link Align#center}, {@link Align#top}, {@link Align#bottom} {@link Align#left}, {@link Align#right}, or any combination of those.

bottom ( ) : Table

Adds {@link Align#bottom} and clears {@link Align#top} for the alignment of the logical table within the table element.

center ( ) : Table

Sets the alignment of the logical table within the table element to {@link Align#center}. This clears any other alignment.

clearChildren ( ) : void

Removes all elements and cells from the table

computeDebugRects ( float x, float y, float layoutX, float layoutY, float layoutWidth, float layoutHeight, float tableWidth, float tableHeight, float hpadding, float vpadding ) : void
computeSize ( ) : void
debugAll ( ) : Table

Turn on all debug lines (table, cell, and element)

debugCell ( ) : Table

Turns on cell debug lines.

debugElement ( ) : Table

Turns on element debug lines.

debugRender ( Graphics graphics ) : void
debugTable ( ) : Table

Turns on table debug lines.

defaults ( ) : Cell

The cell values that will be used as the defaults for all cells.

draw ( Graphics graphics, float parentAlpha ) : void
endRow ( ) : void
getAlign ( ) : int
getBackground ( ) : IDrawable
getCell ( Element element ) : Cell

Returns the cell for the specified element in this table, or null.

getCells ( ) : List

returns all the Cells in the table

getColumnDefaults ( int column ) : Cell

Gets the cell values that will be used as the defaults for all cells in the specified column. Columns are indexed starting at 0

getColumnWidth ( int columnIndex ) : float

Returns the width of the specified column.

getColumns ( ) : int
getPadBottom ( ) : float
getPadBottomValue ( ) : Value
getPadLeft ( ) : float
getPadLeftValue ( ) : Value
getPadRight ( ) : float
getPadRightValue ( ) : Value
getPadTop ( ) : float
getPadTopValue ( ) : Value
getPadX ( ) : float

Returns {@link #getPadLeft()} plus {@link #getPadRight()}.

getPadY ( ) : float

Returns {@link #getPadTop()} plus {@link #getPadBottom()}.

getRowDefaults ( ) : Cell

gets the current Cell defaults. This is the same value returned by a call to row()

getRowHeight ( int rowIndex ) : float

Returns the height of the specified row.

getRows ( ) : int
hit ( Vector2 point ) : Element
invalidate ( ) : void
layout ( ) : void
layout ( float layoutX, float layoutY, float layoutWidth, float layoutHeight ) : void

Positions and sizes children of the table using the cell associated with each child. The values given are the position within the parent and size of the table.

left ( ) : Table

Adds {@link Align#left} and clears {@link Align#right} for the alignment of the logical table within the table element.

pad ( Value pad ) : Table

Sets the padTop, padLeft, padBottom, and padRight around the table to the specified value.

pad ( Value top, Value left, Value bottom, Value right ) : Table
pad ( float pad ) : Table

Sets the padTop, padLeft, padBottom, and padRight around the table to the specified value.

pad ( float top, float left, float bottom, float right ) : Table
padBottom ( Value padBottom ) : Table

Padding at the bottom edge of the table.

padBottom ( float padBottom ) : Table

Padding at the bottom edge of the table.

padLeft ( Value padLeft ) : Table

Padding at the left edge of the table.

padLeft ( float padLeft ) : Table

Padding at the left edge of the table.

padRight ( Value padRight ) : Table

Padding at the right edge of the table.

padRight ( float padRight ) : Table

Padding at the right edge of the table.

padTop ( Value padTop ) : Table

Padding at the top edge of the table.

padTop ( float padTop ) : Table

Padding at the top edge of the table.

removeElement ( Element element ) : bool
reset ( ) : void

Removes all elements and cells from the table (same as {@link #clear()}) and additionally resets all table properties and cell, column, and row defaults.

right ( ) : Table

Adds {@link Align#right} and clears {@link Align#left} for the alignment of the logical table within the table element.

round ( bool round ) : Table

If true (the default), positions and sizes are rounded to integers.

row ( ) : Cell

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.

setBackground ( IDrawable background ) : Table

background may be null to clear the background.

setDebug ( bool enabled ) : void

enables/disables all debug lines (table, cell, and widget)

setFillParent ( bool fillParent ) : Table
stack ( ) : Cell

Adds a new cell to the table with the specified elements in a {@link Stack}.

tableDebug ( TableDebug tableDebug ) : Table

Turns debug lines on or off.

top ( ) : Table

Adds {@link Align#top} and clears {@link Align#bottom} for the alignment of the logical table within the table element.

보호된 메소드들

메소드 설명
drawBackground ( Graphics graphics, float parentAlpha, float x, float y ) : void

Called to draw the background, before clipping is applied (if enabled). Default implementation draws the background drawable.

비공개 메소드들

메소드 설명
ensureSize ( float array, int size ) : float[]
obtainCell ( ) : Cell

메소드 상세

Table() 공개 메소드

public Table ( ) : System
리턴 System

add() 공개 메소드

Adds a cell without an element
public add ( ) : Cell
리턴 Cell

add() 공개 메소드

Adds a new cell to the table with the specified element.
public add ( Element element ) : Cell
element Element element.
리턴 Cell

add() 공개 메소드

Adds a new cell with a label
public add ( string text ) : Cell
text string Text.
리턴 Cell

addDebugRect() 공개 메소드

public addDebugRect ( float x, float y, float w, float h, Color color ) : void
x float
y float
w float
h float
color Color
리턴 void

align() 공개 메소드

Alignment of the logical table within the table element. Set to {@link Align#center}, {@link Align#top}, {@link Align#bottom} {@link Align#left}, {@link Align#right}, or any combination of those.
public align ( int align ) : Table
align int Align.
리턴 Table

bottom() 공개 메소드

Adds {@link Align#bottom} and clears {@link Align#top} for the alignment of the logical table within the table element.
public bottom ( ) : Table
리턴 Table

center() 공개 메소드

Sets the alignment of the logical table within the table element to {@link Align#center}. This clears any other alignment.
public center ( ) : Table
리턴 Table

clearChildren() 공개 메소드

Removes all elements and cells from the table
public clearChildren ( ) : void
리턴 void

computeDebugRects() 공개 메소드

public computeDebugRects ( float x, float y, float layoutX, float layoutY, float layoutWidth, float layoutHeight, float tableWidth, float tableHeight, float hpadding, float vpadding ) : void
x float
y float
layoutX float
layoutY float
layoutWidth float
layoutHeight float
tableWidth float
tableHeight float
hpadding float
vpadding float
리턴 void

computeSize() 공개 메소드

public computeSize ( ) : void
리턴 void

debugAll() 공개 메소드

Turn on all debug lines (table, cell, and element)
public debugAll ( ) : Table
리턴 Table

debugCell() 공개 메소드

Turns on cell debug lines.
public debugCell ( ) : Table
리턴 Table

debugElement() 공개 메소드

Turns on element debug lines.
public debugElement ( ) : Table
리턴 Table

debugRender() 공개 메소드

public debugRender ( Graphics graphics ) : void
graphics Graphics
리턴 void

debugTable() 공개 메소드

Turns on table debug lines.
public debugTable ( ) : Table
리턴 Table

defaults() 공개 메소드

The cell values that will be used as the defaults for all cells.
public defaults ( ) : Cell
리턴 Cell

draw() 공개 메소드

public draw ( Graphics graphics, float parentAlpha ) : void
graphics Graphics
parentAlpha float
리턴 void

drawBackground() 보호된 메소드

Called to draw the background, before clipping is applied (if enabled). Default implementation draws the background drawable.
protected drawBackground ( Graphics graphics, float parentAlpha, float x, float y ) : void
graphics Graphics Graphics.
parentAlpha float Parent alpha.
x float The x coordinate.
y float The y coordinate.
리턴 void

endRow() 공개 메소드

public endRow ( ) : void
리턴 void

getAlign() 공개 메소드

public getAlign ( ) : int
리턴 int

getBackground() 공개 메소드

public getBackground ( ) : IDrawable
리턴 IDrawable

getCell() 공개 메소드

Returns the cell for the specified element in this table, or null.
public getCell ( Element element ) : Cell
element Element element.
리턴 Cell

getCells() 공개 메소드

returns all the Cells in the table
public getCells ( ) : List
리턴 List

getColumnDefaults() 공개 메소드

Gets the cell values that will be used as the defaults for all cells in the specified column. Columns are indexed starting at 0
public getColumnDefaults ( int column ) : Cell
column int Column.
리턴 Cell

getColumnWidth() 공개 메소드

Returns the width of the specified column.
public getColumnWidth ( int columnIndex ) : float
columnIndex int Column index.
리턴 float

getColumns() 공개 메소드

public getColumns ( ) : int
리턴 int

getPadBottom() 공개 메소드

public getPadBottom ( ) : float
리턴 float

getPadBottomValue() 공개 메소드

public getPadBottomValue ( ) : Value
리턴 Value

getPadLeft() 공개 메소드

public getPadLeft ( ) : float
리턴 float

getPadLeftValue() 공개 메소드

public getPadLeftValue ( ) : Value
리턴 Value

getPadRight() 공개 메소드

public getPadRight ( ) : float
리턴 float

getPadRightValue() 공개 메소드

public getPadRightValue ( ) : Value
리턴 Value

getPadTop() 공개 메소드

public getPadTop ( ) : float
리턴 float

getPadTopValue() 공개 메소드

public getPadTopValue ( ) : Value
리턴 Value

getPadX() 공개 메소드

Returns {@link #getPadLeft()} plus {@link #getPadRight()}.
public getPadX ( ) : float
리턴 float

getPadY() 공개 메소드

Returns {@link #getPadTop()} plus {@link #getPadBottom()}.
public getPadY ( ) : float
리턴 float

getRowDefaults() 공개 메소드

gets the current Cell defaults. This is the same value returned by a call to row()
public getRowDefaults ( ) : Cell
리턴 Cell

getRowHeight() 공개 메소드

Returns the height of the specified row.
public getRowHeight ( int rowIndex ) : float
rowIndex int Row index.
리턴 float

getRows() 공개 메소드

public getRows ( ) : int
리턴 int

hit() 공개 메소드

public hit ( Vector2 point ) : Element
point Vector2
리턴 Element

invalidate() 공개 메소드

public invalidate ( ) : void
리턴 void

layout() 공개 메소드

public layout ( ) : void
리턴 void

layout() 공개 메소드

Positions and sizes children of the table using the cell associated with each child. The values given are the position within the parent and size of the table.
public layout ( float layoutX, float layoutY, float layoutWidth, float layoutHeight ) : void
layoutX float Layout x.
layoutY float Layout y.
layoutWidth float Layout width.
layoutHeight float Layout height.
리턴 void

left() 공개 메소드

Adds {@link Align#left} and clears {@link Align#right} for the alignment of the logical table within the table element.
public left ( ) : Table
리턴 Table

pad() 공개 메소드

Sets the padTop, padLeft, padBottom, and padRight around the table to the specified value.
public pad ( Value pad ) : Table
pad Value Pad.
리턴 Table

pad() 공개 메소드

public pad ( Value top, Value left, Value bottom, Value right ) : Table
top Value
left Value
bottom Value
right Value
리턴 Table

pad() 공개 메소드

Sets the padTop, padLeft, padBottom, and padRight around the table to the specified value.
public pad ( float pad ) : Table
pad float Pad.
리턴 Table

pad() 공개 메소드

public pad ( float top, float left, float bottom, float right ) : Table
top float
left float
bottom float
right float
리턴 Table

padBottom() 공개 메소드

Padding at the bottom edge of the table.
public padBottom ( Value padBottom ) : Table
padBottom Value Pad bottom.
리턴 Table

padBottom() 공개 메소드

Padding at the bottom edge of the table.
public padBottom ( float padBottom ) : Table
padBottom float Pad bottom.
리턴 Table

padLeft() 공개 메소드

Padding at the left edge of the table.
public padLeft ( Value padLeft ) : Table
padLeft Value Pad left.
리턴 Table

padLeft() 공개 메소드

Padding at the left edge of the table.
public padLeft ( float padLeft ) : Table
padLeft float Pad left.
리턴 Table

padRight() 공개 메소드

Padding at the right edge of the table.
public padRight ( Value padRight ) : Table
padRight Value Pad right.
리턴 Table

padRight() 공개 메소드

Padding at the right edge of the table.
public padRight ( float padRight ) : Table
padRight float Pad right.
리턴 Table

padTop() 공개 메소드

Padding at the top edge of the table.
public padTop ( Value padTop ) : Table
padTop Value Pad top.
리턴 Table

padTop() 공개 메소드

Padding at the top edge of the table.
public padTop ( float padTop ) : Table
padTop float Pad top.
리턴 Table

removeElement() 공개 메소드

public removeElement ( Element element ) : bool
element Element
리턴 bool

reset() 공개 메소드

Removes all elements and cells from the table (same as {@link #clear()}) and additionally resets all table properties and cell, column, and row defaults.
public reset ( ) : void
리턴 void

right() 공개 메소드

Adds {@link Align#right} and clears {@link Align#left} for the alignment of the logical table within the table element.
public right ( ) : Table
리턴 Table

round() 공개 메소드

If true (the default), positions and sizes are rounded to integers.
public round ( bool round ) : Table
round bool If set to true round.
리턴 Table

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.
public row ( ) : Cell
리턴 Cell

setBackground() 공개 메소드

background may be null to clear the background.
public setBackground ( IDrawable background ) : Table
background IDrawable Background.
리턴 Table

setDebug() 공개 메소드

enables/disables all debug lines (table, cell, and widget)
public setDebug ( bool enabled ) : void
enabled bool If set to true enabled.
리턴 void

setFillParent() 공개 메소드

public setFillParent ( bool fillParent ) : Table
fillParent bool
리턴 Table

stack() 공개 메소드

Adds a new cell to the table with the specified elements in a {@link Stack}.
public stack ( ) : Cell
리턴 Cell

tableDebug() 공개 메소드

Turns debug lines on or off.
public tableDebug ( TableDebug tableDebug ) : Table
tableDebug TableDebug Table debug.
리턴 Table

top() 공개 메소드

Adds {@link Align#top} and clears {@link Align#bottom} for the alignment of the logical table within the table element.
public top ( ) : Table
리턴 Table

프로퍼티 상세

_background 보호되어 있는 프로퍼티

protected IDrawable _background
리턴 IDrawable

backgroundBottom 정적으로 공개적으로 프로퍼티

static public Value,Nez.UI backgroundBottom
리턴 Value

backgroundLeft 정적으로 공개적으로 프로퍼티

static public Value,Nez.UI backgroundLeft
리턴 Value

backgroundRight 정적으로 공개적으로 프로퍼티

static public Value,Nez.UI backgroundRight
리턴 Value

backgroundTop 정적으로 공개적으로 프로퍼티

static public Value,Nez.UI backgroundTop
리턴 Value

clip 공개적으로 프로퍼티

public bool clip
리턴 bool

debugCellColor 정적으로 공개적으로 프로퍼티

static public Color debugCellColor
리턴 Color

debugElementColor 정적으로 공개적으로 프로퍼티

static public Color debugElementColor
리턴 Color

debugTableColor 정적으로 공개적으로 프로퍼티

static public Color debugTableColor
리턴 Color