org.freehep.util
Class UserProperties
java.lang.Object
java.util.Dictionary
java.util.Hashtable
java.util.Properties
org.freehep.util.UserProperties
- All Implemented Interfaces:
- Cloneable, Map, Serializable
- public class UserProperties
- extends Properties
Special property class which allows typed properties to be set and
returned. It also allows the hookup of two default property objects
to be searched if this property object does not contain the property.
FIXME check what org.freehep.application.PropertyUtilities.java
has to offer and merge, or not
FIXME: This class does not seem general enough to be a "public" utility. Should be
improved and merged with PropertyUtilities, or moved into the graphicsio package (tonyj)
- Version:
- $Id: UserProperties.java,v 1.7 2003/09/23 00:49:57 tonyj Exp $
- Author:
- Mark Donszelmann
- See Also:
- Serialized Form
- Source Code:
- UserProperties.java
Method Summary |
String |
getProperty(String key)
|
String |
getProperty(String key,
String def)
|
Color |
getPropertyColor(String key)
|
Color |
getPropertyColor(String key,
Color def)
|
Dimension |
getPropertyDimension(String key)
|
Dimension |
getPropertyDimension(String key,
Dimension def)
|
double |
getPropertyDouble(String key)
|
double |
getPropertyDouble(String key,
double def)
|
float |
getPropertyFloat(String key)
|
float |
getPropertyFloat(String key,
float def)
|
Insets |
getPropertyInsets(String key)
|
Insets |
getPropertyInsets(String key,
Insets def)
|
int |
getPropertyInt(String key)
|
int |
getPropertyInt(String key,
int def)
|
Rectangle |
getPropertyRectangle(String key)
|
Rectangle |
getPropertyRectangle(String key,
Rectangle def)
|
String[] |
getPropertyStringArray(String key)
|
String[] |
getPropertyStringArray(String key,
String[] def)
|
boolean |
isProperty(String key)
|
boolean |
isProperty(String key,
boolean def)
|
Enumeration |
propertyNames()
|
void |
setProperties(Properties properties)
Copies properties, including its defaults into this UserProperties |
static Object |
setProperty(Properties properties,
String key,
boolean value)
|
static Object |
setProperty(Properties properties,
String key,
Color value)
|
static Object |
setProperty(Properties properties,
String key,
Dimension value)
|
static Object |
setProperty(Properties properties,
String key,
double value)
|
static Object |
setProperty(Properties properties,
String key,
float value)
|
static Object |
setProperty(Properties properties,
String key,
Insets value)
|
static Object |
setProperty(Properties properties,
String key,
int value)
|
static Object |
setProperty(Properties properties,
String key,
Rectangle value)
|
static Object |
setProperty(Properties properties,
String key,
String[] value)
|
Object |
setProperty(String key,
boolean value)
|
Object |
setProperty(String key,
Color value)
|
Object |
setProperty(String key,
Dimension value)
|
Object |
setProperty(String key,
double value)
|
Object |
setProperty(String key,
float value)
|
Object |
setProperty(String key,
Insets value)
|
Object |
setProperty(String key,
int value)
|
Object |
setProperty(String key,
Rectangle value)
|
Object |
setProperty(String key,
String value)
|
Object |
setProperty(String key,
String[] value)
|
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
altDefaults
protected Properties altDefaults
UserProperties
public UserProperties()
UserProperties
public UserProperties(Properties defaults)
UserProperties
public UserProperties(Properties defaults,
Properties altDefaults)
- Constructs UserProperties with a defaults and altDefaults table,
which are searched in that order.
propertyNames
public Enumeration propertyNames()
setProperties
public void setProperties(Properties properties)
- Copies properties, including its defaults into this UserProperties
setProperty
public Object setProperty(String key,
String value)
setProperty
public Object setProperty(String key,
String[] value)
setProperty
public static Object setProperty(Properties properties,
String key,
String[] value)
setProperty
public Object setProperty(String key,
Color value)
setProperty
public static Object setProperty(Properties properties,
String key,
Color value)
setProperty
public Object setProperty(String key,
Rectangle value)
setProperty
public static Object setProperty(Properties properties,
String key,
Rectangle value)
setProperty
public Object setProperty(String key,
Insets value)
setProperty
public static Object setProperty(Properties properties,
String key,
Insets value)
setProperty
public Object setProperty(String key,
Dimension value)
setProperty
public static Object setProperty(Properties properties,
String key,
Dimension value)
setProperty
public Object setProperty(String key,
int value)
setProperty
public static Object setProperty(Properties properties,
String key,
int value)
setProperty
public Object setProperty(String key,
double value)
setProperty
public static Object setProperty(Properties properties,
String key,
double value)
setProperty
public Object setProperty(String key,
float value)
setProperty
public static Object setProperty(Properties properties,
String key,
float value)
setProperty
public Object setProperty(String key,
boolean value)
setProperty
public static Object setProperty(Properties properties,
String key,
boolean value)
getProperty
public String getProperty(String key)
getProperty
public String getProperty(String key,
String def)
getPropertyStringArray
public String[] getPropertyStringArray(String key)
getPropertyStringArray
public String[] getPropertyStringArray(String key,
String[] def)
getPropertyColor
public Color getPropertyColor(String key)
getPropertyColor
public Color getPropertyColor(String key,
Color def)
getPropertyRectangle
public Rectangle getPropertyRectangle(String key)
getPropertyRectangle
public Rectangle getPropertyRectangle(String key,
Rectangle def)
getPropertyInsets
public Insets getPropertyInsets(String key)
getPropertyInsets
public Insets getPropertyInsets(String key,
Insets def)
getPropertyDimension
public Dimension getPropertyDimension(String key)
getPropertyDimension
public Dimension getPropertyDimension(String key,
Dimension def)
getPropertyInt
public int getPropertyInt(String key)
getPropertyInt
public int getPropertyInt(String key,
int def)
getPropertyDouble
public double getPropertyDouble(String key)
getPropertyDouble
public double getPropertyDouble(String key,
double def)
getPropertyFloat
public float getPropertyFloat(String key)
getPropertyFloat
public float getPropertyFloat(String key,
float def)
isProperty
public boolean isProperty(String key)
isProperty
public boolean isProperty(String key,
boolean def)
Copyright © 2000-2004 FreeHEP, All Rights Reserved.