org.crsh.text
Class Style

java.lang.Object
  extended by org.crsh.text.Style
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Style.Regular

public abstract class Style
extends Object
implements Serializable

Author:
Alain Defrance
See Also:
Serialized Form

Nested Class Summary
(package private) static class Style.Regular
           
 
Field Summary
protected  Color background
          .
protected  Decoration decoration
          .
protected  Color foreground
          .
static Style reset
           
 
Constructor Summary
private Style(Decoration decoration, Color foreground, Color background)
           
 
Method Summary
 Color getBackground()
           
 Decoration getDecoration()
           
 Color getForeground()
           
 Style merge(Style s)
           
static Style style(Color foreground)
           
static Style style(Color foreground, Color background)
           
static Style style(Decoration decoration)
           
static Style style(Decoration decoration, Color foreground)
           
static Style style(Decoration decoration, Color foreground, Color background)
           
 CharSequence toAnsiSequence()
           
 String toString()
           
abstract  void writeAnsiTo(Appendable appendable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

reset

public static final Style reset

decoration

protected final Decoration decoration
.


foreground

protected final Color foreground
.


background

protected final Color background
.

Constructor Detail

Style

private Style(Decoration decoration,
              Color foreground,
              Color background)
Method Detail

style

public static Style style(Color foreground)

style

public static Style style(Color foreground,
                          Color background)

style

public static Style style(Decoration decoration,
                          Color foreground,
                          Color background)

style

public static Style style(Decoration decoration)

style

public static Style style(Decoration decoration,
                          Color foreground)

getDecoration

public Decoration getDecoration()

getForeground

public Color getForeground()

getBackground

public Color getBackground()

merge

public Style merge(Style s)
            throws NullPointerException
Throws:
NullPointerException

toAnsiSequence

public CharSequence toAnsiSequence()

writeAnsiTo

public abstract void writeAnsiTo(Appendable appendable)
                          throws IOException
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 eXo Platform SAS. All Rights Reserved.