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
-
FigureAttributes()
- Constructs the FigureAttributes.
-
clone()
- Clones the attributes.
-
get(String)
- Gets the attribute with the given name.
-
hasDefined(String)
- Tests if an attribute is defined.
-
read(StorableInput)
- Reads the attributes from a StorableInput.
-
set(String, Object)
- Sets the attribute with the given name and
overwrites its previous value.
-
write(StorableOutput)
- Writes the attributes to a StorableInput.
FigureAttributes
public FigureAttributes()
- Constructs the FigureAttributes.
get
public Object get(String name)
- Gets the attribute with the given name.
- Returns:
- s attribute or null if the key is not defined
set
public void set(String name,
Object value)
- Sets the attribute with the given name and
overwrites its previous value.
hasDefined
public boolean hasDefined(String name)
- Tests if an attribute is defined.
clone
public Object clone()
- Clones the attributes.
- Overrides:
- clone in class Object
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
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