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

Constructor Index

 o BaseEnumConverter()
 o BaseEnumConverter(String)
Constructs an instance of this converter that can be used for the given subclass of BaseEnum.

Method Index

 o convertFromString(String)
Returns a new instance of BaseEnum (or subclass) for enumeration value given.
 o convertToCode(Object)
Returns a block of code that creates a new BaseEnum (or subclass) like the one given.
 o convertToString(Object)
Returns the string representation of the enumeration selected in the given BaseEnum object.
 o viewableAsString()
Helps signify that in an attribute editor (like the one in the Desginer), an instance of BaseEnum is not viewable in a textfield.

Constructors

 o BaseEnumConverter
  public BaseEnumConverter()
 o 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

Methods

 o 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
 o 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
 o 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
 o 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