本文整理了Java中org.jline.terminal.Terminal.puts()
方法的一些代码示例,展示了Terminal.puts()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Terminal.puts()
方法的具体详情如下:
包路径:org.jline.terminal.Terminal
类名称:Terminal
方法名:puts
暂无
代码示例来源:origin: confluentinc/ksql
@Override
public void clearScreen() {
terminal.puts(InfoCmp.Capability.clear_screen);
}
代码示例来源:origin: apache/flink
private void unsetTerminalFullScreen() {
final Terminal terminal = client.getTerminal();
terminal.puts(Capability.exit_ca_mode);
terminal.puts(Capability.keypad_local);
terminal.puts(Capability.cursor_visible);
}
代码示例来源:origin: apache/flink
private void ensureTerminalFullScreen() {
final Terminal terminal = client.getTerminal();
terminal.puts(Capability.enter_ca_mode);
terminal.puts(Capability.keypad_xmit);
terminal.puts(Capability.cursor_invisible);
}
代码示例来源:origin: apache/flink
public void clearTerminal() {
if (isPlainTerminal()) {
for (int i = 0; i < 200; i++) { // large number of empty lines
terminal.writer().println();
}
} else {
terminal.puts(InfoCmp.Capability.clear_screen);
}
}
代码示例来源:origin: apache/samza
private void clearStatusBar() {
terminal.puts(InfoCmp.Capability.save_cursor);
terminal.puts(InfoCmp.Capability.cursor_address, height - 1, 0);
terminal.puts(InfoCmp.Capability.delete_line, height - 1, 0);
terminal.puts(InfoCmp.Capability.restore_cursor);
}
代码示例来源:origin: apache/karaf
@Override
public boolean puts(Capability capability, Object... params) {
return terminal.puts(capability, params);
}
代码示例来源:origin: apache/samza
private void clearScreen() {
terminal.puts(InfoCmp.Capability.clear_screen);
}
代码示例来源:origin: org.jline/jline
private void bof() {
if (!quiet && !veryQuiet) {
terminal.puts(Capability.bell);
terminal.writer().flush();
}
}
代码示例来源:origin: org.springframework.shell/spring-shell-standard-commands
@ShellMethod("Clear the shell screen.")
public void clear() {
terminal.puts(InfoCmp.Capability.clear_screen);
}
}
代码示例来源:origin: org.jline/jline-builtins
private void bof() {
if (!quiet && !veryQuiet) {
terminal.puts(Capability.bell);
terminal.writer().flush();
}
}
代码示例来源:origin: com.aspectran/aspectran-shell-jline
@Override
public void clearScreen() {
terminal.puts(InfoCmp.Capability.clear_screen);
terminal.flush();
}
代码示例来源:origin: com.github.fonimus/spring-boot-ssh-shell-starter
@Override
public boolean puts(InfoCmp.Capability capability, Object... objects) {
return delegate().puts(capability, objects);
}
代码示例来源:origin: com.github.fonimus/ssh-shell-starter
@Override
public boolean puts(InfoCmp.Capability capability, Object... objects) {
return delegate().puts(capability, objects);
}
代码示例来源:origin: org.jline/jline
private void eof() {
nbEof++;
if (sourceIdx < sources.size() - 1) {
message = "(END) - Next: " + sources.get(sourceIdx + 1).getName();
} else {
message = "(END)";
}
if (!quiet && !veryQuiet && !quitAtFirstEof && !quitAtSecondEof) {
terminal.puts(Capability.bell);
terminal.writer().flush();
}
}
代码示例来源:origin: org.jline/jline-builtins
private void eof() {
nbEof++;
if (sourceIdx < sources.size() - 1) {
message = "(END) - Next: " + sources.get(sourceIdx + 1).getName();
} else {
message = "(END)";
}
if (!quiet && !veryQuiet && !quitAtFirstEof && !quitAtSecondEof) {
terminal.puts(Capability.bell);
terminal.writer().flush();
}
}
代码示例来源:origin: jpos/jPOS
public void exec(CLIContext ctx, String[] args) throws Exception {
ctx.getReader().getTerminal().puts(InfoCmp.Capability.clear_screen);
}
}
代码示例来源:origin: org.jline/jline
/**
* Output a platform-dependant newline.
*/
void println() {
terminal.puts(Capability.carriage_return);
print("\n");
redrawLine();
}
代码示例来源:origin: apache/samza
private void restoreTerminal(TerminalStatus status) {
// Signal handlers
terminal.handle(Terminal.Signal.INT, status.handler_INT);
terminal.handle(Terminal.Signal.QUIT, status.handler_QUIT);
terminal.handle(Terminal.Signal.TSTP, status.handler_TSTP);
terminal.handle(Terminal.Signal.CONT, status.handler_CONT);
terminal.handle(Terminal.Signal.WINCH, status.handler_WINCH);
// Attributes
terminal.setAttributes(status.attributes);
// Capability
terminal.puts(InfoCmp.Capability.exit_ca_mode);
terminal.puts(InfoCmp.Capability.cursor_visible);
}
代码示例来源:origin: batfish/batfish
private boolean clearScreen(List<String> options, List<String> parameters) {
if (!isValidArgument(options, parameters, 0, 0, 0, Command.CLEAR_SCREEN)) {
return false;
}
_reader.getTerminal().puts(Capability.clear_screen);
_reader.getTerminal().flush();
return false;
}
代码示例来源:origin: apache/felix
protected void clear(CommandSession session, Process process, String[] argv) throws Exception {
final String[] usage = {
"clear - clear screen",
"Usage: clear [OPTIONS]",
" -? --help Show help",
};
@SuppressWarnings("unused")
Options opt = parseOptions(session, usage, argv);
if (process.isTty(1)) {
Shell.getTerminal(session).puts(Capability.clear_screen);
Shell.getTerminal(session).flush();
}
}
内容来源于网络,如有侵权,请联系作者删除!