|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectalgoanim.properties.AnimationProperties
public abstract class AnimationProperties
Description of the Properties system:
Every type of all languages has its associated class in
the primitives package and an own properties class which holds the
relevant informations to display the object.
These properties classes are based on a HashMap consisting
of pairs of a String key and a PropertyItem.
Each PropertyItem is represented by an object of a definite
class which is able to work properly on its internal data.
There are types for color, font and integer PropertyItems for example.
But actually this underlying concept is not visible to the user.
| Field Summary | |
|---|---|
protected java.util.HashMap<java.lang.String,AnimationPropertyItem> |
data
Contains a mapping from String keys to PropertyItems. |
| Constructor Summary | |
|---|---|
AnimationProperties()
Default Constructor The constructor in the derivated classes *MUST* fill the data HashMap with keys and appropriate
AnimationPropertyItems. |
|
AnimationProperties(java.lang.String name)
Constructor which receives the name of the property. |
|
| Method Summary | |
|---|---|
void |
fillAdditional()
This function takes all keys from the data HashMap and fills
the isEditable and labels HashMaps
with appropriate values. |
protected abstract void |
fillHashMap()
Fills the internal data HashMap with values and copies them
to all other Hashmaps. |
java.lang.Object |
get(java.lang.String key)
Searches the map for the value according to the given key. |
java.util.Set<java.lang.String> |
getAllPropertyNames()
Returns a Set view on all possible keys provided by
a concrete AnimationProperties. |
java.util.Vector<java.lang.String> |
getAllPropertyNamesVector()
Returns a Set view on all possible keys provided by
a concrete AnimationProperties. |
static java.util.Vector<java.lang.String> |
getAllPropertyTypes()
Returns a Vector of Strings with all
classnames which are in this package and can be used. |
AnimationPropertyItem |
getDefault(java.lang.String key)
Returns the default value for the given key (as an Object). |
boolean |
getIsEditable(java.lang.String key)
Returns wether an item is editable by the end-user of the Generator-GUI. |
AnimationPropertyItem |
getItem(java.lang.String key)
Searches the map for the item according to the given key. |
java.lang.String |
getLabel(java.lang.String key)
Returns the label of the item. |
void |
set(java.lang.String key,
boolean value)
Sets the PropertyItem associated with the key to the new
value. |
void |
set(java.lang.String key,
java.awt.Color value)
Sets the PropertyItem associated with the key to the new
value. |
void |
set(java.lang.String key,
java.awt.Font value)
Sets the PropertyItem associated with the key to the new
value. |
void |
set(java.lang.String key,
int value)
Sets the PropertyItem associated with the key to the new
value. |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the PropertyItem associated with the key to the new
value. |
void |
set(java.lang.String key,
java.lang.String value)
Sets the PropertyItem associated with the key to the new
value. |
void |
setDefault(java.lang.String key,
AnimationPropertyItem value)
Sets the default value for the given key. |
void |
setIsEditable(java.lang.String key,
boolean value)
Sets wether an item is editable by the end-user of the Generator GUI. |
void |
setLabel(java.lang.String key,
java.lang.String value)
Sets the label of the given item. |
void |
setName(java.lang.String newName)
Inserts the "name" items into the HashMaps. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.HashMap<java.lang.String,AnimationPropertyItem> data
| Constructor Detail |
|---|
public AnimationProperties()
HashMap with keys and appropriate
AnimationPropertyItems.
public AnimationProperties(java.lang.String name)
HashMap with keys and appropriate
AnimationPropertyItems.
name - the name of the Properties object.| Method Detail |
|---|
public void setName(java.lang.String newName)
HashMaps.
newName - The initial name for this Propertie.protected abstract void fillHashMap()
HashMap with values and copies them
to all other Hashmaps.
public void fillAdditional()
HashMap and fills
the isEditable and labels HashMaps
with appropriate values. (All Elements of isEditable are
false by default and all elementes of labels are empty
Strings.)
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.util.Set<java.lang.String> getAllPropertyNames()
Set view on all possible keys provided by
a concrete AnimationProperties.
Set view on all possible keys provided by
a concrete AnimationProperties.public java.util.Vector<java.lang.String> getAllPropertyNamesVector()
Set view on all possible keys provided by
a concrete AnimationProperties.
Set view on all possible keys provided by
a concrete AnimationProperties.public static final java.util.Vector<java.lang.String> getAllPropertyTypes()
Vector of Strings with all
classnames which are in this package and can be used.
Vector of Strings with all
classnames which are in this package and can be used.
public AnimationPropertyItem getItem(java.lang.String key)
throws java.lang.IllegalArgumentException
key - The key of the item.
java.lang.IllegalArgumentException - if the item doesn't exist.
public void set(java.lang.String key,
int value)
throws java.lang.IllegalArgumentException
PropertyItem associated with the key to the new
value.
key - the key of the item.value - the new value (as an int).
java.lang.IllegalArgumentException - if the item doesn't exist.
public void set(java.lang.String key,
java.lang.String value)
throws java.lang.IllegalArgumentException
PropertyItem associated with the key to the new
value.
key - the key of the item.value - the new value (as a String).
java.lang.IllegalArgumentException - if the item doesn't exist.
public void set(java.lang.String key,
boolean value)
throws java.lang.IllegalArgumentException
PropertyItem associated with the key to the new
value.
key - the key of the item.value - the new value (as a boolean).
java.lang.IllegalArgumentException - if the item doesn't exist.
public void set(java.lang.String key,
java.awt.Color value)
throws java.lang.IllegalArgumentException
PropertyItem associated with the key to the new
value.
key - the key of the item.value - the new value (as a Color).
java.lang.IllegalArgumentException - if the item doesn't exist.
public void set(java.lang.String key,
java.awt.Font value)
throws java.lang.IllegalArgumentException
PropertyItem associated with the key to the new
value.
key - the key of the item.value - the new value (as a Font).
java.lang.IllegalArgumentException - if the item doesn't exist.
public void set(java.lang.String key,
java.lang.Object value)
throws java.lang.IllegalArgumentException
PropertyItem associated with the key to the new
value.
key - the key of the item.value - the new value (as an Object).
java.lang.IllegalArgumentException - if the item doesn't exist.
public java.lang.Object get(java.lang.String key)
throws java.lang.IllegalArgumentException
key - the key of the item.
java.lang.IllegalArgumentException - if the item doesn't exist.
public AnimationPropertyItem getDefault(java.lang.String key)
throws java.lang.IllegalArgumentException
key - the key of the item.
java.lang.IllegalArgumentException - if the item doesn't exist.
public void setDefault(java.lang.String key,
AnimationPropertyItem value)
throws java.lang.IllegalArgumentException
key - the key of the item.value - the new default value (as an Object).
java.lang.IllegalArgumentException - if the item doesn't exist.
public boolean getIsEditable(java.lang.String key)
throws java.lang.IllegalArgumentException
key - the key of the item.
java.lang.IllegalArgumentException - if the item doesn't exist.
public void setIsEditable(java.lang.String key,
boolean value)
throws java.lang.IllegalArgumentException
key - the key of the item.value - wether the item should be editable.
java.lang.IllegalArgumentException - if the item doesn't exist.
public java.lang.String getLabel(java.lang.String key)
throws java.lang.IllegalArgumentException
key - the key of the item.
java.lang.IllegalArgumentException - if the item doesn't exist.
public void setLabel(java.lang.String key,
java.lang.String value)
key - the key of the item.value - the new label for the item.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||