1 package com
.swabunga
.spell
.engine
;
3 import java
.util
.ResourceBundle
;
9 public abstract class Configuration
{
11 public static final String EDIT_DEL1
= "EDIT_DEL1";
12 public static final String EDIT_DEL2
= "EDIT_DEL2";
13 public static final String EDIT_SWAP
= "EDIT_SWAP";
14 public static final String EDIT_SUB
= "EDIT_SUB";
15 public static final String EDIT_SIMILAR
= "EDIT_SIMILAR";
16 public static final String EDIT_MIN
= "EDIT_MIN";
17 public static final String EDIT_MAX
= "EDIT_MAX";
19 public static final String SPELL_THRESHOLD
= "SPELL_THRESHOLD";
20 public static final String SPELL_IGNOREUPPERCASE
= "SPELL_IGNOREUPPERCASE";
21 public static final String SPELL_IGNOREMIXEDCASE
= "SPELL_IGNOREMIXEDCASE";
22 public static final String SPELL_IGNOREINTERNETADDRESSES
= "SPELL_IGNOREINTERNETADDRESS";
23 public static final String SPELL_IGNOREDIGITWORDS
= "SPELL_IGNOREDIGITWORDS";
24 public static final String SPELL_IGNOREMULTIPLEWORDS
= "SPELL_IGNOREMULTIPLEWORDS";
25 public static final String SPELL_IGNORESENTANCECAPITALIZATION
= "SPELL_IGNORESENTANCECAPTILIZATION";
27 public abstract int getInteger(String key
);
28 public abstract boolean getBoolean(String key
);
29 public abstract void setInteger(String key
, int value
);
30 public abstract void setBoolean(String key
, boolean value
);
32 public static final Configuration
getConfiguration() {
34 // changed, breaks applet security otherwise (Howard Kistler)
35 String config
= (String
)null
;
38 config
= System
.getProperty("jazzy.config");
42 config
= (String
)null
;
43 e
.printStackTrace(System
.err
);
46 if (config
!= null
&& config
.length() > 0) {
48 result
= (Configuration
)Class
.forName(config
).newInstance();
49 } catch (InstantiationException e
) {
50 result
= new PropertyConfiguration();
51 } catch (IllegalAccessException e
) {
52 result
= new PropertyConfiguration();
53 } catch (ClassNotFoundException e
) {
54 result
= new PropertyConfiguration();
57 result
= new PropertyConfiguration();