algoanim.primitives
Class Group

java.lang.Object
  extended by algoanim.primitives.Primitive
      extended by algoanim.primitives.Group

public class Group
extends Primitive

Extends the API with the opportunity to group Primitives to be able to call methods on the whole group.

Author:
jens

Field Summary
 
Fields inherited from class algoanim.primitives.Primitive
gen
 
Constructor Summary
Group(GroupGenerator g, java.util.LinkedList<Primitive> primitiveList, java.lang.String name)
          Instantiates the Group and calls the create() method of the associated GroupGenerator.
 
Method Summary
 java.util.LinkedList<Primitive> getPrimitives()
          Returns the contained Primitives.
 void remove(Primitive p)
          Removes a certain Primitive from the group.
 
Methods inherited from class algoanim.primitives.Primitive
changeColor, exchange, getDisplayOptions, getName, hide, hide, moveBy, moveTo, moveVia, rotate, rotate, setName, show, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Group

public Group(GroupGenerator g,
             java.util.LinkedList<Primitive> primitiveList,
             java.lang.String name)
Instantiates the Group and calls the create() method of the associated GroupGenerator.

Parameters:
g - the appropriate code Generator.
primitiveList - the primitives to add to the group.
name - the groups name.
Method Detail

remove

public void remove(Primitive p)
Removes a certain Primitive from the group.

Parameters:
p - the Primitive to remove.

getPrimitives

public java.util.LinkedList<Primitive> getPrimitives()
Returns the contained Primitives.

Returns:
the Primitives belonging to this group.