public class ColorExpression extends Expression
| Modifier and Type | Class and Description |
|---|---|
static class |
ColorExpression.ColorWithAlphaExpression |
| Modifier and Type | Field and Description |
|---|---|
protected double |
blue |
protected double |
green |
protected double |
red |
protected String |
value |
| Constructor and Description |
|---|
ColorExpression(HiddenTokenAwareTree token,
double red,
double green,
double blue) |
ColorExpression(HiddenTokenAwareTree token,
String value,
double red,
double green,
double blue) |
| Modifier and Type | Method and Description |
|---|---|
ColorExpression |
clone() |
double |
getAlpha() |
double |
getBlue() |
List<? extends ASTCssNode> |
getChilds()
WARNING: it is up to the programmer to keep parent and childs getters and
setters consistent.
|
String |
getColorName() |
double |
getGreen() |
double |
getRed() |
ASTCssNodeType |
getType() |
String |
getValue() |
String |
getValueInHexadecimal() |
boolean |
hasAlpha() |
boolean |
isNamed() |
boolean |
isShorthand() |
void |
setValue(String value) |
String |
toARGB() |
Color |
toColor() |
protected String |
toHex(double color) |
String |
toString() |
getScope, hasScope, setScope, splitByCommaaddOpeningComments, addTrailingComment, addTrailingComments, configureParentToAllChilds, getOpeningComments, getOrphanComments, getParent, getSource, getSourceColumn, getSourceLine, getTrailingComments, getUnderlyingStructure, hasParent, isFaulty, isSilent, setOpeningComments, setOrphanComments, setParent, setSilent, setTrailingComments, setUnderlyingStructureprotected String value
protected double red
protected double green
protected double blue
public ColorExpression(HiddenTokenAwareTree token, double red, double green, double blue)
public ColorExpression(HiddenTokenAwareTree token, String value, double red, double green, double blue)
public String getValue()
public boolean isShorthand()
public String getValueInHexadecimal()
public void setValue(String value)
public double getRed()
public double getGreen()
public double getBlue()
public double getAlpha()
protected String toHex(double color)
@NotAstProperty public List<? extends ASTCssNode> getChilds()
ASTCssNodegetChilds in class ASTCssNodepublic ASTCssNodeType getType()
getType in class ASTCssNodepublic String toString()
toString in class ASTCssNodepublic ColorExpression clone()
clone in interface PubliclyCloneableclone in class Expressionpublic String toARGB()
public Color toColor()
public boolean hasAlpha()
public boolean isNamed()
public String getColorName()
Copyright © 2012-2015. All Rights Reserved.