Package jexer
Class TTableWindow
- java.lang.Object
-
- jexer.TWidget
-
- jexer.TWindow
-
- jexer.TScrollableWindow
-
- jexer.TTableWindow
-
- All Implemented Interfaces:
java.lang.Comparable<TWidget>
,Scrollable
public class TTableWindow extends TScrollableWindow
TTableWindow is used to display and edit regular two-dimensional tables of cells.
-
-
Field Summary
-
Fields inherited from class jexer.TScrollableWindow
hScroller, vScroller
-
Fields inherited from class jexer.TWindow
ABSOLUTEXY, borderStyleActive, borderStyleActiveModal, borderStyleInactive, borderStyleMoving, CENTERED, helpTopic, HIDEONCLOSE, inKeyboardResize, inWindowMove, inWindowResize, MODAL, mouse, NOCLOSEBOX, NOZOOMBOX, overlay, OVERRIDEMENU, RESIZABLE, statusBar, underlay
-
-
Constructor Summary
Constructors Constructor Description TTableWindow(TApplication parent, java.io.File csvFile)
Public constructor loads a grid from a RFC4180 CSV file.TTableWindow(TApplication parent, java.io.File csvFile, int width, int height)
Public constructor loads a grid from a RFC4180 CSV file.TTableWindow(TApplication parent, java.io.File csvFile, int width, int height, int flags)
Public constructor loads a grid from a RFC4180 CSV file.TTableWindow(TApplication parent, java.io.File csvFile, int x, int y, int width, int height)
Public constructor loads a grid from a RFC4180 CSV file.TTableWindow(TApplication parent, java.io.File csvFile, int x, int y, int width, int height, int flags)
Public constructor loads a grid from a RFC4180 CSV file.TTableWindow(TApplication parent, java.lang.String title)
Public constructor sets window title.TTableWindow(TApplication parent, java.lang.String title, int width, int height)
Public constructor.TTableWindow(TApplication parent, java.lang.String title, int width, int height, int flags)
Public constructor.TTableWindow(TApplication parent, java.lang.String title, int x, int y, int width, int height)
Public constructor.TTableWindow(TApplication parent, java.lang.String title, int x, int y, int width, int height, int flags)
Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TTableWidget
getTableWidget()
Retrieve the underlying TTableWidget.void
onCommand(TCommandEvent command)
Method that subclasses can override to handle posted command events.void
onFocus()
Called by application.switchWindow() when this window gets the focus, and also by application.addWindow().void
onKeypress(TKeypressEvent keypress)
Handle keystrokes.void
onMenu(TMenuEvent menu)
Handle posted menu events.void
onMouseDown(TMouseEvent mouse)
Handle mouse press events.void
onMouseMotion(TMouseEvent mouse)
Method that subclasses can override to handle mouse movements.void
onMouseUp(TMouseEvent mouse)
Handle mouse release events.void
onResize(TResizeEvent event)
Handle window/screen resize events.void
onUnfocus()
Called by application.switchWindow() when another window gets the focus.-
Methods inherited from class jexer.TScrollableWindow
bigHorizontalDecrement, bigHorizontalIncrement, bigVerticalDecrement, bigVerticalIncrement, getBottomValue, getHorizontalBigChange, getHorizontalScroller, getHorizontalSmallChange, getHorizontalValue, getLeftValue, getRightValue, getTopValue, getVerticalBigChange, getVerticalScroller, getVerticalSmallChange, getVerticalValue, horizontalDecrement, horizontalIncrement, maximize, mouseOnHorizontalScroller, mouseOnVerticalScroller, placeScrollbars, reflowData, restore, setBottomValue, setHorizontalBigChange, setHorizontalSmallChange, setHorizontalValue, setLeftValue, setRightValue, setTopValue, setVerticalBigChange, setVerticalSmallChange, setVerticalValue, toBottom, toEnd, toHome, toLeft, toRight, toTop, verticalDecrement, verticalIncrement
-
Methods inherited from class jexer.TWindow
activate, addOverlay, addShortcutKeypress, addUnderlay, center, clearShortcutKeypresses, close, disableCloseEffect, disableOpenEffect, draw, ensureOnScreen, getAlpha, getApplication, getBackground, getBorder, getBorderControls, getBorderStyle, getBorderStyleForeground, getBorderStyleInactive, getBorderStyleModal, getBorderStyleMoving, getHelpTopic, getMaximumWindowHeight, getMaximumWindowWidth, getMinimumWindowHeight, getMinimumWindowWidth, getMouseStyle, getScreen, getStatusBar, getTitle, getWindowTheme, getZ, hasCloseBox, hasHiddenMouse, hasOverriddenMenu, hasZoomBox, hide, inMovements, isHidden, isModal, isResizable, isShortcutKeypress, isShown, mouseOnClose, mouseOnMaximize, mouseOnResize, newStatusBar, onClose, onHide, onPostDraw, onPreClose, onShow, removeShortcutKeypress, setAlpha, setBorderStyleForeground, setBorderStyleInactive, setBorderStyleModal, setBorderStyleMoving, setCloseBox, setHiddenMouse, setMaximumWindowHeight, setMaximumWindowWidth, setMinimumWindowHeight, setMinimumWindowWidth, setResizable, setTackboardsDirty, setTitle, setWindowTheme, setZ, setZoomBox, show, stopMovements, toString
-
Methods inherited from class jexer.TWidget
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, addRadioGroup, addRadioGroup, addSpinner, addSplitPane, addTable, addTable, addText, addText, addTreeViewWidget, addTreeViewWidget, compareTo, doRepaint, drawBox, drawBox, drawBoxShadow, drawChildren, fileOpenBox, fileOpenBox, fileOpenBox, fileOpenBox, fileSaveBox, getAbsoluteX, getAbsoluteY, getActiveChild, getAttrXY, getChildren, getClipboard, getCursorAbsoluteX, getCursorAbsoluteY, getCursorX, getCursorY, getCustomMousePointer, getHeight, getLayoutManager, getLocale, getParent, getTheme, getWidgetUnderMouse, getWidth, getWindow, getX, getY, handleEvent, hasChild, hLineXY, hLineXY, inputBox, inputBox, inputBox, isAbsoluteActive, isActive, isCursorVisible, isDrawable, isEchoKeystrokes, isEnabled, isPixelMouse, isVisible, messageBox, messageBox, mouseWouldHit, onIdle, onMouseDoubleClick, putAll, putAttrXY, putAttrXY, putCharXY, putCharXY, putCharXY, 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, vLineXY, vLineXY
-
-
-
-
Constructor Detail
-
TTableWindow
public TTableWindow(TApplication parent, java.lang.String title, int width, int height)
Public constructor.- Parameters:
parent
- the main applicationtitle
- window titlewidth
- width of windowheight
- height of window
-
TTableWindow
public TTableWindow(TApplication parent, java.lang.String title, int width, int height, int flags)
Public constructor.- Parameters:
parent
- the main applicationtitle
- window title, will be centered along the top borderwidth
- width of windowheight
- height of windowflags
- bitmask of RESIZABLE, CENTERED, or MODAL
-
TTableWindow
public TTableWindow(TApplication parent, java.lang.String title, int x, int y, int width, int height)
Public constructor.- Parameters:
parent
- the main applicationtitle
- window title, will be centered along the top borderx
- column relative to parenty
- row relative to parentwidth
- width of windowheight
- height of window
-
TTableWindow
public TTableWindow(TApplication parent, java.lang.String title, int x, int y, int width, int height, int flags)
Public constructor.- Parameters:
parent
- the main applicationtitle
- window titlex
- column relative to parenty
- row relative to parentwidth
- width of windowheight
- height of windowflags
- mask of RESIZABLE, CENTERED, or MODAL
-
TTableWindow
public TTableWindow(TApplication parent, java.lang.String title)
Public constructor sets window title.- Parameters:
parent
- the main applicationtitle
- the window title
-
TTableWindow
public TTableWindow(TApplication parent, java.io.File csvFile) throws java.io.IOException
Public constructor loads a grid from a RFC4180 CSV file.- Parameters:
parent
- the main applicationcsvFile
- a File referencing the CSV data- Throws:
java.io.IOException
- if a java.io operation throws
-
TTableWindow
public TTableWindow(TApplication parent, java.io.File csvFile, int width, int height) throws java.io.IOException
Public constructor loads a grid from a RFC4180 CSV file.- Parameters:
parent
- the main applicationcsvFile
- a File referencing the CSV datawidth
- width of windowheight
- height of window- Throws:
java.io.IOException
- if a java.io operation throws
-
TTableWindow
public TTableWindow(TApplication parent, java.io.File csvFile, int width, int height, int flags) throws java.io.IOException
Public constructor loads a grid from a RFC4180 CSV file.- Parameters:
parent
- the main applicationcsvFile
- a File referencing the CSV datawidth
- width of windowheight
- height of windowflags
- bitmask of RESIZABLE, CENTERED, or MODAL- Throws:
java.io.IOException
- if a java.io operation throws
-
TTableWindow
public TTableWindow(TApplication parent, java.io.File csvFile, int x, int y, int width, int height) throws java.io.IOException
Public constructor loads a grid from a RFC4180 CSV file.- Parameters:
parent
- the main applicationcsvFile
- a File referencing the CSV datax
- column relative to parenty
- row relative to parentwidth
- width of windowheight
- height of window- Throws:
java.io.IOException
- if a java.io operation throws
-
TTableWindow
public TTableWindow(TApplication parent, java.io.File csvFile, int x, int y, int width, int height, int flags) throws java.io.IOException
Public constructor loads a grid from a RFC4180 CSV file.- Parameters:
parent
- the main applicationcsvFile
- a File referencing the CSV datax
- column relative to parenty
- row relative to parentwidth
- width of windowheight
- height of windowflags
- mask of RESIZABLE, CENTERED, or MODAL- Throws:
java.io.IOException
- if a java.io operation throws
-
-
Method Detail
-
onFocus
public void onFocus()
Called by application.switchWindow() when this window gets the focus, and also by application.addWindow().
-
onUnfocus
public void onUnfocus()
Called by application.switchWindow() when another window gets the focus.
-
onMouseDown
public void onMouseDown(TMouseEvent mouse)
Handle mouse press events.- Overrides:
onMouseDown
in classTWindow
- Parameters:
mouse
- mouse button press event
-
onMouseUp
public void onMouseUp(TMouseEvent mouse)
Handle mouse release events.
-
onMouseMotion
public void onMouseMotion(TMouseEvent mouse)
Method that subclasses can override to handle mouse movements.- Overrides:
onMouseMotion
in classTWindow
- Parameters:
mouse
- mouse motion event
-
onKeypress
public void onKeypress(TKeypressEvent keypress)
Handle keystrokes.- Overrides:
onKeypress
in classTWindow
- Parameters:
keypress
- keystroke event
-
onResize
public void onResize(TResizeEvent event)
Handle window/screen resize events.- Overrides:
onResize
in classTScrollableWindow
- Parameters:
event
- resize event
-
onCommand
public void onCommand(TCommandEvent command)
Method that subclasses can override to handle posted command events.
-
onMenu
public void onMenu(TMenuEvent menu)
Handle posted menu events.
-
getTableWidget
public TTableWidget getTableWidget()
Retrieve the underlying TTableWidget.- Returns:
- the table widget
-
-