org.fusesource.jansi.Ansi.fgBright()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(163)

本文整理了Java中org.fusesource.jansi.Ansi.fgBright()方法的一些代码示例,展示了Ansi.fgBright()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ansi.fgBright()方法的具体详情如下:
包路径:org.fusesource.jansi.Ansi
类名称:Ansi
方法名:fgBright

Ansi.fgBright介绍

暂无

代码示例

代码示例来源:origin: fabric8io/docker-maven-plugin

private String getEmphasisColor(String id) {
    Ansi.Color color = COLOR_MAP.get(id.toUpperCase());
    if (color != null) {
      return id.toLowerCase().equals(id) ?
        // lower case letter means bright color ...
        ansi().fgBright(color).toString() :
        ansi().fg(color).toString();
    } else {
      return "";
    }
  }
}

代码示例来源:origin: micronaut-projects/micronaut-core

private Ansi outputCategory(Ansi ansi, String categoryName) {
  return ansi
    .a(Ansi.Attribute.INTENSITY_BOLD)
    .fgBright(BLUE)
    .a(categoryName)
    .a(SPACE)
    .a(Ansi.Attribute.INTENSITY_BOLD_OFF);
}

代码示例来源:origin: fabric8io/docker-maven-plugin

private String formatTimestamp(Timestamp timestamp,boolean withColor) {
  if (timeFormatter == null) {
    return "";
  }
  String date = timeFormatter.print(timestamp.getDate());
  return (withColor ?
      ansi().fgBright(BLACK).a(date).reset().toString() :
      date) + " ";
}

代码示例来源:origin: fabric8io/docker-maven-plugin

/** {@inheritDoc} */
public void verbose(String message, Object ... params) {
  if (verbose) {
    log.info(ansi().fgBright(BLACK).a(prefix).a(format(message, params)).reset().toString());
  }
}

代码示例来源:origin: micronaut-projects/micronaut-core

private Ansi ansiPrompt(String prompt) {
  return ansi()
    .a(Ansi.Attribute.INTENSITY_BOLD)
    .fgBright(BLUE)
    .a(prompt)
    .a(Ansi.Attribute.INTENSITY_BOLD_OFF)
    .fg(DEFAULT);
}

代码示例来源:origin: fabric8io/docker-maven-plugin

private String formatPrefix(String prefix,boolean withColor) {
  if (withColor) {
    Ansi ansi = ansi();
    if (fgBright) {
      ansi.fgBright(color);
    } else {
      ansi.fg(color);
    }
    return ansi.a(prefix).reset().toString();
  } else {
    return prefix;
  }
}

代码示例来源:origin: org.fusesource.jansi/jansi

public Ansi fgBrightMagenta() {
  return this.fgBright(Color.MAGENTA);
}

代码示例来源:origin: org.fusesource.jansi/jansi

public Ansi fgBrightRed() {
  return this.fgBright(Color.RED);
}

代码示例来源:origin: org.fusesource.jansi/jansi

public Ansi fgBrightYellow() {
  return this.fgBright(Color.YELLOW);
}

代码示例来源:origin: org.fusesource.jansi/jansi

public Ansi fgBrightDefault() {
  return this.fgBright(Color.DEFAULT);
}

代码示例来源:origin: org.fusesource.jansi/jansi

public Ansi bgBrightCyan() {
  return this.fgBright(Color.CYAN);
}

代码示例来源:origin: org.seedstack.seed/seed-shell-support

private String switchToColor(Ansi.Color color) {
  if (terminal.isAnsiSupported()) {
    return Ansi.ansi().fgBright(color).toString();
  } else {
    return "";
  }
}

代码示例来源:origin: org.seedstack.seed/seed-shell

private String switchToColor(Ansi.Color color) {
  if (terminal.isAnsiSupported()) {
    return Ansi.ansi().fgBright(color).toString();
  } else {
    return "";
  }
}

代码示例来源:origin: org.jolokia/docker-maven-plugin

private String formatTimestamp(Timestamp timestamp,boolean withColor) {
  if (timeFormatter == null) {
    return "";
  }
  String date = timeFormatter.print(timestamp.getDate());
  return (withColor ?
      ansi().fgBright(BLACK).a(date).reset().toString() :
      date) + " ";
}

代码示例来源:origin: org.jolokia/docker-maven-plugin

@Override
public void verbose(String message) {
  if (verbose) {
    log.info(ansi().fgBright(BLACK).a(LOG_PREFIX).a(message).reset().toString());
  }
}

代码示例来源:origin: org.seedstack.seed/seed-shell-support

private String coloredString(String actual, Ansi.Color color) {
  if (terminal.isAnsiSupported()) {
    return Ansi.ansi().fgBright(color).a(actual).reset().toString();
  } else {
    return actual;
  }
}

代码示例来源:origin: org.seedstack.seed/seed-shell

private String coloredString(String actual, Ansi.Color color) {
  if (terminal.isAnsiSupported()) {
    return Ansi.ansi().fgBright(color).a(actual).reset().toString();
  } else {
    return actual;
  }
}

代码示例来源:origin: com.dslplatform/dsl-clc

private void askSafe(final String question, final Color color) {
  if (withColor) {
    try {
      write(console, false, Ansi.ansi().fgBright(color).bold().a(question + " ").boldOff().reset().toString());
      return;
    } catch (NoSuchMethodError ignore) {
      warning("Incompatible jansi found on classpath. Reverting to no-color");
      withColor = false;
    }
  }
  write(console, false, question + " ");
}

代码示例来源:origin: awegmann/consoleui

/**
 * Generic method to render a message prompt. The message (displayed white) is prefixed by a
 * green question mark.
 *
 * @param message message to render as a colored prompt.
 * @return String with ANSI-Color printable prompt.
 */
protected String renderMessagePrompt(String message) {
 return (ansi().fg(Ansi.Color.GREEN).a("? ").fgBright(Ansi.Color.WHITE).a(message)).fg(Ansi.Color.DEFAULT).toString();
}

代码示例来源:origin: com.tngtech.jgiven/jgiven-core

String withColor( Color color, boolean bright, Attribute attribute, String text ) {
    if( withColor ) {
      Ansi ansi = bright ? Ansi.ansi().fgBright( color ) : Ansi.ansi().fg( color );
      if( attribute != null ) {
        ansi = ansi.a( attribute );
      }
      return ansi.a( text ).reset().toString();
    }
    return text;
  }
}

相关文章