net.groboclown.gui.pluginapp.v1
Class PropertyManager

java.lang.Object
  |
  +--net.groboclown.gui.pluginapp.v1.PropertyManager
All Implemented Interfaces:
IElement, Serializable

public class PropertyManager
extends Object
implements IElement

A decorator/adapter for a Property Database.

See Also:
Serialized Form

Inner Class Summary
private  class PropertyManager.MyPropertyDatabase
           
 
Field Summary
private  String appName
           
private  Core core
           
private  PropertyDatabase db
           
 
Constructor Summary
PropertyManager(String appName)
          Constructor.
 
Method Summary
 void addResourceBundle(String name)
          Adds a resource bundle using the given baseclass name.
protected  void changeValue(String key, String origValue, String newValue)
           
 String getApplicationDirectory()
           
 boolean getBooleanValue(String key)
           
 byte getByteValue(String key)
           
 char getCharValue(String key)
           
 Color getColor(String key)
           
 Dimension getDimension(String key)
           
 double getDoubleValue(String key)
           
 float getFloatValue(String key)
           
 Font getFont(String key)
           
 int getIntValue(String key)
           
 long getLongValue(String key)
           
 String getName()
           
 Point getPoint(String key)
           
 Rectangle getRectangle(String key)
           
 short getShortValue(String key)
           
 String getValue(String key)
           
 int getVersion()
           
protected  void innerAddResourceBundle(String location)
           
 void setBooleanValue(String key, boolean value)
           
 void setByteValue(String key, byte value)
           
 void setCharValue(String key, char value)
           
 void setColor(String key, Color value)
           
 void setDimension(String key, Dimension value)
           
 void setDoubleValue(String key, double value)
           
 void setFloatValue(String key, float value)
           
 void setFont(String key, Font value)
           
 void setIntValue(String key, int value)
           
 void setLongValue(String key, long value)
           
 void setPoint(String key, Point value)
           
 void setRectangle(String key, Rectangle value)
           
 void setShortValue(String key, short value)
           
 void setup(Core core)
           
 void setValue(String key, String value)
           
 void teardown()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

db

private PropertyDatabase db

core

private Core core

appName

private String appName
Constructor Detail

PropertyManager

public PropertyManager(String appName)
                throws IOException
Constructor.
Method Detail

getName

public String getName()
Specified by:
getName in interface IElement

getVersion

public int getVersion()
Specified by:
getVersion in interface IElement

setup

public void setup(Core core)
Specified by:
setup in interface IElement

teardown

public void teardown()
Specified by:
teardown in interface IElement

addResourceBundle

public void addResourceBundle(String name)
Adds a resource bundle using the given baseclass name. The given resource bundle will contain more default values.

getBooleanValue

public boolean getBooleanValue(String key)

setBooleanValue

public void setBooleanValue(String key,
                            boolean value)

getByteValue

public byte getByteValue(String key)

setByteValue

public void setByteValue(String key,
                         byte value)

getCharValue

public char getCharValue(String key)

setCharValue

public void setCharValue(String key,
                         char value)

getDoubleValue

public double getDoubleValue(String key)

setDoubleValue

public void setDoubleValue(String key,
                           double value)

getFloatValue

public float getFloatValue(String key)

setFloatValue

public void setFloatValue(String key,
                          float value)

getIntValue

public int getIntValue(String key)

setIntValue

public void setIntValue(String key,
                        int value)

getLongValue

public long getLongValue(String key)

setLongValue

public void setLongValue(String key,
                         long value)

getShortValue

public short getShortValue(String key)

setShortValue

public void setShortValue(String key,
                          short value)

getValue

public String getValue(String key)

setValue

public void setValue(String key,
                     String value)

getColor

public Color getColor(String key)

setColor

public void setColor(String key,
                     Color value)

getDimension

public Dimension getDimension(String key)

setDimension

public void setDimension(String key,
                         Dimension value)

getPoint

public Point getPoint(String key)

setPoint

public void setPoint(String key,
                     Point value)

getRectangle

public Rectangle getRectangle(String key)

setRectangle

public void setRectangle(String key,
                         Rectangle value)

getFont

public Font getFont(String key)

setFont

public void setFont(String key,
                    Font value)

innerAddResourceBundle

protected void innerAddResourceBundle(String location)

getApplicationDirectory

public String getApplicationDirectory()

changeValue

protected void changeValue(String key,
                           String origValue,
                           String newValue)


Written under the LGPL