Package jexer
Class TDesktop
- java.lang.Object
-
- jexer.TWidget
-
- jexer.TWindow
-
- jexer.TDesktop
-
- All Implemented Interfaces:
java.lang.Comparable<TWidget>
- Direct Known Subclasses:
DesktopDemo
public class TDesktop extends TWindow
TDesktop is a special-class window that is drawn underneath everything else. Like a TWindow, it can contain widgets and perform "background" processing via onIdle(). But unlike a TWindow, it cannot be hidden, moved, or resized.Events are passed to TDesktop as follows:
- Mouse events are seen if they do not cover any other windows.
- Keypress events are seen if no other windows are open.
- Menu events are seen if no other windows are open.
- Command events are seen if no other windows are open.
-
-
Field Summary
-
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 TDesktop(TApplication parent)Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw()The default TDesktop draws a hatch character across everything.voidhide()Hide window.protected booleanmouseOnClose()Returns true if the mouse is currently on the close button.protected booleanmouseOnMaximize()Returns true if the mouse is currently on the maximize/restore button.protected booleanmouseOnResize()Returns true if the mouse is currently on the resizable lower right corner.voidonHide()Called by hide().voidonKeypress(TKeypressEvent keypress)Handle keystrokes.voidonMenu(TMenuEvent menu)Handle posted menu events.voidonMouseDown(TMouseEvent mouse)Handle mouse button presses.voidonMouseMotion(TMouseEvent mouse)Handle mouse movements.voidonMouseUp(TMouseEvent mouse)Handle mouse button releases.voidonResize(TResizeEvent resize)Handle window/screen resize events.voidonShow()Called by show().voidshow()Show window.-
Methods inherited from class jexer.TWindow
activate, addOverlay, addShortcutKeypress, addUnderlay, center, clearShortcutKeypresses, close, disableCloseEffect, disableOpenEffect, 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, inMovements, isHidden, isModal, isResizable, isShortcutKeypress, isShown, maximize, newStatusBar, onClose, onCommand, onFocus, onPostDraw, onPreClose, onUnfocus, removeShortcutKeypress, restore, setAlpha, setBorderStyleForeground, setBorderStyleInactive, setBorderStyleModal, setBorderStyleMoving, setCloseBox, setHiddenMouse, setMaximumWindowHeight, setMaximumWindowWidth, setMinimumWindowHeight, setMinimumWindowWidth, setResizable, setTackboardsDirty, setTitle, setWindowTheme, setZ, setZoomBox, 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
-
TDesktop
public TDesktop(TApplication parent)
Public constructor.- Parameters:
parent- parent application
-
-
Method Detail
-
onResize
public void onResize(TResizeEvent resize)
Handle window/screen resize events.
-
onMouseDown
public void onMouseDown(TMouseEvent mouse)
Handle mouse button presses.- Overrides:
onMouseDownin classTWindow- Parameters:
mouse- mouse button event
-
onMouseUp
public void onMouseUp(TMouseEvent mouse)
Handle mouse button releases.
-
onMouseMotion
public void onMouseMotion(TMouseEvent mouse)
Handle mouse movements.- Overrides:
onMouseMotionin classTWindow- Parameters:
mouse- mouse motion event
-
onKeypress
public void onKeypress(TKeypressEvent keypress)
Handle keystrokes.- Overrides:
onKeypressin classTWindow- Parameters:
keypress- keystroke event
-
onMenu
public void onMenu(TMenuEvent menu)
Handle posted menu events.
-
draw
public void draw()
The default TDesktop draws a hatch character across everything.
-
hide
public final void hide()
Hide window. This is a NOP for TDesktop.
-
show
public final void show()
Show window. This is a NOP for TDesktop.
-
onHide
public final void onHide()
Called by hide(). This is a NOP for TDesktop.
-
onShow
public final void onShow()
Called by show(). This is a NOP for TDesktop.
-
mouseOnClose
protected final boolean mouseOnClose()
Returns true if the mouse is currently on the close button.- Overrides:
mouseOnClosein classTWindow- Returns:
- true if mouse is currently on the close button
-
mouseOnMaximize
protected final boolean mouseOnMaximize()
Returns true if the mouse is currently on the maximize/restore button.- Overrides:
mouseOnMaximizein classTWindow- Returns:
- true if the mouse is currently on the maximize/restore button
-
mouseOnResize
protected final boolean mouseOnResize()
Returns true if the mouse is currently on the resizable lower right corner.- Overrides:
mouseOnResizein classTWindow- Returns:
- true if the mouse is currently on the resizable lower right corner
-
-