to.leaveStyle(); to.enterStyle(current.bg()); previous = current;
public Style.Composite blink() { return blink(true); }
public static Composite style(Boolean bold, Boolean underline, Boolean blink, Color foreground, Color background) { int bo = bold != null ? bold ? 0 : 1: 2; int un = underline != null ? underline ? 0 : 1: 2; int bl = blink != null ? blink ? 0 : 1: 2; int fg = foreground != null ? foreground.ordinal() : COLORS.length - 1; int bg = background != null ? background.ordinal() : COLORS.length - 1; return ALL[bo][un][bl][fg][bg]; }
public Style.Composite underline() { return underline(true); }
public Style.Composite bold() { return bold(true); }
public static Composite style(Boolean bold, Boolean underline, Boolean blink, Color foreground, Color background) { int bo = bold != null ? bold ? 0 : 1: 2; int un = underline != null ? underline ? 0 : 1: 2; int bl = blink != null ? blink ? 0 : 1: 2; int fg = foreground != null ? foreground.ordinal() : COLORS.length - 1; int bg = background != null ? background.ordinal() : COLORS.length - 1; return ALL[bo][un][bl][fg][bg]; }
public Style.Composite underline() { return underline(true); }
public Style.Composite bold() { return bold(true); }
public void testFluent() throws Exception { Style.Composite style = Color.red.bg().bold().underline().fg(Color.blue); assertEquals("\u001B[1;4;34;41m", style.toAnsiSequence()); style = style.bold(false); assertEquals("\u001B[22;4;34;41m", style.toAnsiSequence()); style = style.bold(null); assertEquals("\u001B[4;34;41m", style.toAnsiSequence()); } }
new LabelElement(group == null ? "" : group.getName()), new LabelElement(thread.getPriority()), new LabelElement(thread.getState()).style(c.fg()), new LabelElement(cpu), new LabelElement(time),
public static Composite style(Boolean bold, Boolean underline, Boolean blink, Color foreground, Color background) { int bo = bold != null ? bold ? 0 : 1: 2; int un = underline != null ? underline ? 0 : 1: 2; int bl = blink != null ? blink ? 0 : 1: 2; int fg = foreground != null ? foreground.ordinal() : COLORS.length - 1; int bg = background != null ? background.ordinal() : COLORS.length - 1; return ALL[bo][un][bl][fg][bg]; }
public Style.Composite underline() { return underline(true); }
public Style.Composite bold() { return bold(true); }
public Style.Composite blink() { return blink(true); }
public static Composite style(Boolean bold, Boolean underline, Boolean blink, Color foreground, Color background) { int bo = bold != null ? bold ? 0 : 1: 2; int un = underline != null ? underline ? 0 : 1: 2; int bl = blink != null ? blink ? 0 : 1: 2; int fg = foreground != null ? foreground.ordinal() : COLORS.length - 1; int bg = background != null ? background.ordinal() : COLORS.length - 1; return ALL[bo][un][bl][fg][bg]; }
public Style.Composite underline() { return underline(true); }
public Style.Composite bold() { return bold(true); }