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, 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 void
draw()
The default TDesktop draws a hatch character across everything.void
hide()
Hide window.protected boolean
mouseOnClose()
Returns true if the mouse is currently on the close button.protected boolean
mouseOnMaximize()
Returns true if the mouse is currently on the maximize/restore button.protected boolean
mouseOnResize()
Returns true if the mouse is currently on the resizable lower right corner.void
onHide()
Called by hide().void
onKeypress(TKeypressEvent keypress)
Handle keystrokes.void
onMenu(TMenuEvent menu)
Handle posted menu events.void
onMouseDown(TMouseEvent mouse)
Handle mouse button presses.void
onMouseMotion(TMouseEvent mouse)
Handle mouse movements.void
onMouseUp(TMouseEvent mouse)
Handle mouse button releases.void
onResize(TResizeEvent resize)
Handle window/screen resize events.void
onShow()
Called by show().void
show()
Show window.-
Methods inherited from class jexer.TWindow
activate, addOverlay, addShortcutKeypress, addUnderlay, center, clearShortcutKeypresses, close, ensureOnScreen, getApplication, getBackground, getBorder, getBorderControls, getHelpTopic, getMaximumWindowHeight, getMaximumWindowWidth, getMinimumWindowHeight, getMinimumWindowWidth, getScreen, getStatusBar, getTitle, getZ, hasCloseBox, hasHiddenMouse, hasOverriddenMenu, hasZoomBox, inMovements, isHidden, isModal, isResizable, isShortcutKeypress, isShown, maximize, newStatusBar, onClose, onCommand, onFocus, onPreClose, onUnfocus, removeShortcutKeypress, restore, setCloseBox, setHiddenMouse, setMaximumWindowHeight, setMaximumWindowWidth, setMinimumWindowHeight, setMinimumWindowWidth, setResizable, setTackboardsDirty, setTitle, 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, 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, getMouseStyle, getParent, getTheme, getWidgetUnderMouse, getWidth, getWindow, getX, getY, handleEvent, hasChild, 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, setMouseStyle, setParent, setupForTWindow, setVisible, setWidth, setWindow, setX, setY, splitHorizontal, splitVertical, switchWidget, toPrettyString, toPrettyString, 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:
onMouseDown
in 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:
onMouseMotion
in classTWindow
- Parameters:
mouse
- mouse motion event
-
onKeypress
public void onKeypress(TKeypressEvent keypress)
Handle keystrokes.- Overrides:
onKeypress
in 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:
mouseOnClose
in 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:
mouseOnMaximize
in 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:
mouseOnResize
in classTWindow
- Returns:
- true if the mouse is currently on the resizable lower right corner
-
-