jcreek.cke.visualizer
Class AppSettings
java.lang.Object
jcreek.cke.visualizer.AppSettings
- public class AppSettings
- extends java.lang.Object
Implements a properties storage class. This is used to store a variety
of properties, each associated with a key string. Each key string must
be unique or otherwise you will overwrite existing properties in the
table. The properties can be saved to a file and restored at a later
time, allowing persistent data storage.
This class implements the Singleton design pattern to ensure that only
one instance of this class exists in the system. To get the single
instance you can call the instanceOf() method.
- Version:
- Author:
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RELATION_NAME
public static final java.lang.String RELATION_NAME
- See Also:
- Constant Field Values
ISSUBCLASS
public static final java.lang.String ISSUBCLASS
- See Also:
- Constant Field Values
ISINSTANCE
public static final java.lang.String ISINSTANCE
- See Also:
- Constant Field Values
HORIZONTAL_ALLIGNMENT
public static final java.lang.String HORIZONTAL_ALLIGNMENT
- See Also:
- Constant Field Values
VERTICAL_ALLIGNMENT
public static final java.lang.String VERTICAL_ALLIGNMENT
- See Also:
- Constant Field Values
LOOK_FEEL
public static final java.lang.String LOOK_FEEL
- Name of the property that determines which look & feel
is to be used in the user interface. Accepts string values.
- See Also:
- Constant Field Values
table
protected java.util.Properties table
changeListeners
protected javax.swing.event.EventListenerList changeListeners
instance
protected static AppSettings instance
iniFileName
protected java.lang.String iniFileName
AppSettings
protected AppSettings()
addChangeListener
public void addChangeListener(javax.swing.event.ChangeListener listener)
clear
public void clear()
commit
public void commit()
contains
public boolean contains(java.lang.String key)
fireChange
protected void fireChange()
getBoolean
public boolean getBoolean(java.lang.String key)
getDouble
public double getDouble(java.lang.String key)
getString
public java.lang.String getString(java.lang.String key)
getCurrentDirectory
public java.lang.String getCurrentDirectory()
setCurrentDirectory
public void setCurrentDirectory(java.lang.String dir)
instanceOf
public static AppSettings instanceOf()
isEmpty
public boolean isEmpty()
load
public boolean load(java.lang.String fileName)
remove
public void remove(java.lang.String key)
removeChangeListener
public void removeChangeListener(javax.swing.event.ChangeListener listener)
save
public boolean save(java.lang.String fileName,
java.lang.String comment)
setBoolean
public void setBoolean(java.lang.String key,
boolean value)
setDouble
public void setDouble(java.lang.String key,
double value)
setString
public void setString(java.lang.String key,
java.lang.String value)
setRelation
public void setRelation(java.lang.String key,
int value)
getRelation
public int getRelation(java.lang.String key)
getSelectedRelations
public java.lang.String[] getSelectedRelations()
size
public int size()
Created at IDI, NTNU by the Artificial Intelligence and Learning group