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 StringgetScenarioCommand()Collection<String>getScenarioImports()StringgetString()Returns the value of this parameter as anString.ObjectgetValue()Returns the value of this parameter.voidsetValue(Object value)Sets the value of theAttributeParameter.StringtoXMLString()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:
setValuein interfaceDisplayable- Overrides:
setValuein classAbstractSingleParameter- Parameters:
value- the new value of theAttributeParameter.- Throws:
IllegalArgumentException- thrown ifvalueis not of the correct type.
-
getValue
Returns the value of this parameter.- Specified by:
getValuein interfaceDisplayable- Overrides:
getValuein classAbstractSingleParameter- Returns:
- the value of this parameter.
-
toXMLString
Description copied from interface:DisplayableReturns 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:
toXMLStringin interfaceDisplayable- Overrides:
toXMLStringin classAbstractSingleParameter- Returns:
- string holding an XML representation of this Displayable
- See Also:
Displayable.toXMLString()
-
getScenarioCommand
- Specified by:
getScenarioCommandin interfaceProvidesScenarioSupportCommand
-
getScenarioImports
- Specified by:
getScenarioImportsin interfaceProvidesScenarioSupportCommand
-