Package jexer
Class TTable.Cell
- java.lang.Object
-
- jexer.TWidget
-
- jexer.TTable.Cell
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelEdit()Cancel any pending edit.voiddraw()Draw this cell.java.lang.StringgetText()Get field text.voidonKeypress(TKeypressEvent keypress)Handle keystrokes.voidonMouseDoubleClick(TMouseEvent mouse)Handle mouse double-click events.voidonMouseDown(TMouseEvent mouse)Handle mouse press events.voidonMouseUp(TMouseEvent mouse)Handle mouse release events.voidsetReadOnly(boolean readOnly)Set an entire column of cells read-only (non-editable) or not.voidsetText(java.lang.String text)Set field text.-
Methods inherited from class jexer.TWidget
activate, activate, activate, activateAll, addButton, addCalendar, addCheckBox, addCheckBox, addComboBox, addDirectoryList, addDirectoryList, addDirectoryList, addDirectoryList, addEditor, addField, addField, addField, addField, addImage, addImage, addImage, addImage, addLabel, addLabel, addLabel, addLabel, addLabel, addLabel, addList, addList, addList, addList, addPanel, addPasswordField, addPasswordField, addPasswordField, addProgressBar, addProgressBar, addRadioGroup, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, applyCellTransform, applyCellTransform, close, compareTo, doRepaint, drawBox, drawBoxShadow, drawChildren, drawForegroundBox, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getApplication, getAttrXY, getAttrXY, getChildren, getClipboard, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getCustomMousePointer, getHeight, getLayoutManager, getLocale, getMouseStyle, getParent, getScreen, getTheme, getWidgetUnderMouse, getWidth, getWindow, getX, getY, handleEvent, hasChild, hForegroundLineXY, hLineXY, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEchoKeystrokes, isEnabled, isPixelMouse, isVisible, messageBox, messageBox, mouseWouldHit, onCommand, onIdle, onMenu, onMouseMotion, onResize, putAll, putAttrXY, putAttrXY, putBackgroundAttrBox, putBackgroundAttrXY, putBackgroundAttrXY, putCharXY, putCharXY, putCharXY, putForegroundCharXY, putForegroundStringXY, putStringXY, putStringXY, remove, remove, remove, remove, removeAll, resetTabOrder, setActive, setCursorVisible, setCursorX, setCursorY, setCustomMousePointer, setDimensions, setEchoKeystrokes, setEchoKeystrokes, setEnabled, setHeight, setLayoutManager, setLocale, setMouseStyle, setParent, setupForTWindow, setVisible, setWidth, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, toString, vLineXY, vLineXY
-
-
-
-
Constructor Detail
-
Cell
public Cell(TTable parent, int x, int y, int width, int height, int column, int row)
Public constructor.- Parameters:
parent- parent widgetx- column relative to parenty- row relative to parentwidth- width of widgetheight- height of widgetcolumn- column index of this cellrow- row index of this cell
-
-
Method Detail
-
onMouseDoubleClick
public void onMouseDoubleClick(TMouseEvent mouse)
Handle mouse double-click events.- Overrides:
onMouseDoubleClickin classTWidget- Parameters:
mouse- mouse double-click event
-
onMouseDown
public void onMouseDown(TMouseEvent mouse)
Handle mouse press events.- Overrides:
onMouseDownin classTWidget- Parameters:
mouse- mouse button press event
-
onMouseUp
public void onMouseUp(TMouseEvent mouse)
Handle mouse release events.
-
onKeypress
public void onKeypress(TKeypressEvent keypress)
Handle keystrokes.- Overrides:
onKeypressin classTWidget- Parameters:
keypress- keystroke event
-
getText
public final java.lang.String getText()
Get field text.- Returns:
- field text
-
setText
public void setText(java.lang.String text)
Set field text.- Parameters:
text- the new field text
-
cancelEdit
public void cancelEdit()
Cancel any pending edit.
-
setReadOnly
public void setReadOnly(boolean readOnly)
Set an entire column of cells read-only (non-editable) or not.- Parameters:
readOnly- if true, the cells will be non-editable
-
-