Package jexer

Class TDesktop

  • All Implemented Interfaces:
    java.lang.Comparable<TWidget>
    Direct Known Subclasses:
    Desktop, 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.
    • 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.
        Overrides:
        onResize in class TWindow
        Parameters:
        resize - resize event
      • onMouseDown

        public void onMouseDown​(TMouseEvent mouse)
        Handle mouse button presses.
        Overrides:
        onMouseDown in class TWindow
        Parameters:
        mouse - mouse button event
      • onMouseUp

        public void onMouseUp​(TMouseEvent mouse)
        Handle mouse button releases.
        Overrides:
        onMouseUp in class TWindow
        Parameters:
        mouse - mouse button release event
      • onMouseMotion

        public void onMouseMotion​(TMouseEvent mouse)
        Handle mouse movements.
        Overrides:
        onMouseMotion in class TWindow
        Parameters:
        mouse - mouse motion event
      • onKeypress

        public void onKeypress​(TKeypressEvent keypress)
        Handle keystrokes.
        Overrides:
        onKeypress in class TWindow
        Parameters:
        keypress - keystroke event
      • onMenu

        public void onMenu​(TMenuEvent menu)
        Handle posted menu events.
        Overrides:
        onMenu in class TWindow
        Parameters:
        menu - menu event
      • draw

        public void draw()
        The default TDesktop draws a hatch character across everything.
        Overrides:
        draw in class TWindow
      • hide

        public final void hide()
        Hide window. This is a NOP for TDesktop.
        Overrides:
        hide in class TWindow
      • show

        public final void show()
        Show window. This is a NOP for TDesktop.
        Overrides:
        show in class TWindow
      • onHide

        public final void onHide()
        Called by hide(). This is a NOP for TDesktop.
        Overrides:
        onHide in class TWindow
      • onShow

        public final void onShow()
        Called by show(). This is a NOP for TDesktop.
        Overrides:
        onShow in class TWindow
      • mouseOnClose

        protected final boolean mouseOnClose()
        Returns true if the mouse is currently on the close button.
        Overrides:
        mouseOnClose in class TWindow
        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 class TWindow
        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 class TWindow
        Returns:
        true if the mouse is currently on the resizable lower right corner