Class UserChoice
java.lang.Object
org.eclipse.birt.report.model.metadata.Choice
org.eclipse.birt.report.model.api.metadata.UserChoice
- All Implemented Interfaces:
Cloneable
,Comparable<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
FieldsModifier and TypeFieldDescriptionstatic final String
Name of the display name property.protected String
The choice's display name.protected Object
The user choice's value, it is required.static final String
Name of the choice value property.Fields inherited from class org.eclipse.birt.report.model.metadata.Choice
DISPLAY_NAME_ID_PROP, displayNameKey, messages, name, NAME_PROP
-
Constructor Summary
ConstructorsConstructorDescriptionUserChoice
(String name, String id) Constructs a new User Choice by the given name and id. -
Method Summary
Modifier and TypeMethodDescriptionReturns the property value of "displayName" for the choice.getValue()
Gets the value of the user choice.void
setDisplayName
(String name) Returns the display name for the choice.void
Sets the value of the user choice.Methods inherited from class org.eclipse.birt.report.model.metadata.Choice
clone, compareTo, copy, getDisplayName, getDisplayNameKey, getMessages, getName, setDisplayNameKey, setMessages, setName, toString
-
Field Details
-
VALUE_PROP
Name of the choice value property.- See Also:
-
DISPLAY_NAME_PROP
Name of the display name property.- See Also:
-
displayName
The choice's display name. -
value
The user choice's value, it is required.
-
-
Constructor Details
-
UserChoice
Constructs a new User Choice by the given name and id.- Parameters:
name
- the choice nameid
- the message ID for the display name
-
-
Method Details
-
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
Returns the display name for the choice.- Parameters:
name
- the display name
-
setValue
Sets the value of the user choice.- Parameters:
theValue
- the value of the user choice to set
-
getValue
Gets the value of the user choice.
-