Search in sources :

Example 1 with KeyStroke

use of com.googlecode.lanterna.input.KeyStroke in project jbang-catalog by quintesse.

the class lanterna method main.

public static void main(String[] args) {
    DefaultTerminalFactory terminalFactory = new DefaultTerminalFactory().setMouseCaptureMode(MouseCaptureMode.CLICK_RELEASE);
    try (Screen screen = terminalFactory.createScreen()) {
        screen.startScreen();
        List<String> timezonesAsStrings = new ArrayList<>(Arrays.asList(TimeZone.getAvailableIDs()));
        final WindowBasedTextGUI textGUI = new MultiWindowTextGUI(screen);
        final Window window = new BasicWindow("My Root Window");
        Panel contentPanel = new Panel().setLayoutManager(new GridLayout(2).setHorizontalSpacing(3)).addComponent(new Label("This is a label that spans two columns").setLayoutData(GridLayout.createLayoutData(// Horizontal alignment in the grid cell if the cell
        GridLayout.Alignment.BEGINNING, // Vertical alignment in the grid cell if the cell
        GridLayout.Alignment.BEGINNING, // Give the component extra horizontal space if available
        true, // Give the component extra vertical space if available
        false, // Horizontal span
        2, // Vertical span
        1))).addComponent(new Label("Text Box (aligned)")).addComponent(new TextBox().setLayoutData(GridLayout.createLayoutData(GridLayout.Alignment.BEGINNING, GridLayout.Alignment.CENTER))).addComponent(new Label("Password Box (right aligned)")).addComponent(new TextBox().setMask('*').setLayoutData(GridLayout.createLayoutData(GridLayout.Alignment.END, GridLayout.Alignment.CENTER))).addComponent(new Label("Read-only Combo Box (forced size)")).addComponent(new ComboBox<>(timezonesAsStrings).setReadOnly(true).setPreferredSize(new TerminalSize(20, 1))).addComponent(new Label("Editable Combo Box (filled)")).addComponent(new ComboBox<>("Item #1", "Item #2", "Item #3", "Item #4").setReadOnly(false).setLayoutData(GridLayout.createHorizontallyFilledLayoutData(1))).addComponent(new Label("Button (centered)")).addComponent(new Button("Button", () -> MessageDialog.showMessageDialog(textGUI, "MessageBox", "This is a message box", MessageDialogButton.OK)).setLayoutData(GridLayout.createLayoutData(GridLayout.Alignment.CENTER, GridLayout.Alignment.CENTER))).addComponent(new EmptySpace().setLayoutData(GridLayout.createHorizontallyFilledLayoutData(2))).addComponent(new Separator(Direction.HORIZONTAL).setLayoutData(GridLayout.createHorizontallyFilledLayoutData(2))).addComponent(new Button("Close", window::close).setLayoutData(GridLayout.createHorizontallyEndAlignedLayoutData(2)));
        window.setComponent(contentPanel);
        window.addWindowListener(new WindowListenerAdapter() {

            public void onUnhandledInput(Window basePane, KeyStroke keyStroke, AtomicBoolean hasBeenHandled) {
                if (keyStroke.getKeyType() == KeyType.Escape) {
                    window.close();
                }
            }
        });
        textGUI.addWindowAndWait(window);
    } catch (IOException e) {
        e.printStackTrace();
    }
}
Also used : Screen(com.googlecode.lanterna.screen.Screen) ArrayList(java.util.ArrayList) IOException(java.io.IOException) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) DefaultTerminalFactory(com.googlecode.lanterna.terminal.DefaultTerminalFactory) MessageDialogButton(com.googlecode.lanterna.gui2.dialogs.MessageDialogButton) KeyStroke(com.googlecode.lanterna.input.KeyStroke) TerminalSize(com.googlecode.lanterna.TerminalSize)

Example 2 with KeyStroke

use of com.googlecode.lanterna.input.KeyStroke in project security-lib by ncsa.

the class LanternaIO method readInput.

/**
 * Turns out that Lanterna uses a polling method to get the input (and get around the inability of Java
 * to actually read individual characters). As such it polls every 1/4 second, limiting pasting, e.g.,
 * to
 * 4 char per second (!!!!) Making it impossible to paste longer text. 1600 chars (fair sized JSON blob)
 * takes 400 sec or about 12 minutes.
 * @return
 * @throws IOException
 */
