|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdd.sim.SimObject
dd.sim.ConfigParameter
Parameter used to configure proposals. Proposals have an arbitrary number of configuraable options, such as size, target cells, duration, and so on. This class describes one of those configurable options. These configuration parameters appear in a proposal's XML description, and don't make much sense alone.
The properties of this object that should be set are:
Configuration parameters have a type depending on what the parameter represents. Types are defined as string constants in this class. Possible types include:
Field Summary | |
static java.lang.String |
BOOLEAN_TYPE
Indicates that the parameter stores a boolean value. |
static java.lang.String |
CHOICE_TYPE
Indicates that the parameter stores a "choice". |
static java.lang.String |
DEBRIEFING_KEY
Key for the text used in the debriefing. |
static java.lang.String |
DESCRIPTION_KEY
Key to the description field in the attribute table. |
static java.lang.String |
DISTANCE_TYPE
Indicates that this parameter is a distance. |
static java.lang.String |
DURATION_TYPE
Indicates that this parameter stores a time. |
static java.lang.String |
MULTIPLECELLS_TYPE
Indicates that this parameter stores a list of map locations. |
static java.lang.String |
NAME_KEY
Key to the name field in the attribute table. |
static java.lang.String |
NUMBER_TYPE
Indicates that this parameter is an aribrary integer or floating point value. |
static java.lang.String |
PLAYER_TYPE
Indicates that this parameter stores a player. |
static java.lang.String |
PROPERTY_NAME_KEY
Key to the property name field in the attribute table. |
static java.lang.String |
SINGLECELL_TYPE
Indicates that this parameter stores a single map location. |
static java.lang.String |
TYPE_KEY
Key to the type field in the attribute table. |
Fields inherited from class dd.sim.SimObject |
attributes |
Constructor Summary | |
ConfigParameter()
|
|
ConfigParameter(java.lang.String name,
java.lang.String type,
java.lang.String description,
java.lang.String propertyName)
|
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getDebriefingText()
|
java.lang.String |
getDebriefingText(java.lang.Object paramValue)
|
java.lang.String |
getDescription()
|
java.lang.String |
getName()
Gets the human readable short name of this parameter. |
java.lang.String |
getPropertyName()
|
java.lang.String |
getType()
|
void |
setDescription(java.lang.String description)
|
void |
setName(java.lang.String name)
Sets the human readable short name of this parameter. |
void |
setPropertyName(java.lang.String propertyName)
|
void |
setType(java.lang.String type)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String NUMBER_TYPE
public static final java.lang.String DISTANCE_TYPE
public static final java.lang.String SINGLECELL_TYPE
public static final java.lang.String MULTIPLECELLS_TYPE
public static final java.lang.String DURATION_TYPE
public static final java.lang.String PLAYER_TYPE
public static final java.lang.String CHOICE_TYPE
A ConfigParameter that represents a choice has an attribute called
choices
that contains a List (ArrayList) of strings. Each
item in the List represents a separate choice. Note that the order
of the list elements is significant. The 4th item in the list
corresponds to the name of the 4th choice, but also the economic cost,
social cost, and map icons should also be in the fourth position.
There are several possible ArrayLists to associate with a choice:
choices
List of strings (names of choices)choiceMapIcons
List of strings (images to display on map)choiceLegendIcons
List of strings (icons to display in legend)choiceDECost
List of integers (delta economic cost)choiceDSCost
List of integers (delta social cost)As mentioned above, the nth item of each List should line up. So, for example, if choice 1 and choice 4 have a deCost of 1, you must still have four entries {1, 0, 0, 4}.
public static final java.lang.String BOOLEAN_TYPE
true
and 0 is false
. A choice parameter
must have a description
attribute. This is the description
that is shown in the user interface (for example, the descriptive
text for a checkbox.) - note that this is different from the
DESCRIPTION_KEY
which is a longer string used for balloon
and HTML help.
public static final java.lang.String NAME_KEY
public static final java.lang.String TYPE_KEY
public static final java.lang.String DESCRIPTION_KEY
public static final java.lang.String PROPERTY_NAME_KEY
public static final java.lang.String DEBRIEFING_KEY
Constructor Detail |
public ConfigParameter()
public ConfigParameter(java.lang.String name, java.lang.String type, java.lang.String description, java.lang.String propertyName)
Method Detail |
public void setName(java.lang.String name)
name
- Name of the parameterpublic java.lang.String getName()
public void setType(java.lang.String type)
public java.lang.String getType()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void setPropertyName(java.lang.String propertyName)
public java.lang.String getPropertyName()
public java.lang.String getDebriefingText()
public java.lang.String getDebriefingText(java.lang.Object paramValue)
public boolean equals(java.lang.Object obj)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |