|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.swath.Parameter
This class represents a parameter. Several value types are supported and range controls are performed.
UserDefinedScript,
UserDefinedCommand| Field Summary | |
static int |
BOOLEAN
The boolean value type. |
static int |
CHOICE
The choice value type. |
static int |
DOUBLE
The double value type. |
static int |
INTEGER
The integer value type. |
static int |
NONE
No value type. |
static int |
STRING
The string value type. |
| Constructor Summary | |
Parameter()
Constructor. |
|
Parameter(java.lang.String text)
Constructor. |
|
| Method Summary | |
boolean |
addChoice(int key,
java.lang.String val)
Adds a choice value. |
boolean |
getBoolean()
Gets a boolean value. |
java.lang.String |
getChoice(int key)
Gets a choice value for a specific key. |
int |
getCurrentChoice()
Gets the current choice value. |
double |
getDouble()
Gets a double value. |
double |
getDoubleMax()
Gets the maximum double value limit. |
double |
getDoubleMin()
Gets the minimum double value limit. |
java.lang.String |
getHelpText()
Gets the help text for this parameter. |
int |
getInteger()
Gets an integer value. |
int |
getIntegerMax()
Gets the maximum integer value limit. |
int |
getIntegerMin()
Gets the minimum integer value limit. |
java.util.Enumeration |
getKeys()
Gets an enumeration of the choice value keys. |
int |
getMaxStringLength()
Gets the maximum string length. |
java.lang.String |
getString()
Gets a string value. |
java.lang.String |
getText()
Gets the text for this parameter. |
int |
getType()
Gets the type of this parameter. |
java.lang.Object |
getValue()
Gets the value as an object. |
boolean |
isValid()
Indicates if the parameter is valid or not. |
void |
removeChoice(int key)
Removes a choice value. |
boolean |
setBoolean(boolean val)
Sets a boolean value. |
boolean |
setCurrentChoice(int key)
Sets the current choice value. |
boolean |
setDouble(double val)
Sets a double value. |
boolean |
setDoubleRange(double min,
double max)
Sets the double value range. |
void |
setHelpText(java.lang.String helpText)
Sets the help text for this parameter. |
boolean |
setInteger(int val)
Sets an integer value. |
boolean |
setIntegerRange(int min,
int max)
Sets the integer value range. |
boolean |
setMaxStringLength(int maxLength)
Sets the maximum string length. |
boolean |
setString(java.lang.String val)
Sets a string value. |
void |
setText(java.lang.String text)
Sets the text for this parameter. |
boolean |
setType(int type)
Sets the type of this parameter. |
java.lang.String |
toString()
Returns a string representation of the parameter. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int NONE
public static final int STRING
public static final int BOOLEAN
public static final int INTEGER
public static final int DOUBLE
public static final int CHOICE
| Constructor Detail |
public Parameter()
public Parameter(java.lang.String text)
text - The parameter text to display.| Method Detail |
public java.lang.String toString()
public boolean isValid()
true if valid, otherwise false.public void setText(java.lang.String text)
text - The parameter text.public java.lang.String getText()
public void setHelpText(java.lang.String helpText)
helpText - The parameter help text.public java.lang.String getHelpText()
public boolean setType(int type)
type - The parameter type.STRING,
BOOLEAN,
INTEGER,
DOUBLE,
CHOICEpublic int getType()
STRING,
BOOLEAN,
INTEGER,
DOUBLE,
CHOICEpublic java.lang.Object getValue()
public boolean setString(java.lang.String val)
val - The string value.
true if successful, otherwise falsepublic java.lang.String getString()
public boolean setBoolean(boolean val)
val - The boolean value.
true if successful, otherwise falsepublic boolean getBoolean()
public boolean setInteger(int val)
val - The integer value.
true if successful, otherwise falsepublic int getInteger()
public boolean setDouble(double val)
val - The double value.
true if successful, otherwise falsepublic double getDouble()
public boolean addChoice(int key,
java.lang.String val)
key - The key.val - The choice value to add.public java.lang.String getChoice(int key)
key - The key of the choice value to get.
public java.util.Enumeration getKeys()
public void removeChoice(int key)
key - The key of the choice value to remove.public boolean setCurrentChoice(int key)
key - The key of the current choice value.
true if successful, otherwise falsepublic int getCurrentChoice()
public boolean setMaxStringLength(int maxLength)
maxLength - The maximum string length.
true if successful, otherwise falsepublic int getMaxStringLength()
public boolean setIntegerRange(int min,
int max)
min - The minimum integer value.max - The maximum integer value.
true if successful, otherwise falsepublic int getIntegerMin()
public int getIntegerMax()
public boolean setDoubleRange(double min,
double max)
min - The minimum double value.max - The maximum double value.
true if successful, otherwise falsepublic double getDoubleMin()
public double getDoubleMax()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||