org.crsh.text
Class RenderAppendable
java.lang.Object
org.crsh.text.RenderAppendable
- All Implemented Interfaces:
- Flushable, Appendable, Pipe<Chunk>
public class RenderAppendable
- extends Object
- implements Appendable, Pipe<Chunk>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
context
private final RenderingContext context
- .
stack
private LinkedList<Style.Composite> stack
- .
RenderAppendable
public RenderAppendable(RenderingContext context)
safeAppend
private void safeAppend(Chunk chunk)
getWidth
public int getWidth()
provide
public void provide(Chunk element)
throws IOException
- Description copied from interface:
Pipe
- Provide an element.
- Specified by:
provide in interface Pipe<Chunk>
- Parameters:
element - the provided element
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush in interface Flushable
- Throws:
IOException
append
public RenderAppendable append(CharSequence csq)
- Specified by:
append in interface Appendable
enterStyle
public void enterStyle(Style.Composite style)
leaveStyle
public Style.Composite leaveStyle()
getMerged
private Style.Composite getMerged()
- Compute the current merged style.
- Returns:
- the merged style
foo
private Boolean foo(Boolean last,
Boolean merged)
foo
private Color foo(Color last,
Color merged,
Color def)
styleOff
public void styleOff()
styleOn
public void styleOn()
append
public RenderAppendable append(CharSequence csq,
int start,
int end)
- Specified by:
append in interface Appendable
append
public RenderAppendable append(char c)
- Specified by:
append in interface Appendable
Copyright © 2012 eXo Platform SAS. All Rights Reserved.