Class UserChoice
- java.lang.Object
-
- org.eclipse.birt.report.model.metadata.Choice
-
- org.eclipse.birt.report.model.api.metadata.UserChoice
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Comparable<java.lang.Object>
,IChoice
public final class UserChoice extends org.eclipse.birt.report.model.metadata.Choice
Describes the user defined choices for a user defined property. The internal name of a choice property is a string. The string maps to a display name shown to the user, and an XML name used in the xml design file. The display name is localized, the XML name is not.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DISPLAY_NAME_PROP
Name of the display name property.protected java.lang.String
displayName
The choice's display name.protected java.lang.Object
value
The user choice's value, it is required.static java.lang.String
VALUE_PROP
Name of the choice value property.
-
Constructor Summary
Constructors Constructor Description UserChoice(java.lang.String name, java.lang.String id)
Constructs a new User Choice by the given name and id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDisplayName()
Returns the property value of "displayName" for the choice.java.lang.Object
getValue()
Gets the value of the user choice.void
setDisplayName(java.lang.String name)
Returns the display name for the choice.void
setValue(java.lang.Object theValue)
Sets the value of the user choice.
-
-
-
Field Detail
-
VALUE_PROP
public static final java.lang.String VALUE_PROP
Name of the choice value property.- See Also:
- Constant Field Values
-
DISPLAY_NAME_PROP
public static final java.lang.String DISPLAY_NAME_PROP
Name of the display name property.- See Also:
- Constant Field Values
-
displayName
protected java.lang.String displayName
The choice's display name.
-
value
protected java.lang.Object value
The user choice's value, it is required.
-
-
Method Detail
-
getDisplayName
public java.lang.String getDisplayName()
Returns the property value of "displayName" for the choice.- Specified by:
getDisplayName
in interfaceIChoice
- Overrides:
getDisplayName
in classorg.eclipse.birt.report.model.metadata.Choice
- Returns:
- the display name for the choice.
-
setDisplayName
public void setDisplayName(java.lang.String name)
Returns the display name for the choice.- Parameters:
name
- the display name
-
setValue
public void setValue(java.lang.Object theValue)
Sets the value of the user choice.- Parameters:
theValue
- the value of the user choice to set
-
-