protected String readInput() throws IOException {
    // just in case
    terminal.setForegroundColor(defaultTextColor);
    // column where we start
    int startCol = terminal.getCursorPosition().getColumn();
    // row where we start
    int startRow = terminal.getCursorPosition().getRow();
    boolean keepReading = true;
    int line = 0;
    StringBuilder currentLine = new StringBuilder();
    // push it on the stack
    commandBuffer.add(0, currentLine);
    // start at current line
    int currentBufferPosition = 0;
    while (keepReading) {
        // Block input or this does not draw right at all(!).
        KeyStroke keyStroke = terminal.readInput();
        if (keyStroke != null) {
            switch(keyStroke.getKeyType()) {
                case MouseEvent:
                    System.out.println("Yo!" + keyStroke);
                    break;
                case Escape:
                // return stringBuffer.toString() + "\n";
                case // If there is some issue shutting down the JVM, it starts spitting these out. Just exit.
                EOF:
                    keepReading = false;
                    break;
                case Enter:
                    commandBufferMaxWidth = Math.max(commandBufferMaxWidth, currentLine.length());
                    if (currentBufferPosition == 0) {
                        if (1 < commandBuffer.size() && !StringUtils.equals(currentLine.toString(), commandBuffer.get(1).toString())) {
                            commandBuffer.set(0, currentLine);
                        }
                    } else {
                        if (1 < commandBuffer.size()) {
                            if (StringUtils.equals(currentLine.toString(), commandBuffer.get(1).toString())) {
                                // don't add just take away unused buffer.
                                commandBuffer.remove(0);
                            } else {
                                commandBuffer.set(0, currentLine);
                            }
                        }
                    }
                    return currentLine.toString();
                case ArrowUp:
                    if (!commandBuffer.isEmpty()) {
                        terminal.setCursorPosition(startCol, terminal.getCursorPosition().getRow());
                        // terminal.setForegroundColor(TextColor.ANSI.MAGENTA);
                        currentBufferPosition = Math.min(++currentBufferPosition, commandBuffer.size() - 1);
                        currentLine = new StringBuilder(commandBuffer.get(currentBufferPosition));
                        print(StringUtils.pad2(currentLine.toString(), commandBufferMaxWidth));
                        terminal.setCursorPosition(startCol, startRow);
                        flush();
                    }
                    break;
                case ArrowDown:
                    if (!commandBuffer.isEmpty()) {
                        // terminal.setForegroundColor(TextColor.ANSI.MAGENTA);
                        terminal.setCursorPosition(startCol, terminal.getCursorPosition().getRow());
                        currentBufferPosition = Math.max(--currentBufferPosition, 0);
                        currentLine = new StringBuilder(commandBuffer.get(currentBufferPosition));
                        print(StringUtils.pad2(currentLine.toString(), commandBufferMaxWidth));
                        terminal.setCursorPosition(startCol, startRow);
                        flush();
                    }
                    break;
                case Character:
                    int currentCol0 = terminal.getCursorPosition().getColumn();
                    int position = currentCol0 - startCol;
                    char character = keyStroke.getCharacter();
                    if (position < 0) {
                        position = 0;
                    }
                    if (currentLine.length() < position) {
                        position = currentLine.length() - 1;
                    }
                    currentLine.insert(position, character);
                    terminal.setCursorPosition(startCol + position, terminal.getCursorPosition().getRow());
                    print(currentLine.substring(position));
                    terminal.setCursorPosition(startCol + position + 1, terminal.getCursorPosition().getRow());
                    terminal.flush();
                    break;
                case ArrowLeft:
                    terminal.setCursorPosition(Math.max(0, terminal.getCursorPosition().getColumn() - 1), terminal.getCursorPosition().getRow());
                    terminal.flush();
                    break;
                case ArrowRight:
                    // Move cursor right, don't overrun end of line.
                    terminal.setCursorPosition(Math.min(startCol + currentLine.length(), terminal.getCursorPosition().getColumn() + 1), terminal.getCursorPosition().getRow());
                    terminal.flush();
                    break;
                case Backspace:
                    // delete character to LEFT of cursor and redraw
                    int currentCol = terminal.getCursorPosition().getColumn() - startCol;
                    int currentRow = terminal.getCursorPosition().getRow();
                    if (0 < currentCol && 0 < currentLine.length()) {
                        currentCol = Math.max(0, currentCol - 1);
                        currentLine = currentLine.deleteCharAt(currentCol);
                        terminal.setCursorPosition(startCol + currentCol, currentRow);
                        // terminal.setCursorPosition(terminal.getCursorPosition().getColumn() - 1, terminal.getCursorPosition().getRow());
                        // terminal.flush();
                        // blanks out last char
                        print(currentLine.substring(currentCol) + " ");
                        terminal.setCursorPosition(startCol + currentCol, currentRow);
                        terminal.flush();
                    }
                    break;
                case Delete:
                    // delete character to RIGHT of cursor and redraw
                    int currentCol1 = terminal.getCursorPosition().getColumn() - startCol;
                    int currentRow1 = terminal.getCursorPosition().getRow();
                    if (0 < currentCol1 && currentCol1 < currentLine.length()) {
                        currentCol1 = Math.min(startCol + currentLine.length() - 1, currentCol1);
                        currentLine = currentLine.deleteCharAt(currentCol1);
                        terminal.setCursorPosition(startCol + currentCol1, currentRow1);
                        // blanks out last char
                        print(currentLine.substring(currentCol1) + " ");
                        terminal.setCursorPosition(startCol + currentCol1, currentRow1);
                        flush();
                    }
                    break;
                case End:
                    terminal.setCursorPosition(startCol + currentLine.length(), startRow);
                    flush();
                    break;
                case Home:
                    terminal.setCursorPosition(startCol, startRow);
                    flush();
                    break;
                default:
            }
        }
    }
    return "";
}
Also used : KeyStroke(com.googlecode.lanterna.input.KeyStroke)

