public class CustomColor
extends org.eclipse.birt.report.model.core.ReferencableStructure
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:
Modifier and Type | Field and Description |
---|---|
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.
|
Constructor and Description |
---|
CustomColor()
Default constructor.
|
CustomColor(java.lang.String theName,
java.lang.String value)
Constructs the custom color with a required name and RGB value.
|
Modifier and Type | Method and Description |
---|---|
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)
Returns the value of a structure property represented as a member
variable.
|
java.lang.String |
getName()
Returns the internal color name.
|
java.lang.String |
getReferencableProperty()
Gets the value of the referencable member.
|
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)
Creates the specific handle of this structure.
|
boolean |
isReferencableProperty(java.lang.String memberName)
Checks whether the member of the input name is the referencable member or
not.
|
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)
Sets the value of of a structure property represented as a member
variable.
|
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.
|
addClient, addClientStructure, broadcast, clone, dropClient, dropClientStructure, getClientList, getClientStructures, getLocalProperty, getProperty, hasReferences, isReferencable, updateReference
checkStringMember, copy, equals, getCompatibleValue, getContext, getDefn, getElement, getExpressionProperty, getHandle, getHandle, getLocalProperty, getMemberDefn, getObjectDefn, getProperty, getStringProperty, isDesignTime, setContext, setExpressionProperty, setProperty, setProperty, setupContext, updateReference
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
public CustomColor()
public CustomColor(java.lang.String theName, java.lang.String value)
theName
- the internal color namevalue
- the color valuepublic java.lang.String getStructName()
IStructure
protected java.lang.Object getIntrinsicProperty(java.lang.String valueName)
org.eclipse.birt.report.model.core.Structure
getIntrinsicProperty
in class org.eclipse.birt.report.model.core.ReferencableStructure
valueName
- name of the propertyprotected void setIntrinsicProperty(java.lang.String valueName, java.lang.Object value)
org.eclipse.birt.report.model.core.Structure
setIntrinsicProperty
in class org.eclipse.birt.report.model.core.ReferencableStructure
valueName
- the name of the property to setvalue
- the property valuepublic 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 moduleprotected StructureHandle handle(SimpleValueHandle valueHandle, int index)
org.eclipse.birt.report.model.core.Structure
handle
in class org.eclipse.birt.report.model.core.Structure
valueHandle
- the value handle of this structure list property this
structure is inindex
- the position of this structure in structure listpublic 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
module
- the moduleelement
- the element contains this structureStructure.validate(Module,
org.eclipse.birt.report.model.core.DesignElement)
public boolean isReferencableProperty(java.lang.String memberName)
org.eclipse.birt.report.model.core.ReferencableStructure
isReferencableProperty
in class org.eclipse.birt.report.model.core.ReferencableStructure
memberName
- the member name to checkpublic java.lang.String getReferencableProperty()
org.eclipse.birt.report.model.core.Structure
getReferencableProperty
in class org.eclipse.birt.report.model.core.Structure
Copyright © 2014 OpenText Corp. All rights reserved.