public class Table extends Widget
Modifier and Type | Class and Description |
---|---|
static class |
Table.Cell
Cell represents a cell of the table
|
SCROLL_DIR_ALL, SCROLL_DIR_BOTTOM, SCROLL_DIR_HORIZONTAL, SCROLL_DIR_LEFT, SCROLL_DIR_NONE, SCROLL_DIR_RIGHT, SCROLL_DIR_TOP, SCROLL_DIR_VERTICAL, SCROLLBAR_MODE_ACTIVE, SCROLLBAR_MODE_AUTO, SCROLLBAR_MODE_OFF, SCROLLBAR_MODE_ON, STATE_CHECKED, STATE_DEFAULT, STATE_DISABLED, STATE_SCROLLED
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_TOP, objImpl, SIDE_BOTTOM, SIDE_FULL, SIDE_LEFT, SIDE_RIGHT, SIDE_TOP, SIZE_CONTENT, TEXT_DECOR_NONE, TEXT_DECOR_STRIKETHROUGH, TEXT_DECOR_UNDERLINE
Constructor and Description |
---|
Table(int row,
int col)
Constructs a Table with specified number of rows and columns
|
Modifier and Type | Method and Description |
---|---|
Table.Cell |
getSelectedCell()
Returns the selected cell (pressed and/or focused)
|
void |
setCellText(int rowIndex,
int colIndex,
String text)
Sets the text of a cell of the table
|
void |
setColumnCount(int count)
Sets the number of columns of the table
|
void |
setColumnWidth(int colIndex,
int width)
Sets the width of a column of the table
|
void |
setRowCount(int count)
Sets the number of rows of the table
|
getContainer
getObjectOfState, getScrollbar, getScrollbarMode, getScrollbarOfState, getScrollBottom, getScrollDirection, getScrollLeft, getScrollRight, getScrollTop, getScrollX, getScrollY, isChecked, isClickable, isDisabled, isFloating, isHidden, isIgnoreLayout, isScrollable, isScrolled, resetAllListeners, scrollToView, scrollToView, scrollToX, scrollToX, scrollToY, scrollToY, setCancelListener, setChecked, setClickable, setClickedListener, setDisabled, setFloating, setHidden, setIgnoreLayout, setReadyListener, setScrollable, setScrollbarMode, setScrollDirection, setScrollListener, setValueChangedListener
enableClipCorner, forceNewTrack, getBackgroundColor, getBorderColor, getBorderWidth, getColumnPadding, getCoordinates, getFlexGrow, getHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getName, getPadding, getParent, getPropertyBooleanValue, getPropertyIntValue, getRadius, getRowPadding, getShadowColor, getShadowOffsetX, getShadowOffsetY, getShadowWidth, getTextColor, getTextLetterSpace, getTextLineSpace, getTranslateX, getTranslateY, getUserData, getWidth, getX, getY, isClipCornerEnabled, setAlign, setBackgroundColor, setBorderColor, setBorderWidth, setColumnPadding, setFlexGrow, setHeight, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setName, setPadding, setPadding, setParent, setPos, setPropertyValue, setPropertyValue, setPropertyValue, setPropertyValue, setRadius, setRecolor, setRowPadding, setShadowColor, setShadowOffsetX, setShadowOffsetY, setShadowWidth, setSize, setTextAlign, setTextColor, setTextDecor, setTextFont, setTextLetterSpace, setTextLineSpace, setTranslateX, setTranslateY, setUserData, setWidth, setX, setY
public Table(int row, int col)
row
- number of rowscol
- number of columnspublic void setRowCount(int count)
count
- new number of rowspublic void setColumnCount(int count)
count
- new number of columnspublic void setCellText(int rowIndex, int colIndex, String text)
rowIndex
- row index of the cellcolIndex
- column index of the celltext
- text to display in the cellpublic void setColumnWidth(int colIndex, int width)
The overall width of the table will be set to the sum of columns widths.
colIndex
- index of the columnwidth
- width of the columnpublic Table.Cell getSelectedCell()
Table.Cell