|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.common.config.AbstractReflectedChoice
public abstract class AbstractReflectedChoice
A helper for when we need to be a choice created dynamically.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private Class |
clazz
The type that we reflect to |
private String |
fullPath
The full path of this item |
private Method |
getter
The method to call to get the value |
private String |
helptext
The help text (tooltip) for this item |
private static Logger |
log
The log stream |
private int |
priority
The priority of this config level |
private String |
propertyname
The property that we call on the reflecting class |
private Method |
setter
The method to call to set the value |
private String |
type
The type (as specified in config.xml) |
Fields inherited from interface org.crosswire.common.config.Choice |
---|
PRIORITY_ACCESSOR, PRIORITY_CTOR, PRIORITY_EXTENDER, PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_NORMAL, PRIORITY_SYSTEM |
Constructor Summary | |
---|---|
AbstractReflectedChoice()
|
Method Summary | |
---|---|
abstract Object |
convertToObject(String orig)
Convert from a stored string to an object to use with relfection |
abstract String |
convertToString(Object orig)
Convert from a reflection return value to a String for storage |
String |
getFullPath()
The full path of the option. |
String |
getHelpText()
Gets a brief description of what is going on |
int |
getPriority()
Sometimes we need to ensure that we configure items in a certain order, the config package moves the changes to the application starting with the highest priority, moving to the lowest |
String |
getString()
String value to associate with the name (key) |
String |
getType()
The type by which UIs can pick an appropriate editor |
void |
init(org.jdom.Element option,
ResourceBundle configResources)
String value to associate with the name (key) |
boolean |
isSaveable()
Is this Choice OK to write out to a file, or should we use settings in this run of the program, but forget them for next time. |
boolean |
requiresRestart()
Do we need to restart the program in order for this change to have effect? |
void |
setFullPath(String newFullPath)
Sets the full path of the option. |
void |
setHelpText(String helptext)
Sets a brief description of what is going on |
void |
setPriority(int priority)
Sometimes we need to ensure that we configure items in a certain order, the config package moves the changes to the application starting with the highest priority, moving to the lowest |
void |
setString(String value)
String value to associate with this Field. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.crosswire.common.config.Choice |
---|
getConvertionClass |
Field Detail |
---|
private Class clazz
private String propertyname
private String type
private Method getter
private Method setter
private String helptext
private String fullPath
private int priority
private static final Logger log
Constructor Detail |
---|
public AbstractReflectedChoice()
Method Detail |
---|
public void init(org.jdom.Element option, ResourceBundle configResources) throws StartupException
Choice
init
in interface Choice
StartupException
public String getType()
Choice
getType
in interface Choice
public abstract String convertToString(Object orig)
public abstract Object convertToObject(String orig)
public String getFullPath()
Choice
getFullPath
in interface Choice
public void setFullPath(String newFullPath)
Choice
setFullPath
in interface Choice
newFullPath
- The path string as supplied in config.propertiespublic String getHelpText()
Choice
getHelpText
in interface Choice
public void setHelpText(String helptext)
Choice
setHelpText
in interface Choice
helptext
- Some help textpublic boolean isSaveable()
Choice
isSaveable
in interface Choice
public int getPriority()
getPriority
in interface Choice
public void setPriority(int priority)
priority
- A priority levelpublic boolean requiresRestart()
Choice
requiresRestart
in interface Choice
public String getString()
Choice
getString
in interface Choice
public void setString(String value) throws Exception
Choice
setString
in interface Choice
value
- The new value for this Choice
Exception
|
Copyright ยจ 2003-2005 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |