org.crosswire.common.config
Class FontChoice

java.lang.Object
  extended by org.crosswire.common.config.AbstractReflectedChoice
      extended by org.crosswire.common.config.FontChoice
All Implemented Interfaces:
Choice

public class FontChoice
extends AbstractReflectedChoice

A class to convert between strings and objects of a type.

Author:
Joe Walker
See Also:
The GNU Lesser General Public License for details.

Constructor Summary
FontChoice()
           
 
Method Summary
 Object convertToObject(String orig)
          Convert from a stored string to an object to use with reflection
 String convertToString(Object orig)
          Convert from a reflection return value to a String for storage
 Class<String> getConversionClass()
          The class that this Choice works on.
 
Methods inherited from class org.crosswire.common.config.AbstractReflectedChoice
getFullPath, getHelpText, getKey, getString, getType, init, isHidden, isIgnored, isSaveable, requiresRestart, setFullPath, setHelpText, setString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontChoice

public FontChoice()
Method Detail

getConversionClass

public Class<String> getConversionClass()
Description copied from interface: Choice
The class that this Choice works on. Used to decide how to display the choice to the user.

Returns:
The Class that this Choice works using.

convertToString

public String convertToString(Object orig)
Description copied from class: AbstractReflectedChoice
Convert from a reflection return value to a String for storage

Specified by:
convertToString in class AbstractReflectedChoice
Parameters:
orig - the object to be converted to a string
Returns:
the marshaled representation of the object

convertToObject

public Object convertToObject(String orig)
Description copied from class: AbstractReflectedChoice
Convert from a stored string to an object to use with reflection

Specified by:
convertToObject in class AbstractReflectedChoice
Parameters:
orig - the marshaled representation of the object
Returns:
the reconstituted object

Copyright ยจ 2003-2015