Class sunsoft.jws.visual.rt.type.BaseEnumConverter
All Packages Class Hierarchy This Package Previous Next Index
Class sunsoft.jws.visual.rt.type.BaseEnumConverter
java.lang.Object
|
+----sunsoft.jws.visual.rt.type.Converter
|
+----sunsoft.jws.visual.rt.type.BaseEnumConverter
- public class BaseEnumConverter
- extends Converter
Converts enum types to and from strings and to code. This converter
can handle any sub-class of BaseEnum.
- See Also:
- BaseEnum
-
BaseEnumConverter()
-
-
BaseEnumConverter(String)
- Constructs an instance of this converter that can be used for the
given subclass of BaseEnum.
-
convertFromString(String)
- Returns a new instance of BaseEnum (or subclass) for enumeration
value given.
-
convertToCode(Object)
- Returns a block of code that creates a new BaseEnum (or subclass)
like the one given.
-
convertToString(Object)
- Returns the string representation of the enumeration selected in the
given BaseEnum object.
-
viewableAsString()
- Helps signify that in an attribute editor (like the
one in the Desginer), an instance of BaseEnum is not viewable in a
textfield.
BaseEnumConverter
public BaseEnumConverter()
BaseEnumConverter
public BaseEnumConverter(String type)
- Constructs an instance of this converter that can be used for the
given subclass of BaseEnum.
- Parameters:
- type - the fully qualified class name of the subclass
convertToString
public String convertToString(Object obj)
- Returns the string representation of the enumeration selected in the
given BaseEnum object.
- Parameters:
- obj - an instance of BaseEnum or one of its subclasses
- Overrides:
- convertToString in class Converter
convertFromString
public Object convertFromString(String s)
- Returns a new instance of BaseEnum (or subclass) for enumeration
value given.
- Parameters:
- s - string version of the enumeration choice
- Overrides:
- convertFromString in class Converter
convertToCode
public String convertToCode(Object obj)
- Returns a block of code that creates a new BaseEnum (or subclass)
like the one given.
- Parameters:
- the - BaseEnum instance to emulate
- Overrides:
- convertToCode in class Converter
viewableAsString
public boolean viewableAsString()
- Helps signify that in an attribute editor (like the
one in the Desginer), an instance of BaseEnum is not viewable in a
textfield. It will be displayed using a choice menu instead.
- Returns:
- false
- Overrides:
- viewableAsString in class Converter
All Packages Class Hierarchy This Package Previous Next Index