本文整理了Java中org.jline.terminal.Terminal.getStringCapability()
方法的一些代码示例,展示了Terminal.getStringCapability()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Terminal.getStringCapability()
方法的具体详情如下:
包路径:org.jline.terminal.Terminal
类名称:Terminal
方法名:getStringCapability
暂无
代码示例来源:origin: apache/karaf
@Override
public String getStringCapability(Capability capability) {
return terminal.getStringCapability(capability);
}
代码示例来源:origin: org.apache.karaf.shell/org.apache.karaf.shell.core
@Override
public String getStringCapability(Capability capability) {
return terminal.getStringCapability(capability);
}
代码示例来源:origin: org.jline/jline
protected boolean can(Capability single, Capability multi) {
return terminal.getStringCapability(single) != null
|| terminal.getStringCapability(multi) != null;
}
代码示例来源:origin: org.jline/jline
public static boolean hasMouseSupport(Terminal terminal) {
return terminal.getStringCapability(InfoCmp.Capability.key_mouse) != null;
}
代码示例来源:origin: com.github.fonimus/ssh-shell-starter
@Override
public String getStringCapability(InfoCmp.Capability capability) {
return delegate().getStringCapability(capability);
}
代码示例来源:origin: org.jline/jline
private int computeCost(Capability cap) {
String s = Curses.tputs(terminal.getStringCapability(cap), 0);
return s != null ? s.length() : Integer.MAX_VALUE;
}
代码示例来源:origin: org.jline/jline
public static String key(Terminal terminal, Capability capability) {
return Curses.tputs(terminal.getStringCapability(capability));
}
代码示例来源:origin: com.github.fonimus/spring-boot-ssh-shell-starter
@Override
public String getStringCapability(InfoCmp.Capability capability) {
return delegate().getStringCapability(capability);
}
代码示例来源:origin: org.jline/jline
protected boolean perform(Capability single, Capability multi, int nb) {
boolean hasMulti = terminal.getStringCapability(multi) != null;
boolean hasSingle = terminal.getStringCapability(single) != null;
if (hasMulti && (!hasSingle || cost(single) * nb > cost(multi))) {
terminal.puts(multi, nb);
return true;
} else if (hasSingle) {
for (int i = 0; i < nb; i++) {
terminal.puts(single);
}
return true;
} else {
return false;
}
}
代码示例来源:origin: org.jline/jline
public static Cursor getCursorPosition(Terminal terminal, IntConsumer discarded) {
try {
String u6 = terminal.getStringCapability(InfoCmp.Capability.user6);
String u7 = terminal.getStringCapability(InfoCmp.Capability.user7);
if (u6 == null || u7 == null) {
return null;
代码示例来源:origin: org.jline/jline
public String toAnsi(Terminal terminal) {
if (terminal != null && Terminal.TYPE_DUMB.equals(terminal.getType())) {
return toString();
}
int colors = 256;
boolean force256colors = false;
String alternateIn = null, alternateOut = null;
if (terminal != null) {
Integer max_colors = terminal.getNumericCapability(Capability.max_colors);
if (max_colors != null) {
colors = max_colors;
}
force256colors = AbstractWindowsTerminal.TYPE_WINDOWS_256_COLOR.equals(terminal.getType());
if (!DISABLE_ALTERNATE_CHARSET) {
alternateIn = Curses.tputs(terminal.getStringCapability(Capability.enter_alt_charset_mode));
alternateOut = Curses.tputs(terminal.getStringCapability(Capability.exit_alt_charset_mode));
}
}
return toAnsi(colors, force256colors, alternateIn, alternateOut);
}
代码示例来源:origin: org.jline/jline
public Display(Terminal terminal, boolean fullscreen) {
this.terminal = terminal;
this.fullScreen = fullscreen;
this.canScroll = can(Capability.insert_line, Capability.parm_insert_line)
&& can(Capability.delete_line, Capability.parm_delete_line);
this.wrapAtEol = terminal.getBooleanCapability(Capability.auto_right_margin);
this.delayedWrapAtEol = this.wrapAtEol
&& terminal.getBooleanCapability(Capability.eat_newline_glitch);
this.cursorDownIsNewLine = "\n".equals(Curses.tputs(terminal.getStringCapability(Capability.cursor_down)));
}
代码示例来源:origin: org.jline/jline
String el = terminal.getStringCapability(Capability.clr_eol);
if (el != null) {
Curses.tputs(sb, el);
内容来源于网络,如有侵权,请联系作者删除!