com.metaweb.lessen.tokens
Class OneTokenColor

java.lang.Object
  extended by com.metaweb.lessen.tokens.Token
      extended by com.metaweb.lessen.tokens.Color
          extended by com.metaweb.lessen.tokens.OneTokenColor

public class OneTokenColor
extends Color


Nested Class Summary
 
Nested classes/interfaces inherited from class com.metaweb.lessen.tokens.Token
Token.Type
 
Field Summary
protected  int _a
           
protected  int _b
           
protected  int _g
           
protected  int _r
           
protected static Map<String,int[]> s_colorMap
           
 
Fields inherited from class com.metaweb.lessen.tokens.Token
end, start, text, type
 
Constructor Summary
OneTokenColor(int start, int end, String text, int r, int g, int b, int a)
           
 
Method Summary
protected static int charToColorComponent(char c)
           
protected static int charToNumber(char c)
           
 int getA()
           
 int getB()
           
 int getG()
           
 int getR()
           
static Color tokenToColor(Token token)
           
protected static int twoCharsToColorComponent(String s)
           
 
Methods inherited from class com.metaweb.lessen.tokens.Color
limitComponent, numberToHex, performOperation, performOperation
 
Methods inherited from class com.metaweb.lessen.tokens.Token
getCleanText, toString, typeToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_r

protected int _r

_g

protected int _g

_b

protected int _b

_a

protected int _a

s_colorMap

protected static Map<String,int[]> s_colorMap
Constructor Detail

OneTokenColor

public OneTokenColor(int start,
                     int end,
                     String text,
                     int r,
                     int g,
                     int b,
                     int a)
Method Detail

getR

public int getR()
Specified by:
getR in class Color

getG

public int getG()
Specified by:
getG in class Color

getB

public int getB()
Specified by:
getB in class Color

getA

public int getA()
Specified by:
getA in class Color

charToColorComponent

protected static int charToColorComponent(char c)

twoCharsToColorComponent

protected static int twoCharsToColorComponent(String s)

charToNumber

protected static int charToNumber(char c)

tokenToColor

public static Color tokenToColor(Token token)


Copyright © 2011. All Rights Reserved.