All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class CH.ifa.draw.figures.FigureAttributes

java.lang.Object
   |
   +----CH.ifa.draw.figures.FigureAttributes

public class FigureAttributes
extends Object
implements Cloneable, Serializable
A container for a figure's attributes. The attributes are stored as key/value pairs.

See Also:
Figure

Constructor Index

 o FigureAttributes()
Constructs the FigureAttributes.

Method Index

 o clone()
Clones the attributes.
 o get(String)
Gets the attribute with the given name.
 o hasDefined(String)
Tests if an attribute is defined.
 o read(StorableInput)
Reads the attributes from a StorableInput.
 o set(String, Object)
Sets the attribute with the given name and overwrites its previous value.
 o write(StorableOutput)
Writes the attributes to a StorableInput.

Constructors

 o FigureAttributes
 public FigureAttributes()
Constructs the FigureAttributes.

Methods

 o get
 public Object get(String name)
Gets the attribute with the given name.

Returns:
s attribute or null if the key is not defined
 o set
 public void set(String name,
                 Object value)
Sets the attribute with the given name and overwrites its previous value.

 o hasDefined
 public boolean hasDefined(String name)
Tests if an attribute is defined.

 o clone
 public Object clone()
Clones the attributes.

Overrides:
clone in class Object
 o read
 public void read(StorableInput dr) throws IOException
Reads the attributes from a StorableInput. FigureAttributes store the following types directly: Color, Boolean, String, Int. Other attribute types have to implement the Storable interface or they have to be wrapped by an object that implements Storable.

See Also:
Storable, write
 o write
 public void write(StorableOutput dw)
Writes the attributes to a StorableInput. FigureAttributes store the following types directly: Color, Boolean, String, Int. Other attribute types have to implement the Storable interface or they have to be wrapped by an object that implements Storable.

See Also:
Storable, write

All Packages  Class Hierarchy  This Package  Previous  Next  Index