2
package org.crosswire.common.config.choices;
4
import java.util.Hashtable;
6
import org.crosswire.common.util.Convert;
11
* <table border='1' cellPadding='3' cellSpacing='0' width="100%">
12
* <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
13
* Distribution Licence:<br />
14
* Project B is free software; you can redistribute it
15
* and/or modify it under the terms of the GNU General Public License,
16
* version 2 as published by the Free Software Foundation.<br />
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
* General Public License for more details.<br />
21
* The License is available on the internet
22
* <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
23
* <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
24
* MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
25
* The copyright to this program is held by it's authors.
26
* </font></td></tr></table>
27
* @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
28
* @see <{docs.Licence}>
31
public abstract class HashtableChoice extends AbstractChoice
34
* Construct an Object Choice
36
public HashtableChoice(Class superclass)
38
this.superclass = superclass;
42
* Construct an Object Choice
44
public HashtableChoice()
46
this.superclass = Object.class;
50
* Generalized read Object from the Properties file
51
* @return Found int or the default value
53
public abstract Hashtable getHashtable();
56
* Generalized set Object to the Properties file
57
* @param value The value to enter
59
public abstract void setHashtable(Hashtable value);
62
* Generalized read boolean from the Properties file
63
* @return Found boolean or the default value
65
public String getString()
67
return Convert.hashtable2String(getHashtable());
71
* Generalized set boolean to the Properties file
72
* @param value The value to enter
74
public void setString(String value)
76
setHashtable(Convert.string2Hashtable(value));
80
* Override this to check and note any change
82
public String getType()
85
// new HashtableField(this, superclass);
89
* The type that we are editing
91
public Object getTypeOptions()
96
/** The superclass of any hashtable values */
97
private Class superclass = null;