|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.birt.report.model.core.Structure
org.eclipse.birt.report.model.core.ReferencableStructure
org.eclipse.birt.report.model.api.elements.structures.CustomColor
public class CustomColor
Represents an custom color in the report's color palette.The use-defined color has a unique name and a valid RGB value for render.
This is a managed object, meaning that all changes should be made though the command layer so that they can be undone and redone. Each custom color has the following properties:
Field Summary | |
---|---|
protected java.lang.String |
color
The color value of the color, it is preserved as the user typed in. |
static java.lang.String |
COLOR_MEMBER
Name of the color value member. |
static java.lang.String |
CUSTOM_COLOR_STRUCT
Name of this structure. |
static java.lang.String |
DISPLAY_NAME_ID_MEMBER
Name of the display name ID member. |
static java.lang.String |
DISPLAY_NAME_MEMBER
Name of the display name member. |
protected java.lang.String |
displayName
The display name for the color. |
protected java.lang.String |
displayNameID
The message ID for the display name. |
protected java.lang.String |
name
The internal color name such as "periwinkle". |
static java.lang.String |
NAME_MEMBER
Name of the color name member. |
Fields inherited from class org.eclipse.birt.report.model.core.ReferencableStructure |
---|
clients, clientStructures, LIB_REFERENCE_MEMBER, libReference |
Constructor Summary | |
---|---|
CustomColor()
Default constructor. |
|
CustomColor(java.lang.String theName,
java.lang.String value)
Constructs the custom color with a required name and RGB value. |
Method Summary | |
---|---|
java.lang.String |
getColor()
Returns the color value as what the user has input. |
java.lang.String |
getDisplayName()
Returns the color display name. |
java.lang.String |
getDisplayName(org.eclipse.birt.report.model.core.Module module)
Return the display name of the color that can be showed to user. |
java.lang.String |
getDisplayNameID()
Returns the color display name message ID. |
protected java.lang.Object |
getIntrinsicProperty(java.lang.String valueName)
|
java.lang.String |
getName()
Returns the internal color name. |
java.lang.String |
getReferencableProperty()
|
int |
getRGB()
Returns the color value as an integer RGB value. |
java.lang.String |
getStructName()
Returns the name of the structure definition. |
protected StructureHandle |
handle(SimpleValueHandle valueHandle,
int index)
|
boolean |
isReferencableProperty(java.lang.String memberName)
|
void |
setColor(java.lang.String colorValue)
Sets the color value. |
void |
setDisplayName(java.lang.String displayName)
Sets the color display name. |
void |
setDisplayNameID(java.lang.String displayNameID)
Sets the color display name ID. |
protected void |
setIntrinsicProperty(java.lang.String valueName,
java.lang.Object value)
|
void |
setName(java.lang.String name)
Sets the internal color name. |
java.util.List |
validate(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.core.DesignElement element)
Validates this structure. |
Methods inherited from class org.eclipse.birt.report.model.core.ReferencableStructure |
---|
addClient, addClientStructure, broadcast, clone, dropClient, dropClientStructure, getClientList, getClientStructures, getLocalProperty, getProperty, hasReferences, isReferencable, updateReference |
Methods inherited from class org.eclipse.birt.report.model.core.Structure |
---|
copy, equals, getContext, getDefn, getElement, getHandle, getHandle, getListMemberRef, getLocalProperty, getObjectDefn, getProperty, isDesignTime, setContext, setProperty, setProperty, updateReference |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CUSTOM_COLOR_STRUCT
public static final java.lang.String NAME_MEMBER
public static final java.lang.String COLOR_MEMBER
public static final java.lang.String DISPLAY_NAME_MEMBER
public static final java.lang.String DISPLAY_NAME_ID_MEMBER
protected java.lang.String name
protected java.lang.String color
protected java.lang.String displayName
protected java.lang.String displayNameID
Constructor Detail |
---|
public CustomColor()
public CustomColor(java.lang.String theName, java.lang.String value)
theName
- the internal color namevalue
- the color valueMethod Detail |
---|
public java.lang.String getStructName()
IStructure
protected java.lang.Object getIntrinsicProperty(java.lang.String valueName)
getIntrinsicProperty
in class org.eclipse.birt.report.model.core.ReferencableStructure
protected void setIntrinsicProperty(java.lang.String valueName, java.lang.Object value)
setIntrinsicProperty
in class org.eclipse.birt.report.model.core.ReferencableStructure
public int getRGB()
-1
indicates that the value is
not valid.
The color value can contain any of the valid color representations:
-1
if the color value is not valid or the color value is
null
.ColorUtil.parseColor(String)
public java.lang.String getName()
public java.lang.String getColor()
public java.lang.String getDisplayNameID()
public java.lang.String getDisplayName()
public java.lang.String getDisplayName(org.eclipse.birt.report.model.core.Module module)
displayNameID
, then the localized text for the current
locale is returned; Otherwise return the displayName
property if is not null or blank; Else, return the internal name of the
color.
module
- the module
protected StructureHandle handle(SimpleValueHandle valueHandle, int index)
handle
in class org.eclipse.birt.report.model.core.Structure
public void setName(java.lang.String name)
name
- the internal color namepublic void setDisplayName(java.lang.String displayName)
displayName
- the display namepublic void setColor(java.lang.String colorValue)
colorValue
- the color value to be set.public void setDisplayNameID(java.lang.String displayNameID)
displayNameID
- the display name ID to setpublic java.util.List validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
validate
in class org.eclipse.birt.report.model.core.ReferencableStructure
Structure.validate(Module,
org.eclipse.birt.report.model.core.DesignElement)
public boolean isReferencableProperty(java.lang.String memberName)
isReferencableProperty
in class org.eclipse.birt.report.model.core.ReferencableStructure
public java.lang.String getReferencableProperty()
getReferencableProperty
in class org.eclipse.birt.report.model.core.Structure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |