Package org.graffiti.plugin.parameter
Class StringParameter
java.lang.Object
org.graffiti.plugin.parameter.AbstractSingleParameter
org.graffiti.plugin.parameter.StringParameter
- All Implemented Interfaces:
Displayable
,Parameter
,SingleParameter
,ProvidesScenarioSupportCommand
- Direct Known Subclasses:
MultiFileSelectionParameter
public class StringParameter extends AbstractSingleParameter implements ProvidesScenarioSupportCommand
Parameter that contains an
Integer
value.- Version:
- $Revision: 1.7 $
-
Constructor Summary
Constructors Constructor Description StringParameter(String value, String name, String description)
Constructs a new integer parameter. -
Method Summary
Modifier and Type Method Description String
getScenarioCommand()
Collection<String>
getScenarioImports()
String
getString()
Returns the value of this parameter as anString
.Object
getValue()
Returns the value of this parameter.void
setValue(Object value)
Sets the value of theAttributeParameter
.String
toXMLString()
Returns a well-formed XML string representing the Displayable.Methods inherited from class org.graffiti.plugin.parameter.AbstractSingleParameter
getDescription, getIcon, getImage, getName, isLeftAligned, setDescription, setLeftAligned, toString
-
Constructor Details
-
StringParameter
Constructs a new integer parameter.- Parameters:
value
- the new integer value. May be null.name
- the name of the parameter.description
- the description of the parameter.
-
-
Method Details
-
getString
Returns the value of this parameter as anString
.- Returns:
- the value of this parameter as an
String
.
-
setValue
Sets the value of theAttributeParameter
.- Specified by:
setValue
in interfaceDisplayable
- Overrides:
setValue
in classAbstractSingleParameter
- Parameters:
value
- the new value of theAttributeParameter
.- Throws:
IllegalArgumentException
- thrown ifvalue
is not of the correct type.
-
getValue
Returns the value of this parameter.- Specified by:
getValue
in interfaceDisplayable
- Overrides:
getValue
in classAbstractSingleParameter
- Returns:
- the value of this parameter.
-
toXMLString
Description copied from interface:Displayable
Returns a well-formed XML string representing the Displayable. The Displayable should be reconstructable via this representation. Therefore it must at least include the type of Displayable (classname) and a representation of its value. PROBABLE FUTURE DESIGN: The Displayables themselves will provide a method to reconstruct their value from the XML representation they provided.- Specified by:
toXMLString
in interfaceDisplayable
- Overrides:
toXMLString
in classAbstractSingleParameter
- Returns:
- string holding an XML representation of this Displayable
- See Also:
Displayable.toXMLString()
-
getScenarioCommand
- Specified by:
getScenarioCommand
in interfaceProvidesScenarioSupportCommand
-
getScenarioImports
- Specified by:
getScenarioImports
in interfaceProvidesScenarioSupportCommand
-