本文整理了Java中org.fusesource.jansi.Ansi.cursorLeft()
方法的一些代码示例,展示了Ansi.cursorLeft()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ansi.cursorLeft()
方法的具体详情如下:
包路径:org.fusesource.jansi.Ansi
类名称:Ansi
方法名:cursorLeft
暂无
代码示例来源:origin: micronaut-projects/micronaut-core
private void erasePrompt(PrintStream printStream) {
printStream.print(ansi()
.eraseLine(Ansi.Erase.BACKWARD).cursorLeft(PROMPT.length()));
}
代码示例来源:origin: micronaut-projects/micronaut-core
private Ansi moveDownToSkipPrompt() {
return ansi()
.cursorDown(1)
.cursorLeft(PROMPT.length());
}
代码示例来源:origin: micronaut-projects/micronaut-core
private Ansi erasePreviousLine(String categoryName) {
int cursorMove = this.cursorMove;
if (userInputActive) {
cursorMove++;
}
if (cursorMove > 0) {
int moveLeftLength = categoryName.length() + lastMessage.length();
if (userInputActive) {
moveLeftLength += PROMPT.length();
}
return ansi()
.cursorUp(cursorMove)
.cursorLeft(moveLeftLength)
.eraseLine(FORWARD);
}
return ansi();
}
代码示例来源:origin: org.grails/grails-bootstrap
private void erasePrompt(PrintStream printStream) {
printStream.print(ansi()
.eraseLine(Ansi.Erase.BACKWARD).cursorLeft(PROMPT.length()));
}
代码示例来源:origin: org.grails/grails-bootstrap
private Ansi moveDownToSkipPrompt() {
return ansi()
.cursorDown(1)
.cursorLeft(PROMPT.length());
}
代码示例来源:origin: org.grails/grails-bootstrap
private Ansi erasePreviousLine(String categoryName) {
int cursorMove = this.cursorMove;
if (userInputActive) cursorMove++;
if (cursorMove > 0) {
int moveLeftLength = categoryName.length() + lastMessage.length();
if (userInputActive) {
moveLeftLength += PROMPT.length();
}
return ansi()
.cursorUp(cursorMove)
.cursorLeft(moveLeftLength)
.eraseLine(FORWARD);
}
return ansi();
}
代码示例来源:origin: org.jboss.forge/forge-shell
@Override
public void cursorLeft(final int x)
{
print(new Ansi().cursorLeft(x).toString());
}
代码示例来源:origin: org.gradle/gradle-logging
private void positionCursorAt(Cursor position, Ansi ansi) {
if (writeCursor.row == position.row) {
if (writeCursor.col == position.col) {
return;
}
if (writeCursor.col < position.col) {
ansi.cursorRight(position.col - writeCursor.col);
} else {
ansi.cursorLeft(writeCursor.col - position.col);
}
} else {
if (writeCursor.col > 0) {
ansi.cursorLeft(writeCursor.col);
}
if (writeCursor.row < position.row) {
ansi.cursorUp(position.row - writeCursor.row);
} else {
ansi.cursorDown(writeCursor.row - position.row);
}
if (position.col > 0) {
ansi.cursorRight(position.col);
}
}
writeCursor.copyFrom(position);
}
代码示例来源:origin: org.jledit/core
if (lineBuilder.length() > 0) {
lineBuilder.delete(lineBuilder.length() - 1, lineBuilder.length());
console.out().print(Ansi.ansi().cursorLeft(1));
console.out().print(" ");
console.out().print(Ansi.ansi().cursorLeft(1));
内容来源于网络,如有侵权,请联系作者删除!