gishur.gui2
Class DrawProperties
java.lang.Object
|
+--java.util.Dictionary
|
+--java.util.Hashtable
|
+--gishur.gui2.DrawProperties
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable
- public class DrawProperties
- extends java.util.Hashtable
A Hashtable of properties used for drawing.
- Version:
- 1.0
- Author:
- Thomas Wolf
- See Also:
- Serialized Form
Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
Constructor Summary |
DrawProperties()
Constructs a new, empty DrawProperties object. |
DrawProperties(int initialCapacity)
Constructs a new, empty DrawProperties object with the
specified initial capacity. |
Method Summary |
void |
add(DrawProperties prop)
Adds the given properties list to this properties list.
|
java.lang.Object |
getProperty(java.lang.String key)
Returns the value to which the specified key is mapped
in this properties list. |
java.lang.Object |
removeProperty(java.lang.String key)
Removes the key (and its corresponding value) from this
properties lies. |
java.lang.Object |
setProperty(java.lang.String key,
java.lang.Object value)
Maps the specified key to the specified value in
this properties list. |
java.lang.String |
toString()
Returns a string representation of the object. |
java.lang.String |
toString(boolean brace)
Returns a string representation of the object. |
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, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
DrawProperties
public DrawProperties()
- Constructs a new, empty DrawProperties object.
DrawProperties
public DrawProperties(int initialCapacity)
- Constructs a new, empty DrawProperties object with the
specified initial capacity.
getProperty
public java.lang.Object getProperty(java.lang.String key)
- Returns the value to which the specified
key
is mapped
in this properties list.
- Parameters:
key
- a key in the properties list- Returns:
- the value to which the key is mapped in this properties list;
null
if the key
is not mapped to any value
in this properties list.
setProperty
public java.lang.Object setProperty(java.lang.String key,
java.lang.Object value)
- Maps the specified
key
to the specified value in
this properties list. Neither the key
nor the value
can be null.
- Parameters:
key
- the properties keyvalue
- the value- Returns:
- the previous value of the specified key in this properties list,
or
null
if it did not have one.
removeProperty
public java.lang.Object removeProperty(java.lang.String key)
- Removes the
key
(and its corresponding value) from this
properties lies. This method does nothing if the key
is
not in this properties list.
- Parameters:
key
- the key that needs to be removed- Returns:
- the value to which the key had been mapped in this properties
list, or
null
if the key did not have a mapping
add
public void add(DrawProperties prop)
- Adds the given properties list to
this
properties list.
Keys that are already contained in this list were overwritten.
toString
public java.lang.String toString()
- Returns a string representation of the object. In general, the toString
method returns a string that "textually represents" this object.
- Overrides:
toString
in class java.util.Hashtable
- Returns:
- a string representation of the object.
toString
public java.lang.String toString(boolean brace)
- Returns a string representation of the object.
- Parameters:
brace
- if true
, properties are contained in braces- Returns:
- a string representation of the object.