|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.gui.InputProperties
A property list used to store properties pertaining to input components.
There are four bound properties for an input properties object that represent the standard properties for an input component and the parameters it contributes to a standard error strategy:
INPUT_PROMPT
DIALOG_TITLE
INPUT_MODEL
SUGGESTION
This class implements a data structure that can be used
to store any number of input properties of any type,
keyed using String property names.
An input properties object can be created so that it shadows
the properties stored in a preexisting input properties object
or the base input properties object
that contains default property values.
Properties with the same name that are stored in
the top level input properties object
are returned in favor of lower level properties stored
in the shadowed input properties object(s).
Properties stored in the lower level input properties object(s)
are returned by the top level input properties object
if those properties are not shadowed by higher level properties
with the same names.
| Field Summary | |
static InputProperties |
BASE_PROPERTIES
Shared base property list for input property objects. |
static String |
DIALOG_TITLE
Bound property name for the dialog box title to be used as a parameter for a standard error strategy if the view state of this input component is malformed. |
static String |
INPUT_MODEL
Bound property name for the input model for this view. |
static String |
INPUT_PROMPT
Bound property name for the prompt to be used as a parameter for a standard error strategy if the view state of this input component is malformed. |
protected InputProperties |
next
Property list that this property list shadows. |
static String |
SUGGESTION
Bound property name for a suggested view state for this view. |
protected Hashtable |
table
Hashtable used to map property names to property values. |
| Fields inherited from interface edu.neu.ccs.util.JPTConstants |
ABOVE, ALIGNMENT, BELOW, BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, FONT, INPUT_PROPERTIES, MANDATORY, OPTIONAL, ORIENTATION, TOP_LEFT, TOP_RIGHT, VALUE |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
InputProperties()
Constructor for an empty property list that shadows the shared base property object. |
|
InputProperties(InputProperties properties)
Constructor for an empty property list that shadows the given property list. |
|
| Method Summary | |
boolean |
equals(Object other)
Returns true if this property list
is equivalent to the given object,
or false if it is not. |
String |
getDialogTitle()
Returns the dialog title text stored in this property list. |
int |
getInputModel()
Returns the input model value stored in this property list. |
String |
getInputPrompt()
Returns the input prompt text stored in this property list. |
Object |
getProperty(String propertyName)
Returns the value of the property with the provided name, or null if the property has not been set. |
String |
getSuggestion()
Returns the suggested view state stored in this property list. |
void |
setDialogTitle(String dialogTitle)
Sets the dialog title to the given title text. |
void |
setInputModel(int inputModel)
Sets the input model value to the given value. |
void |
setInputPrompt(String inputPrompt)
Sets the input prompt text to the given prompt text. |
void |
setProperty(String propertyName,
Object property)
Stores the given property under the provided name. |
void |
setSuggestion(String suggestion)
Sets the suggested view state to the given String data. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String INPUT_PROMPT
public static final String DIALOG_TITLE
public static final String INPUT_MODEL
JPTConstants.MANDATORY,
JPTConstants.OPTIONAL,
Constant Field Valuespublic static final String SUGGESTION
public static final InputProperties BASE_PROPERTIES
protected Hashtable table
protected InputProperties next
| Constructor Detail |
public InputProperties()
public InputProperties(InputProperties properties)
null,
the property list will not shadow another property list.
properties - the desired property list to shadow| Method Detail |
public boolean equals(Object other)
true if this property list
is equivalent to the given object,
or false if it is not.
other - the object to compare with
public void setProperty(String propertyName,
Object property)
propertyName - the String name
of the propertyproperty - the value of the property
to be stored in the listpublic Object getProperty(String propertyName)
null if the property has not been set.
propertyName - the String name
of the desired property valuepublic void setInputPrompt(String inputPrompt)
inputPrompt - the new prompt textpublic String getInputPrompt()
public void setDialogTitle(String dialogTitle)
dialogTitle - the new title textpublic String getDialogTitle()
public void setInputModel(int inputModel)
inputModel - the new input model valueJPTConstants.MANDATORY,
JPTConstants.OPTIONALpublic int getInputModel()
JPTConstants.MANDATORY,
JPTConstants.OPTIONALpublic void setSuggestion(String suggestion)
String data.
suggestion - the new suggestion textpublic String getSuggestion()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||