Package jexer

Class TTerminalWindow

    • Constructor Detail

      • TTerminalWindow

        public TTerminalWindow​(TApplication application,
                               int x,
                               int y,
                               java.lang.String commandLine)
        Public constructor spawns a custom command line.
        Parameters:
        application - TApplication that manages this window
        x - column relative to parent
        y - row relative to parent
        commandLine - the command line to execute
      • TTerminalWindow

        public TTerminalWindow​(TApplication application,
                               int x,
                               int y,
                               java.lang.String commandLine,
                               boolean closeOnExit)
        Public constructor spawns a custom command line.
        Parameters:
        application - TApplication that manages this window
        x - column relative to parent
        y - row relative to parent
        commandLine - the command line to execute
        closeOnExit - if true, close the window when the command exits
      • TTerminalWindow

        public TTerminalWindow​(TApplication application,
                               int x,
                               int y,
                               int flags,
                               java.lang.String[] command)
        Public constructor spawns a custom command line.
        Parameters:
        application - TApplication that manages this window
        x - column relative to parent
        y - row relative to parent
        flags - mask of CENTERED, MODAL, or RESIZABLE
        command - the command line to execute
      • TTerminalWindow

        public TTerminalWindow​(TApplication application,
                               int x,
                               int y,
                               int flags,
                               java.lang.String[] command,
                               boolean closeOnExit)
        Public constructor spawns a custom command line.
        Parameters:
        application - TApplication that manages this window
        x - column relative to parent
        y - row relative to parent
        flags - mask of CENTERED, MODAL, or RESIZABLE
        command - the command line to execute
        closeOnExit - if true, close the window when the command exits
      • TTerminalWindow

        public TTerminalWindow​(TApplication application,
                               int x,
                               int y,
                               int flags)
        Public constructor spawns a shell.
        Parameters:
        application - TApplication that manages this window
        x - column relative to parent
        y - row relative to parent
        flags - mask of CENTERED, MODAL, or RESIZABLE
      • TTerminalWindow

        public TTerminalWindow​(TApplication application,
                               int x,
                               int y,
                               int flags,
                               boolean closeOnExit)
        Public constructor spawns a shell.
        Parameters:
        application - TApplication that manages this window
        x - column relative to parent
        y - row relative to parent
        flags - mask of CENTERED, MODAL, or RESIZABLE
        closeOnExit - if true, close the window when the shell exits
    • Method Detail

      • draw

        public void draw()
        Draw the display buffer.
        Overrides:
        draw in class TWindow
      • onKeypress

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

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

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

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

        public java.lang.String getHelpTopic()
        Get this window's help topic to load.
        Overrides:
        getHelpTopic in class TWindow
        Returns:
        the topic name
      • getCommandLine

        public java.lang.String[] getCommandLine()
        Get the full command line that spawned the shell.
        Returns:
        the command line
      • hasHiddenMouse

        public boolean hasHiddenMouse()
        Returns true if this window does not want the application-wide mouse cursor drawn over it.
        Overrides:
        hasHiddenMouse in class TWindow
        Returns:
        true if this window does not want the application-wide mouse cursor drawn over it
      • onShellExit

        public void onShellExit()
        Hook for subclasses to be notified of the shell termination.
      • waitForOutput

        public boolean waitForOutput​(int millis)
        Wait for a period of time to get output from the launched process.
        Parameters:
        millis - millis to wait for, or 0 to wait forever
        Returns:
        true if the launched process has emitted something
      • getExitValue

        public int getExitValue()
        Get the exit value for the emulator.
        Returns:
        exit value
      • setTitle

        public final void setTitle​(java.lang.String title,
                                   boolean override)
        Set window title.
        Parameters:
        title - new window title
        override - if true, force the title to never change regardless of the desired title from the running terminal