org.crsh.text
Class Style.Composite

java.lang.Object
  extended by org.crsh.text.Chunk
      extended by org.crsh.text.Style
          extended by org.crsh.text.Style.Composite
All Implemented Interfaces:
Serializable
Enclosing class:
Style

public static final class Style.Composite
extends Style

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.crsh.text.Style
Style.Composite
 
Field Summary
protected  Color background
          .
protected  Boolean blink
          .
protected  Boolean bold
          .
protected  Color foreground
          .
protected  Boolean underline
          .
 
Fields inherited from class org.crsh.text.Style
reset
 
Constructor Summary
private Style.Composite(Boolean bold, Boolean underline, Boolean blink, Color foreground, Color background)
           
 
Method Summary
 Style.Composite background(Color value)
           
 Style.Composite bg(Color value)
           
 Style.Composite blink()
           
 Style.Composite blink(Boolean value)
           
 Style.Composite bold()
           
 Style.Composite bold(Boolean value)
           
private static boolean color(Appendable appendable, Color color, char base, boolean append)
           
private static boolean decoration(Appendable appendable, String on, String off, Boolean value, boolean append)
           
 Style.Composite decoration(Decoration decoration)
           
 Style.Composite fg(Color color)
           
 Style.Composite foreground(Color color)
           
 Color getBackground()
           
 Boolean getBlink()
           
 Boolean getBold()
           
 Color getForeground()
           
 Boolean getUnderline()
           
 Style merge(Style s)
           
 String toString()
           
 Style.Composite underline()
           
 Style.Composite underline(Boolean value)
           
 void writeAnsiTo(Appendable appendable)
           
 
Methods inherited from class org.crsh.text.Style
style, style, style, style, style, style, style, toAnsiSequence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bold

protected final Boolean bold
.


underline

protected final Boolean underline
.


blink

protected final Boolean blink
.


foreground

protected final Color foreground
.


background

protected final Color background
.

Constructor Detail

Style.Composite

private Style.Composite(Boolean bold,
                        Boolean underline,
                        Boolean blink,
                        Color foreground,
                        Color background)
Method Detail

fg

public Style.Composite fg(Color color)

foreground

public Style.Composite foreground(Color color)

bg

public Style.Composite bg(Color value)

background

public Style.Composite background(Color value)

bold

public Style.Composite bold()

underline

public Style.Composite underline()

blink

public Style.Composite blink()

bold

public Style.Composite bold(Boolean value)

underline

public Style.Composite underline(Boolean value)

blink

public Style.Composite blink(Boolean value)

decoration

public Style.Composite decoration(Decoration decoration)

getBold

public Boolean getBold()

getUnderline

public Boolean getUnderline()

getBlink

public Boolean getBlink()

getForeground

public Color getForeground()

getBackground

public Color getBackground()

merge

public Style merge(Style s)
            throws NullPointerException
Specified by:
merge in class Style
Throws:
NullPointerException

toString

public String toString()
Specified by:
toString in class Style

decoration

private static boolean decoration(Appendable appendable,
                                  String on,
                                  String off,
                                  Boolean value,
                                  boolean append)
                           throws IOException
Throws:
IOException

color

private static boolean color(Appendable appendable,
                             Color color,
                             char base,
                             boolean append)
                      throws IOException
Throws:
IOException

writeAnsiTo

public void writeAnsiTo(Appendable appendable)
                 throws IOException
Specified by:
writeAnsiTo in class Style
Throws:
IOException


Copyright © 2014 eXo Platform SAS. All Rights Reserved.