Package jexer

Class TStatusBar

  • All Implemented Interfaces:
    java.lang.Comparable<TWidget>

    public class TStatusBar
    extends TWidget
    TStatusBar implements a status line with clickable buttons.
    • Constructor Detail

      • TStatusBar

        public TStatusBar​(TWindow window,
                          java.lang.String text)
        Public constructor.
        Parameters:
        window - the window associated with this status bar
        text - text for the bar on the bottom row
      • TStatusBar

        public TStatusBar​(TWindow window)
        Public constructor.
        Parameters:
        window - the window associated with this status bar
    • Method Detail

      • statusBarKeypress

        public boolean statusBarKeypress​(TKeypressEvent keypress)
        Handle keypresses.
        Parameters:
        keypress - keystroke event
        Returns:
        true if this keypress was consumed
      • statusBarMouseDown

        public boolean statusBarMouseDown​(TMouseEvent mouse)
        Handle mouse button presses.
        Parameters:
        mouse - mouse button event
        Returns:
        true if this mouse event was consumed
      • statusBarMouseUp

        public boolean statusBarMouseUp​(TMouseEvent mouse)
        Handle mouse button releases.
        Parameters:
        mouse - mouse button release event
        Returns:
        true if this mouse event was consumed
      • statusBarMouseMotion

        public void statusBarMouseMotion​(TMouseEvent mouse)
        Handle mouse movements.
        Parameters:
        mouse - mouse motion event
      • draw

        public void draw()
        Draw the bar.
        Overrides:
        draw in class TWidget
      • addShortcutKeypress

        public void addShortcutKeypress​(TKeypress key,
                                        TCommand cmd,
                                        java.lang.String label)
        Add a key to this status bar.
        Parameters:
        key - the key to trigger on
        cmd - the command event to issue when key is pressed or this item is clicked
        label - the label for this action
      • setText

        public void setText​(java.lang.String text)
        Set the text to display on the right side of the shortcut keys.
        Parameters:
        text - the new text