Example 3 with KeyStroke

use of com.googlecode.lanterna.input.KeyStroke in project narchy by automenta.

the class ConsoleTerminal method onKey.

@Override
public boolean onKey(KeyEvent e, boolean pressed) {
    int cc = e.getKeyCode();
    if (pressed && cc == 13) {
        term.addInput(new KeyStroke(KeyType.Enter, e.isControlDown(), e.isAltDown(), e.isShiftDown()));
    } else if (pressed && cc == 8) {
        term.addInput(new KeyStroke(KeyType.Backspace, e.isControlDown(), e.isAltDown(), e.isShiftDown()));
    } else if (pressed && cc == 27) {
        term.addInput(new KeyStroke(KeyType.Escape, e.isControlDown(), e.isAltDown(), e.isShiftDown()));
    } else if (e.isPrintableKey() && !e.isActionKey() && !e.isModifierKey()) {
        char c = e.getKeyChar();
        if (!TerminalTextUtils.isControlCharacter(c) && pressed) /* release */
        {
            // eterm.gui.getActiveWindow().handleInput(
            term.addInput(// eterm.gui.handleInput(
            new KeyStroke(c, e.isControlDown(), e.isAltDown(), e.isShiftDown()));
        } else {
            return false;
        }
    } else if (pressed) {
        KeyType c = null;
        // System.out.println(" keycode: " + e.getKeyCode());
        switch(e.getKeyCode()) {
            case KeyEvent.VK_BACK_SPACE:
                c = KeyType.Backspace;
                break;
            case KeyEvent.VK_ENTER:
                c = KeyType.Enter;
                break;
            case KeyEvent.VK_INSERT:
                c = KeyType.Insert;
                break;
            case KeyEvent.VK_HOME:
                c = KeyType.Home;
                break;
            case KeyEvent.VK_END:
                c = KeyType.End;
                break;
            case KeyEvent.VK_DELETE:
                c = KeyType.Delete;
                break;
            case KeyEvent.VK_LEFT:
                c = KeyType.ArrowLeft;
                break;
            case KeyEvent.VK_RIGHT:
                c = KeyType.ArrowRight;
                break;
            case KeyEvent.VK_UP:
                c = KeyType.ArrowUp;
                break;
            case KeyEvent.VK_DOWN:
                c = KeyType.ArrowDown;
                break;
            default:
                // System.err.println("character not handled: " + e);
                return false;
        }
        // eterm.gui.handleInput(
        // eterm.gui.getActiveWindow().handleInput(
        term.addInput(new KeyStroke(c, e.isControlDown(), e.isAltDown(), e.isShiftDown()));
    // KeyEvent.isModifierKey(KeyEvent.VK_CONTROL),
    // KeyEvent.isModifierKey(KeyEvent.VK_ALT),
    // KeyEvent.isModifierKey(KeyEvent.VK_SHIFT)
    // ));
    } else {
    // ...
    }
    return true;
}
Also used : KeyType(com.googlecode.lanterna.input.KeyType) KeyStroke(com.googlecode.lanterna.input.KeyStroke)

