本文整理汇总了Java中com.github.lalyos.jfiglet.FigletFont类的典型用法代码示例。如果您正苦于以下问题:Java FigletFont类的具体用法?Java FigletFont怎么用?Java FigletFont使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FigletFont类属于com.github.lalyos.jfiglet包,在下文中一共展示了FigletFont类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: run
import com.github.lalyos.jfiglet.FigletFont; //导入依赖的package包/类
/**
* Run this app service
*/
public void run(){
// Print banner
try {
String banner = FigletFont.convertOneLine("lol52");
LOG.info("\n" + banner);
} catch (IOException e) {
e.printStackTrace();
}
// Initialize the Database Helper
mDb.init();
// Initialize the API
mApi.init();
// Initialize the Nexus
mNexus.init();
}
开发者ID:52inc,项目名称:lol52,代码行数:24,代码来源:AppService.java
示例2: printAsciiArtWarning
import com.github.lalyos.jfiglet.FigletFont; //导入依赖的package包/类
/**
* Print ascii art.
*
* @param out the out
* @param asciiArt the ascii art
* @param additional the additional
*/
public static void printAsciiArtWarning(final Logger out, final String asciiArt, final String additional) {
try {
out.warn(ANSI_CYAN);
out.warn("\n\n".concat(FigletFont.convertOneLine(asciiArt)).concat(additional));
out.warn(ANSI_RESET);
} catch (final Exception e) {
throw Throwables.propagate(e);
}
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:17,代码来源:AsciiArtUtils.java
示例3: printAsciiArtInfo
import com.github.lalyos.jfiglet.FigletFont; //导入依赖的package包/类
/**
* Print ascii art info.
*
* @param out the out
* @param asciiArt the ascii art
* @param additional the additional
*/
public static void printAsciiArtInfo(final Logger out, final String asciiArt, final String additional) {
try {
out.info(ANSI_CYAN);
out.info("\n\n".concat(FigletFont.convertOneLine(asciiArt)).concat(additional));
out.info(ANSI_RESET);
} catch (final Exception e) {
throw Throwables.propagate(e);
}
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:17,代码来源:AsciiArtUtils.java
示例4: printAsciiArt
import com.github.lalyos.jfiglet.FigletFont; //导入依赖的package包/类
/**
* Print ascii art.
*
* @param out the out
* @param asciiArt the ascii art
* @param additional the additional
*/
public static void printAsciiArt(final PrintStream out, final String asciiArt, final String additional) {
try {
out.println(ANSI_CYAN);
if (StringUtils.isNotBlank(additional)) {
out.println(FigletFont.convertOneLine(asciiArt));
out.println(additional);
} else {
out.print(FigletFont.convertOneLine(asciiArt));
}
out.println(ANSI_RESET);
} catch (final Exception e) {
throw Throwables.propagate(e);
}
}
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:22,代码来源:AsciiArtUtils.java
示例5: showJfigletMessage
import com.github.lalyos.jfiglet.FigletFont; //导入依赖的package包/类
/**
* show Jfiglet message
* @param message
* @return
*/
public static String showJfigletMessage(String message) {
try {
return LINE_BREAK + FigletFont.convertOneLine(message);
} catch (Throwable throwable) {
return "";
}
}
开发者ID:FlowCI,项目名称:flow-platform,代码行数:13,代码来源:CommonUtil.java
示例6: generateBanner
import com.github.lalyos.jfiglet.FigletFont; //导入依赖的package包/类
private String generateBanner() throws IOException {
final InputStream fontStream = GenerateMojo.class.getResourceAsStream("/condensed.flf");
final String rawBanner = FigletFont.convertOneLine(fontStream, text);
final String[] lines = rawBanner.split("\n");
final StringBuilder banner = new StringBuilder(32);
final boolean isDefaultColor = Color.DEFAULT.getTagValue().equals(color);
for (int i = 0; i < lines.length; i++) {
if (i > 0) {
banner.append('\n');
}
if (!isDefaultColor) {
Color.nameFromTagValue(color)
.ifPresent(name -> banner.append("${AnsiColor.").append(name).append('}'));
}
banner.append(StringUtils.stripEnd(lines[i], " "));
}
if (!isDefaultColor) {
banner.append("${AnsiColor.DEFAULT}");
}
if (includeInfo) {
info = info == null ? null : info.replaceAll("\\$\\{project\\.version\\}", project.getVersion());
banner.append('\n').append(info);
}
banner.append('\n');
getLog().debug('\n' + banner.toString());
return banner.toString();
}
开发者ID:acanda,项目名称:spring-banner-plugin,代码行数:28,代码来源:GenerateMojo.java
示例7: figlet
import com.github.lalyos.jfiglet.FigletFont; //导入依赖的package包/类
public static void figlet(String text) {
String asciiArt1 = null;
try {
asciiArt1 = FigletFont.convertOneLine(text);
} catch (IOException e) {
e.printStackTrace();
}
System.out.println(asciiArt1);
}
开发者ID:saikrishna321,项目名称:AppiumTestDistribution,代码行数:10,代码来源:ParallelThread.java
示例8: getBanner
import com.github.lalyos.jfiglet.FigletFont; //导入依赖的package包/类
@Override
public String getBanner() {
return FigletFont.convertOneLine("CloudUnit-CLI");
}
开发者ID:oncecloud,项目名称:devops-cstack,代码行数:5,代码来源:CloudUnitBannerProvider.java
示例9: convertOnLine
import com.github.lalyos.jfiglet.FigletFont; //导入依赖的package包/类
private Block convertOnLine(final String app, final String font) {
return unit -> {
unit.mockStatic(FigletFont.class);
expect(FigletFont.convertOneLine("classpath:/flf/" + font + ".flf", app)).andReturn(app);
};
}
开发者ID:jooby-project,项目名称:jooby,代码行数:7,代码来源:BannerTest.java
注:本文中的com.github.lalyos.jfiglet.FigletFont类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论