|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.birt.report.model.api.ElementDetailHandle
org.eclipse.birt.report.model.api.ValueHandle
org.eclipse.birt.report.model.api.ComplexValueHandle
org.eclipse.birt.report.model.api.ColorHandle
public class ColorHandle
Handle to work with a color property. Works with element properties and structure members.
The application generally does not create color handles directly. It uses the method in other handle to get a color handle like:
A color property may be in the following format:
ColorHandle colorHandle = styleHandle.getColor( );
Use ColorUtil.format(int, int)and
ColorUtil.format(String, int)to do the formatting work on a color
value.
ColorUtil,
ColorPropertyType| Field Summary |
|---|
| Fields inherited from class org.eclipse.birt.report.model.api.ComplexValueHandle |
|---|
memberRef, propDefn |
| Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle |
|---|
elementHandle |
| Constructor Summary | |
|---|---|
ColorHandle(DesignElementHandle element,
org.eclipse.birt.report.model.metadata.ElementPropertyDefn thePropDefn)
Constructs a color handle for a element property. |
|
ColorHandle(DesignElementHandle element,
org.eclipse.birt.report.model.core.MemberRef memberRef)
Constructs a color handle for a member in a structure. |
|
| Method Summary | |
|---|---|
java.util.List |
getColors()
Returns a list containing all the names of both standard(CSS) colors or user defined colors. |
java.util.List |
getCSSColors()
Returns a list containing standard(CSS) color names. |
java.lang.String |
getCssValue()
Returns a CSS-compatible color value. |
int |
getRGB()
Returns the color value as an integer RGB value. |
void |
setRGB(int rgbValue)
Sets a color with a given integer RGB value. |
| Methods inherited from class org.eclipse.birt.report.model.api.ComplexValueHandle |
|---|
getDefn, getDisplayValue, getPropertyDefn, getReference, getStringValue, getValue, isSet, setStringValue, setValue |
| Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle |
|---|
getDesign, getElement, getElementHandle, getModule |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorHandle(DesignElementHandle element,
org.eclipse.birt.report.model.core.MemberRef memberRef)
element - the design element handlememberRef - the memberRef for the member property
public ColorHandle(DesignElementHandle element,
org.eclipse.birt.report.model.metadata.ElementPropertyDefn thePropDefn)
element - handle to the element that defined the property.thePropDefn - definition of the color property.| Method Detail |
|---|
public int getRGB()
-1
if color value is not set( value is null) or the
value is not a valid internal value for a color.
ColorPropertyType.toInteger(Module, Object)
public void setRGB(int rgbValue)
throws SemanticException
rgbValue - rgb color value.
SemanticException - if the rgb value is invalid.public java.lang.String getCssValue()
ColorPropertyType#toCSSCompatibleColor(ReportDesign, Object)public java.util.List getColors()
public java.util.List getCSSColors()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||