public Void call() throws IOException { parent.reader.clearScreen(); return null; } }
/** * Possible states in which the current readline operation may be in. */ private static enum State { /** * The user is just typing away */ NORMAL, /** * In the middle of a emacs seach */ SEARCH, FORWARD_SEARCH, /** * VI "yank-to" operation ("y" during move mode) */ VI_YANK_TO, /** * VI "delete-to" operation ("d" during move mode) */ VI_DELETE_TO, /** * VI "change-to" operation ("c" during move mode) */ VI_CHANGE_TO }
@Override public void clear() { try { reader.clearScreen(); } catch (final IOException e) { throw new IllegalStateException(e); } }
private void clearScreen() throws IOException { if (terminal.isAnsiSupported()) { consoleReader.clearScreen(); } }
@Override public ExitStatus run(String... args) throws Exception { this.consoleReader.setPrompt(""); this.consoleReader.clearScreen(); return ExitStatus.OK; }
@Override public ExitStatus run(String... args) throws Exception { this.consoleReader.setPrompt(""); this.consoleReader.clearScreen(); return ExitStatus.OK; }
private void clearScreen() throws IOException { if (terminal.isAnsiSupported()) { consoleReader.clearScreen(); } }
ConsoleReader con = new ConsoleReader(); con.setPrompt(prompt1); con.clearScreen(); con.flush(); System.out.println("Press any key to continue..."); con.readCharacter(); con.clearScreen(); con.flush(); System.out.println("Here is a prompt. Do something and press enter to continue..."); String line = con.readLine(); con.clearScreen(); con.flush(); System.out.println("You typed: "); System.out.println(line); System.out.println("Press any key to exit. "); con.readCharacter(); con.clearScreen(); con.flush();
import jline.console.ConsoleReader; public class JLineTest { public static void main(String... args) throws Exception { ConsoleReader r = new ConsoleReader(); while (true) { r.println("Good morning"); r.flush(); String input = r.readLine("prompt>"); if ("clear".equals(input)) r.clearScreen(); else if ("exit".equals(input)) return; else System.out.println("You typed '" + input + "'."); } } }
@Override public void onExecuteCommand(CommandSender sender, String[] args) { try { CloudNetWrapper.getInstance().getCloudNetLogging().getReader().clearScreen(); } catch (IOException e) { } } }
@Override public void onExecuteCommand(CommandSender sender, String[] args) { try { CloudNet.getInstance().getLogger().getReader().clearScreen(); } catch (IOException e) { } } }
reader.clearScreen(); } else if (line.equalsIgnoreCase("help")) { usage();
console.clearScreen(); continue;
/** * Possible states in which the current readline operation may be in. */ private static enum State { /** * The user is just typing away */ NORMAL, /** * In the middle of a emacs seach */ SEARCH, FORWARD_SEARCH, /** * VI "yank-to" operation ("y" during move mode) */ VI_YANK_TO, /** * VI "delete-to" operation ("d" during move mode) */ VI_DELETE_TO, /** * VI "change-to" operation ("c" during move mode) */ VI_CHANGE_TO }
break; case CLEAR_COMMAND: console.clearScreen(); break; case LICENSE_COMMAND:
console.clearScreen(); console.flush(); System.exit(0); console.clearScreen(); console.flush(); proc.iterateTracks();
console.clearScreen(); return true;
if(batchFile != null && ! batchFile.isEmpty()){ console.clearScreen(); console.flush(); console.clearScreen(); console.flush(); proc.iterateTracks();