@Override public Screenable append(Style style) throws IOException { this.style = style.merge(style); return this; }
/** * Create a new blank style. * * @return the style */ public static Composite style() { return style(null, null, null); }
@Override public void write(Style style, Appendable to) throws IOException { style.writeAnsiTo(to); } @Override
public void testReset() throws Exception { assertEquals("\u001B[0m", Style.reset.toAnsiSequence()); }
public static Composite style(Decoration decoration) { return style(decoration, null, null); }
@Override public void write(Style d) throws IOException { if (ansi) { d.writeAnsiTo(writer); } }
@Override public Screenable append(Style style) throws IOException { this.style = style.merge(style); return this; }
public Style.Composite bg() { return Style.style(null, null, this); }
public CharSequence toAnsiSequence() { StringBuilder sb = new StringBuilder(); try { writeAnsiTo(sb); } catch (IOException e) { // Should not happen throw new UndeclaredThrowableException(e); } return sb.toString(); }
public ScreenBuffer append(Style style) throws NullPointerException { next = next.merge(style); return this; }
public static Composite style(Color foreground) { return style(null, foreground, null); }
@Override public void write(Style style, Appendable to) throws IOException { style.writeAnsiTo(to); } @Override
if (!buffer.get(cursorOffset).style.equals(cursorStyle)) { out.append(buffer.get(cursorOffset).style); cursorStyle = cursorStyle.merge(buffer.get(cursorOffset).style); if (!buffer.get(cursorOffset).style.equals(cursorStyle)) { out.append(buffer.get(cursorOffset).style); cursorStyle = cursorStyle.merge(buffer.get(cursorOffset).style);
public static Composite style(Color foreground, Color background) { return style(null, foreground, background); }
@Override public void write(Style d) throws IOException { if (ansi) { d.writeAnsiTo(writer); } }
@Override public Screenable append(Style style) throws IOException { this.style = style.merge(style); return this; }
public Style.Composite foreground() { return Style.style(null, this, null); }
@Override public void write(Style d) throws IOException { if (ansi) { d.writeAnsiTo(writer); } }
@Override public Screenable append(Style style) throws IOException { this.style = style.merge(style); return this; }
public static Composite style(Decoration decoration, Color foreground) { return style(decoration, foreground, null); }