algoanim.properties.items
Class IntegerPropertyItem

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

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

Represents an AnimationPropertiesItem that stores an int value.

Author:
T. Ackermann

Constructor Summary
IntegerPropertyItem()
          Sets the default value to 1.
IntegerPropertyItem(int defValue)
          Sets the default value to defValue.
IntegerPropertyItem(int defValue, int minValue, int maxValue)
          Gives the item bounds for the value saved in it, the value given by set must in between [min, max].
 
Method Summary
 void accept(Visitor v)
          Defines the interface for a Visitor to access a Visitable.
 java.lang.Object clone()
          Clones the element
 java.lang.Object get()
          Returns a represantation of the internal value.
 boolean set(int value)
          Sets the internal value to a new one, if this object contains an int 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

IntegerPropertyItem

public IntegerPropertyItem()
Sets the default value to 1.


IntegerPropertyItem

public IntegerPropertyItem(int defValue)
Sets the default value to defValue.

Parameters:
defValue - the default value.

IntegerPropertyItem

public IntegerPropertyItem(int defValue,
                           int minValue,
                           int maxValue)
Gives the item bounds for the value saved in it, the value given by set must in between [min, max].

Parameters:
defValue - default value
minValue - lower bound
maxValue - upper bound
Method Detail

get

public java.lang.Object 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(int value)
            throws java.lang.IllegalArgumentException
Description copied from class: AnimationPropertyItem
Sets the internal value to a new one, if this object contains an int value.

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

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