Class X14Color
java.lang.Object
com.independentsoft.office.spreadsheet.extensions.X14Color
Represents a color element (CT_Color) inside an x14 extension, such as
x14:borderColor, x14:negativeFillColor,
x14:axisColor or the x14:color* sparkline colors.-
Constructor Summary
ConstructorsConstructorDescriptionX14Color(InternalXMLStreamReader reader, String elementName)Instantiates a new x14 color.Instantiates a new x14 color. -
Method Summary
Modifier and TypeMethodDescriptionclone()getColor()Gets the color as ARGB hex value.Gets the local name of the color element.intGets the indexed color value.intgetTheme()Gets the theme color index.getTint()Gets the tint applied to the color, or null when it is not set.booleanisAuto()Gets whether the color is automatic.voidsetAuto(boolean auto)Sets whether the color is automatic.voidSets the color as ARGB hex value.voidsetIndexedColor(int indexedColor)Sets the indexed color value.voidsetTheme(int theme)Sets the theme color index.voidSets the tint applied to the color.toString()
-
Constructor Details
-
X14Color
Instantiates a new x14 color.- Parameters:
elementName- the local name of the color element (e.g. "borderColor", "colorSeries")
-
X14Color
Instantiates a new x14 color.Enters positioned ON the start element and leaves positioned ON the end element, so the caller's loop advances past it.
- Parameters:
reader- the readerelementName- the local name of the color element- Throws:
XMLStreamException- the XML stream exception
-
-
Method Details
-
clone
-
toString
-
getElementName
Gets the local name of the color element.- Returns:
- the element name
-
isAuto
public boolean isAuto()Gets whether the color is automatic.- Returns:
- true, if the color is automatic
-
setAuto
public void setAuto(boolean auto)Sets whether the color is automatic.- Parameters:
auto- the new auto flag
-
getIndexedColor
public int getIndexedColor()Gets the indexed color value.- Returns:
- the indexed color
-
setIndexedColor
public void setIndexedColor(int indexedColor)Sets the indexed color value.- Parameters:
indexedColor- the new indexed color
-
getColor
Gets the color as ARGB hex value.- Returns:
- the color
-
setColor
Sets the color as ARGB hex value.- Parameters:
color- the new color
-
getTheme
public int getTheme()Gets the theme color index.- Returns:
- the theme
-
setTheme
public void setTheme(int theme)Sets the theme color index.- Parameters:
theme- the new theme
-
getTint
Gets the tint applied to the color, or null when it is not set.- Returns:
- the tint
-
setTint
Sets the tint applied to the color. A null value removes the attribute.- Parameters:
tint- the new tint
-