Example 4 with KeyStroke

use of com.googlecode.lanterna.input.KeyStroke in project java-docs-samples by GoogleCloudPlatform.

the class MqttCommandsDemo method startGui.

public static void startGui(Screen screen, TextColor theColor) throws IOException {
    try {
        /*
      You can use the DefaultTerminalFactory to create a Screen, this will generally give you the
      TerminalScreen implementation that is probably what you want to use. Please see
      VirtualScreen for more details on a separate implementation that allows you to create a
      terminal surface that is bigger than the physical size of the terminal emulator the software
      is running in. Just to demonstrate that a Screen sits on top of a Terminal,
      we are going to create one manually instead of using DefaultTerminalFactory.
       */
        /*
      Screens will only work in private mode and while you can call methods to mutate its state,
      before you can make any of these changes visible, you'll need to call startScreen()
      which will prepare and setup the terminal.
       */
        screen.startScreen();
        System.out.println("Starting the terminal...");
        /*
      Let's turn off the cursor for this tutorial
       */
        screen.setCursorPosition(null);
        /*
      Now let's draw some random content in the screen buffer
       */
        TerminalSize terminalSize = screen.getTerminalSize();
        for (int column = 0; column < terminalSize.getColumns(); column++) {
            for (int row = 0; row < terminalSize.getRows(); row++) {
                screen.setCharacter(column, row, new TextCharacter(' ', TextColor.ANSI.DEFAULT, // This will pick a random background color
                theColor));
            }
        }
        /*
      So at this point, we've only modified the back buffer in the screen, nothing is visible yet.
      In order to move the content from the back buffer to the front buffer and refresh the
      screen, we need to call refresh()
       */
        screen.refresh();
        System.out.println("Starting the terminal...");
        /*
      Ok, now we loop and keep modifying the screen until the user exits by pressing escape on
      the keyboard or the input stream is closed. When using the Swing/AWT bundled emulator,
      if the user closes the window this will result in an EOF KeyStroke.
       */
        while (true) {
            KeyStroke keyStroke = screen.pollInput();
            if (keyStroke != null && (keyStroke.getKeyType() == KeyType.Escape || keyStroke.getKeyType() == KeyType.EOF)) {
                break;
            }
            /*
        Screens will automatically listen and record size changes, but you have to let the Screen
        know when is a good time to update its internal buffers. Usually you should do this at the
        start of your "drawing" loop, if you have one. This ensures that the dimensions of the
        buffers stays constant and doesn't change while you are drawing content. The method
        doReizeIfNecessary() will check if the terminal has been resized since last time it
        was called (or since the screen was created if this is the first time calling) and
        update the buffer dimensions accordingly. It returns null if the terminal
        has not changed size since last time.
         */
            TerminalSize newSize = screen.doResizeIfNecessary();
            if (newSize != null) {
                terminalSize = newSize;
            }
            /*
        Just like with Terminal, it's probably easier to draw using TextGraphics.
        Let's do that to put a little box with information on the size of the terminal window
         */
            String sizeLabel = "Terminal Size: " + terminalSize;
            TerminalPosition labelBoxTopLeft = new TerminalPosition(1, 1);
            TerminalSize labelBoxSize = new TerminalSize(sizeLabel.length() + 2, 3);
            TerminalPosition labelBoxTopRightCorner = labelBoxTopLeft.withRelativeColumn(labelBoxSize.getColumns() - 1);
            TextGraphics textGraphics = screen.newTextGraphics();
            // This isn't really needed as we are overwriting everything below anyway, but just for
            // demonstrative purpose
            textGraphics.fillRectangle(labelBoxTopLeft, labelBoxSize, ' ');
            /*
        Draw horizontal lines, first upper then lower
         */
            textGraphics.drawLine(labelBoxTopLeft.withRelativeColumn(1), labelBoxTopLeft.withRelativeColumn(labelBoxSize.getColumns() - 2), Symbols.DOUBLE_LINE_HORIZONTAL);
            textGraphics.drawLine(labelBoxTopLeft.withRelativeRow(2).withRelativeColumn(1), labelBoxTopLeft.withRelativeRow(2).withRelativeColumn(labelBoxSize.getColumns() - 2), Symbols.DOUBLE_LINE_HORIZONTAL);
            /*
        Manually do the edges and (since it's only one) the vertical lines,
        first on the left then on the right
         */
            textGraphics.setCharacter(labelBoxTopLeft, Symbols.DOUBLE_LINE_TOP_LEFT_CORNER);
            textGraphics.setCharacter(labelBoxTopLeft.withRelativeRow(1), Symbols.DOUBLE_LINE_VERTICAL);
            textGraphics.setCharacter(labelBoxTopLeft.withRelativeRow(2), Symbols.DOUBLE_LINE_BOTTOM_LEFT_CORNER);
            textGraphics.setCharacter(labelBoxTopRightCorner, Symbols.DOUBLE_LINE_TOP_RIGHT_CORNER);
            textGraphics.setCharacter(labelBoxTopRightCorner.withRelativeRow(1), Symbols.DOUBLE_LINE_VERTICAL);
            textGraphics.setCharacter(labelBoxTopRightCorner.withRelativeRow(2), Symbols.DOUBLE_LINE_BOTTOM_RIGHT_CORNER);
            /*
        Finally put the text inside the box
         */
            textGraphics.putString(labelBoxTopLeft.withRelative(1, 1), sizeLabel);
            /*
        Ok, we are done and can display the change. Let's also be nice and allow the OS
        to schedule other threads so we don't clog up the core completely.
         */
            screen.refresh();
            Thread.yield();
        }
    } catch (IOException e) {
        e.printStackTrace();
    } finally {
        if (screen != null) {
            try {
                /*
          The close() call here will restore the terminal by exiting from private mode which
          was done in the call to startScreen()
           */
                screen.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
    screen.stopScreen();
}
Also used : TextCharacter(com.googlecode.lanterna.TextCharacter) TextGraphics(com.googlecode.lanterna.graphics.TextGraphics) KeyStroke(com.googlecode.lanterna.input.KeyStroke) TerminalSize(com.googlecode.lanterna.TerminalSize) TerminalPosition(com.googlecode.lanterna.TerminalPosition) IOException(java.io.IOException)

Example 5 with KeyStroke

use of com.googlecode.lanterna.input.KeyStroke in project claro-lang by JasonSteving99.

the class ReplTerminal method runTerminal.

public void runTerminal() {
    DefaultTerminalFactory defaultTerminalFactory = new DefaultTerminalFactory();
    UnixTerminal terminal = null;
    try {
        terminal = new UnixTerminal(System.in, System.out, StandardCharsets.UTF_8, CtrlCBehaviour.CTRL_C_KILLS_APPLICATION);
        terminal.clearScreen();
        terminal.setCursorVisible(true);
        final TextGraphics textGraphics = terminal.newTextGraphics();
        // Change to a background/foreground color combo that pops more.
        textGraphics.setForegroundColor(TextColor.ANSI.WHITE);
        textGraphics.setBackgroundColor(TextColor.ANSI.BLACK);
        textGraphics.putString(2, 0, String.format("ClaroLang %s - Press ESC/Ctr-C to exit", claroVersion), SGR.BOLD);
        // Change back to the default background/foreground colors.
        textGraphics.setForegroundColor(TextColor.ANSI.DEFAULT);
        textGraphics.setBackgroundColor(TextColor.ANSI.DEFAULT);
        final String PROMPT = ">>> ";
        textGraphics.putString(0, 1, PROMPT, SGR.BOLD);
        // Need to flush for changes to become visible.
        terminal.flush();
        // Setup the control vars that'll track the current user position and state as they use the terminal.
        StringBuilder currInstruction = new StringBuilder();
        Stack<String> prevInstructions = new Stack<>();
        int instructionIndex = 0;
        int currLine = 1;
        int currPromptCol = 0;
        KeyStroke keyStroke = terminal.readInput();
        while (keyStroke.getKeyType() != KeyType.Escape) {
            switch(keyStroke.getKeyType()) {
                case Character:
                    Character currKeyStrokeCharacter = keyStroke.getCharacter();
                    currInstruction.insert(currPromptCol, keyStroke.getCharacter().charValue());
                    currPromptCol++;
                    break;
                case ArrowUp:
                    if (instructionIndex == 0) {
                        terminal.bell();
                    } else {
                        textGraphics.putString(0, currLine, PROMPT + getSpacesStringOfLength(currInstruction.length()));
                        currInstruction.delete(0, currInstruction.length());
                        currInstruction.append(prevInstructions.elementAt(--instructionIndex));
                        currPromptCol = currInstruction.length();
                    }
                    break;
                case ArrowDown:
                    if (instructionIndex == prevInstructions.size() - 1) {
                        // Moving down after the last instruction, should just clear everything.
                        textGraphics.putString(0, currLine, PROMPT + getSpacesStringOfLength(currInstruction.length()));
                        currInstruction.delete(0, currInstruction.length());
                        instructionIndex++;
                        currPromptCol = 0;
                    } else if (instructionIndex >= prevInstructions.size()) {
                        terminal.bell();
                    } else {
                        textGraphics.putString(0, currLine, PROMPT + getSpacesStringOfLength(currInstruction.length()));
                        currInstruction.delete(0, currInstruction.length());
                        currInstruction.append(prevInstructions.elementAt(++instructionIndex));
                        currPromptCol = currInstruction.length();
                    }
                    break;
                case ArrowRight:
                    if (currPromptCol < currInstruction.length()) {
                        currPromptCol++;
                    } else {
                        terminal.bell();
                    }
                    break;
                case ArrowLeft:
                    if (currPromptCol > 0) {
                        currPromptCol--;
                    } else {
                        terminal.bell();
                    }
                    break;
                case Backspace:
                    if (currPromptCol > 0) {
                        // Overwrite the buffer so that after modifying the currInstruction, the terminal will show the correctly
                        // edited instruction.
                        textGraphics.putString(0, currLine, getSpacesStringOfLength(PROMPT.length() + currInstruction.length()));
                        currInstruction.deleteCharAt(currPromptCol - 1);
                        currPromptCol--;
                    } else {
                        terminal.bell();
                    }
                    break;
                case Enter:
                    if (currInstruction.length() > 0) {
                        prevInstructions.push(currInstruction.toString());
                        instructionIndex = prevInstructions.size();
                        currInstruction.delete(0, currInstruction.length());
                        // Setup the cursor for potential output from inputHandler.
                        if (++currLine >= terminal.getTerminalSize().getRows()) {
                            terminal.scrollLines(0, currLine - 1, 1);
                        }
                        terminal.setCursorPosition(0, currLine);
                        inputHandler.apply(prevInstructions.peek());
                        currLine = terminal.getCursorPosition().getRow();
                    } else {
                        currLine++;
                    }
                    if (currLine >= terminal.getTerminalSize().getRows()) {
                        /*
               Note that currLine is potentially pointing ahead of the last row shown in the terminal
               currently because the inputHandler may have output multiple lines. In this case, this
               scrollLines method is being told to scroll lines that are currently below the fold, but
               it appears that it handles this well.
              */
                        terminal.scrollLines(0, currLine, 1);
                    }
                    currPromptCol = 0;
                    break;
            }
            // Print the currInstruction in two parts to leave the cursor exactly where the user expects it.
            textGraphics.putString(0, currLine, PROMPT + currInstruction.toString(), SGR.BOLD);
            textGraphics.putString(0, currLine, PROMPT + currInstruction.substring(0, currPromptCol));
            terminal.flush();
            keyStroke = terminal.readInput();
        }
    } catch (IOException e) {
        e.printStackTrace();
    } finally {
        if (terminal != null) {
            try {
                terminal.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
Also used : DefaultTerminalFactory(com.googlecode.lanterna.terminal.DefaultTerminalFactory) UnixTerminal(com.googlecode.lanterna.terminal.ansi.UnixTerminal) TextGraphics(com.googlecode.lanterna.graphics.TextGraphics) KeyStroke(com.googlecode.lanterna.input.KeyStroke) IOException(java.io.IOException) Stack(java.util.Stack)

Aggregations

KeyStroke (com.googlecode.lanterna.input.KeyStroke)8 IOException (java.io.IOException)3 TerminalPosition (com.googlecode.lanterna.TerminalPosition)2 TerminalSize (com.googlecode.lanterna.TerminalSize)2 TextGraphics (com.googlecode.lanterna.graphics.TextGraphics)2 DefaultTerminalFactory (com.googlecode.lanterna.terminal.DefaultTerminalFactory)2 ArrayList (java.util.ArrayList)2 TextCharacter (com.googlecode.lanterna.TextCharacter)1 MessageDialogButton (com.googlecode.lanterna.gui2.dialogs.MessageDialogButton)1 KeyType (com.googlecode.lanterna.input.KeyType)1 Screen (com.googlecode.lanterna.screen.Screen)1 UnixTerminal (com.googlecode.lanterna.terminal.ansi.UnixTerminal)1 Stack (java.util.Stack)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1