public void styleOn() { if (stack != null && stack.size() > 0) { append(getMerged()); } } }
public Style.Composite leaveStyle() { if (stack == null || stack.isEmpty()) { throw new IllegalStateException("Cannot leave non existing style"); } Style.Composite last = stack.removeLast(); if (stack.size() > 0) { // Compute merged Style.Composite merged = getMerged(); // Compute diff with removed Boolean bold = foo(last.getBold(), merged.getBold()); Boolean underline = foo(last.getUnderline(), merged.getUnderline()); Boolean blink = foo(last.getBlink(), merged.getBlink()); // For now we assume that black is the default background color // and white is the default foreground color Color fg = foo(last.getForeground(), merged.getForeground(), Color.def); Color bg = foo(last.getBackground(), merged.getBackground(), Color.def); // Style.Composite bilto = Style.style(bold, underline, blink, fg, bg); // append(bilto); } else { append(Style.reset); } return last; }
public void styleOn() { if (stack != null && stack.size() > 0) { safeAppend(getMerged()); } }
public void styleOn() { if (stack != null && stack.size() > 0) { append(getMerged()); } } }
public void styleOn() { if (stack != null && stack.size() > 0) { append(getMerged()); } } }
public Style.Composite leaveStyle() { if (stack == null || stack.isEmpty()) { throw new IllegalStateException("Cannot leave non existing style"); } Style.Composite last = stack.removeLast(); if (stack.size() > 0) { // Compute merged Style.Composite merged = getMerged(); // Compute diff with removed Boolean bold = foo(last.getBold(), merged.getBold()); Boolean underline = foo(last.getUnderline(), merged.getUnderline()); Boolean blink = foo(last.getBlink(), merged.getBlink()); // For now we assume that black is the default background color // and white is the default foreground color Color fg = foo(last.getForeground(), merged.getForeground(), Color.def); Color bg = foo(last.getBackground(), merged.getBackground(), Color.def); // Style.Composite bilto = Style.style(bold, underline, blink, fg, bg); // append(bilto); } else { append(Style.reset); } return last; }
public Style.Composite leaveStyle() { if (stack == null || stack.isEmpty()) { throw new IllegalStateException("Cannot leave non existing style"); } Style.Composite last = stack.removeLast(); if (stack.size() > 0) { // Compute merged Style.Composite merged = getMerged(); // Compute diff with removed Boolean bold = foo(last.getBold(), merged.getBold()); Boolean underline = foo(last.getUnderline(), merged.getUnderline()); Boolean blink = foo(last.getBlink(), merged.getBlink()); // For now we assume that black is the default background color // and white is the default foreground color Color fg = foo(last.getForeground(), merged.getForeground(), Color.def); Color bg = foo(last.getBackground(), merged.getBackground(), Color.def); // Style.Composite bilto = Style.style(bold, underline, blink, fg, bg); // append(bilto); } else { append(Style.reset); } return last; }
public Style.Composite leaveStyle() { if (stack == null || stack.isEmpty()) { throw new IllegalStateException("Cannot leave non existing style"); } Style.Composite last = stack.removeLast(); if (stack.size() > 0) { // Compute merged Style.Composite merged = getMerged(); // Compute diff with removed Boolean bold = foo(last.getBold(), merged.getBold()); Boolean underline = foo(last.getUnderline(), merged.getUnderline()); Boolean blink = foo(last.getBlink(), merged.getBlink()); // For now we assume that black is the default background color // and white is the default foreground color Color fg = foo(last.getForeground(), merged.getForeground(), Color.def); Color bg = foo(last.getBackground(), merged.getBackground(), Color.def); // Style.Composite bilto = Style.style(bold, underline, blink, fg, bg); // safeAppend(bilto); } else { safeAppend(Style.reset); } return last; }