algoanim.properties.items
Class EnumerationPropertyItem

java.lang.Object
  extended by algoanim.properties.items.AnimationPropertyItem
      extended by algoanim.properties.items.EnumerationPropertyItem
All Implemented Interfaces:
Visitable, java.lang.Cloneable

public class EnumerationPropertyItem
extends AnimationPropertyItem
implements java.lang.Cloneable, Visitable

Represents an AnimationPropertiesItem that stores a Color value.

Version:
0.7 20080509
Author:
Guido Rößling

Constructor Summary
EnumerationPropertyItem()
           
EnumerationPropertyItem(java.lang.String defaultChoice, java.util.Vector<java.lang.String> availableChoices)
          Sets the default value to defValue.
EnumerationPropertyItem(java.util.Vector<java.lang.String> choices)
          Sets the color to green (default).
 
Method Summary
 void accept(Visitor v)
          Defines the interface for a Visitor to access a Visitable.
 java.lang.Object clone()
          Clones the element
 java.util.Vector<java.lang.String> get()
          Returns a represantation of the internal value.
 boolean set(java.lang.String value)
          Sets the internal value to a new one, if this object contains a String value.
 
Methods inherited from class algoanim.properties.items.AnimationPropertyItem
set, set, set, set, set
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumerationPropertyItem

public EnumerationPropertyItem(java.lang.String defaultChoice,
                               java.util.Vector<java.lang.String> availableChoices)
Sets the default value to defValue.

Parameters:
defaultChoice - the default color.
availableChoices - the vector of possible choices

EnumerationPropertyItem

public EnumerationPropertyItem()

EnumerationPropertyItem

public EnumerationPropertyItem(java.util.Vector<java.lang.String> choices)
Sets the color to green (default).

Method Detail

get

public java.util.Vector<java.lang.String> get()
Description copied from class: AnimationPropertyItem
Returns a represantation of the internal value.

Specified by:
get in class AnimationPropertyItem
Returns:
A represantation of the internal value.
See Also:
AnimationPropertyItem.get()

set

public boolean set(java.lang.String value)
            throws java.lang.IllegalArgumentException
Description copied from class: AnimationPropertyItem
Sets the internal value to a new one, if this object contains a String value.

Overrides:
set in class AnimationPropertyItem
Parameters:
value - a new String value.
Returns:
whether the operation was successful.
Throws:
java.lang.IllegalArgumentException
See Also:
AnimationPropertyItem.set(java.awt.Color)

clone

public java.lang.Object clone()
Clones the element

Overrides:
clone in class AnimationPropertyItem
Returns:
a clone of this element
See Also:
AnimationProperties.fillAdditional()

accept

public void accept(Visitor v)
Description copied from interface: Visitable
Defines the interface for a Visitor to access a Visitable.

Specified by:
accept in interface Visitable
Specified by:
accept in class AnimationPropertyItem
Parameters:
v - the visitor
See Also:
Visitable