Package arc.scene.ui.layout
Class Cell<T extends Element>
java.lang.Object
arc.scene.ui.layout.Cell<T>
- All Implemented Interfaces:
Pool.Poolable
A cell for a
Table
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionalign
(int align) Sets the alignment of the element within the cell.bottom()
AddsAlign.bottom
and clearsAlign.top
for the alignment of the element within the cell.center()
Sets the alignment of the element within the cell toAlign.center
.checked
(boolean toggle) Removes the current element for the cell, if any.colspan
(int colspan) static Cell
defaults()
Returns the defaults to use for all cells.disabled
(boolean disabled) ellipsis
(boolean ellipsis) 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.fontScale
(float scale) get()
getElement shortcutgetTable()
group
(ButtonGroup<N> group) grow()
Sets expandX, expandY, fillX, and fillY to 1.growX()
Sets expandX and fillX to 1.growY()
Sets expandY and fillY to 1.boolean
Returns true if the cell's element is not null.height
(float height) Sets the minHeight, prefHeight, and maxHeight to the specified value.boolean
isEndRow()
labelAlign
(int label) labelAlign
(int label, int line) left()
AddsAlign.left
and clearsAlign.right
for the alignment of the element within the cell.margin
(float margin) marginBottom
(float margin) marginLeft
(float margin) marginRight
(float margin) marginTop
(float margin) float
maxHeight
(float maxHeight) 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.maxTextLength
(int length) For text fields.float
maxWidth()
maxWidth
(float maxWidth) float
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.float
minWidth()
minWidth
(float minWidth) pad
(float pad) Sets the marginTop, marginLeft, marginBottom, and marginRight to the specified value.pad
(float top, float left, float bottom, float right) padBottom
(float padBottom) padLeft
(float padLeft) padRight
(float padRight) padTop
(float padTop) float
float
void
reset()
Reset state so the cell can be reused, setting all constraints to theirdefault
values.right()
AddsAlign.right
and clearsAlign.left
for the alignment of the element within the cell.void
row()
scrollX
(boolean allowScrollX) scrollY
(boolean allowScrollY) void
setBounds
(float x, float y, float width, float height) setElement
(A newElement) Sets the element in this cell and adds the element to the cell's table.void
size
(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 button or label style.top()
AddsAlign.top
and clearsAlign.bottom
for the alignment of the element within the cell.toString()
uniform()
Sets uniformX and uniformY to true.uniform
(boolean x, boolean y) uniformX()
Sets uniformX to true.uniformY()
Sets uniformY to true.visible
(boolean visible) width
(float width) Sets the minWidth, prefWidth, and maxWidth to the specified value.wrap()
wrapLabel
(boolean toggle)
-
Constructor Details
-
Cell
public Cell()
-
-
Method Details
-
defaults
Returns 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). -
setLayout
-
setElement
Sets the element in this cell and adds the element to the cell's table. If null, removes any current element. -
clearElement
Removes the current element for the cell, if any. -
with
-
self
-
get
getElement shortcut -
hasElement
public boolean hasElement()Returns true if the cell's element is not null. -
prefWidth
public float prefWidth() -
prefHeight
public float prefHeight() -
maxWidth
public float maxWidth() -
maxHeight
public float maxHeight() -
minWidth
public float minWidth() -
minHeight
public float minHeight() -
tooltip
-
tooltip
-
size
Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified value. -
size
Sets the minWidth, prefWidth, maxWidth, minHeight, prefHeight, and maxHeight to the specified values. -
name
-
update
-
disabled
-
scrollX
-
scrollY
-
disabled
-
touchable
-
touchable
-
visible
-
visible
-
scaling
-
valid
-
maxTextLength
For text fields. -
wrap
-
ellipsis
-
labelAlign
-
labelAlign
-
group
-
wrapLabel
-
checked
-
checked
-
fontScale
-
color
-
margin
-
marginTop
-
marginBottom
-
marginLeft
-
marginRight
-
width
Sets the minWidth, prefWidth, and maxWidth to the specified value. -
style
Sets the button or label style. -
height
Sets the minHeight, prefHeight, and maxHeight to the specified value. -
minSize
Sets the minWidth and minHeight to the specified value. -
minSize
Sets the minWidth and minHeight to the specified values. -
minWidth
-
minHeight
-
maxSize
Sets the maxWidth and maxHeight to the specified value. -
maxSize
Sets the maxWidth and maxHeight to the specified values. -
maxWidth
-
maxHeight
-
pad
Sets the marginTop, marginLeft, marginBottom, and marginRight to the specified value. -
pad
-
padTop
-
padLeft
-
padBottom
-
padRight
-
fill
Sets fillX and fillY to 1. -
fillX
Sets fillX to 1. -
fillY
Sets fillY to 1. -
fill
-
fill
Sets fillX and fillY to 1 if true, 0 if false. -
fill
Sets fillX and fillY to 1 if true, 0 if false. -
align
Sets the alignment of the element within the cell. Set toAlign.center
,Align.top
,Align.bottom
,Align.left
,Align.right
, or any combination of those. -
center
Sets the alignment of the element within the cell toAlign.center
. This clears any other alignment. -
top
AddsAlign.top
and clearsAlign.bottom
for the alignment of the element within the cell. -
left
AddsAlign.left
and clearsAlign.right
for the alignment of the element within the cell. -
bottom
AddsAlign.bottom
and clearsAlign.top
for the alignment of the element within the cell. -
right
AddsAlign.right
and clearsAlign.left
for the alignment of the element within the cell. -
grow
Sets expandX, expandY, fillX, and fillY to 1. -
growX
Sets expandX and fillX to 1. -
growY
Sets expandY and fillY to 1. -
expand
Sets expandX and expandY to 1. -
expandX
Sets expandX to 1. -
expandY
Sets expandY to 1. -
expand
-
expand
Sets expandX and expandY to 1 if true, 0 if false. -
colspan
-
uniform
Sets uniformX and uniformY to true. -
uniformX
Sets uniformX to true. -
uniformY
Sets uniformY to true. -
uniform
-
setBounds
public void setBounds(float x, float y, float width, float height) -
isEndRow
public boolean isEndRow() -
row
public void row() -
getTable
-
reset
public void reset()Reset state so the cell can be reused, setting all constraints to theirdefault
values.- Specified by:
reset
in interfacePool.Poolable
-
set
-
toString
-