Class jotsa.JotsaAnimationCollection
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jotsa.JotsaAnimationCollection

java.lang.Object
   |
   +----jotsa.JotsaAnimationCollection

public class JotsaAnimationCollection
extends Object
This class handles collections of objects. A collection is a group of JotsaANimationObjects whose size and position are controlled by a single object called the master. Movement and scaling operations on the master affect all objects in the collection.

Constructor Index

 o JotsaAnimationCollection(JotsaAnimationObject)
Create a collection of objects controlled by a given master.

Method Index

 o Duplicate()
Create a new collection with identical to this collection.
 o GetMaster()
Return the object which is the controlling master of this collection.
 o GetObject(int)
Return an object from this collection.
 o GetSize()
Return the number of objects in this collection.
 o Insert(JotsaAnimationObject)
Insert the given object into the collection whose position is the same as the master.
 o Insert(JotsaAnimationObject, int, int)
Insert the given object into the collection with a position which is offset from the position of the master.
 o Merge(JotsaAnimationCollection)
Merge this collection into the collection given.
 o ScaleScale(double)
Modify the scale of the master object.
 o ScaleScale(double, double)
Modify the scales of the master object.
 o SetScale(double)
Set the scale of the master object.
 o SetScale(double, double)
Set the scales of the master object.
 o Show()

Constructors

 o JotsaAnimationCollection
  public JotsaAnimationCollection(JotsaAnimationObject master)
Create a collection of objects controlled by a given master.

Methods

 o Duplicate
  public JotsaAnimationCollection Duplicate()
Create a new collection with identical to this collection.
All objects are duplicated and the new collection has a new master.
All of the object have the same size and position as in the original.
Returns:
The new collectionS
See Also:
Merge
 o GetMaster
  public JotsaAnimationObject GetMaster()
Return the object which is the controlling master of this collection.
Returns:
The master of this collection.
 o GetObject
  public JotsaAnimationObject GetObject(int i)
Return an object from this collection.
The objects in the collection are ordered by the time they were inserted in the collection. The master is always the first one added and has index 0.
Parameters:
i - The index of the object to return.
Returns:
The object in the collection with index i or null if i is greater than or equal to the size of the collection.
 o GetSize
  public int GetSize()
Return the number of objects in this collection.
Returns:
The number of objects in this collection
 o Insert
  public void Insert(JotsaAnimationObject obj)
Insert the given object into the collection whose position is the same as the master.
Parameters:
obj - The JotsaANimationObject to insert
 o Insert
  public void Insert(JotsaAnimationObject obj,
                     int xoff,
                     int yoff)
Insert the given object into the collection with a position which is offset from the position of the master.
Parameters:
obj - The object to insert.
xoff - The x offset of this object from the position of the master.
yoff - The y offset of this object from the position of the master.
 o Merge
  public void Merge(JotsaAnimationCollection col)
Merge this collection into the collection given.
All objects in this collection except the master are removed and inserted into the given collection.
The scales and offsets of each object are changed so that they have the same size and position as before.
Parameters:
The - collection into which the objects should be inserted.
See Also:
Duplicate
 o ScaleScale
  public void ScaleScale(double s)
Modify the scale of the master object.
All objects in the collection are scaled by scale value. Both the x-dimension scale and the y-collection scale are multiplied by the given scaling factor.
Parameters:
s - The value to multiply both the x-dimension and y-dimension of the master object by.
See Also:
SetScale
 o ScaleScale
  public void ScaleScale(double sx,
                         double sy)
Modify the scales of the master object.
All objects in the collection are scaled by the master's scale values. Both the x-dimension scale and the y-collection scale each multiplied by the corresponding values given.
Parameters:
sx - The value to multiply the x-dimension scale value by.
sy - The value to multiply the y-dimension scale value by.
See Also:
SetScale
 o SetScale
  public void SetScale(double s)
Set the scale of the master object.
All objects in the collection are scaled by this value. Both the x-dimension scale and the y-collection scale are set to the same value.
Parameters:
s - The new scale for both the x-dimension and y-dimension of the master object.
See Also:
ScaleScale
 o SetScale
  public void SetScale(double sx,
                       double sy)
Set the scales of the master object.
All objects in the collection are scaled by these values. Both the x-dimension scale and the y-collection scale each set to the corresponding values given.
Parameters:
sx - The new x-dimension scale value.
sy - The new y-dimension scale value.
See Also:
ScaleScale
 o Show
  public void Show()

All Packages  Class Hierarchy  This Package  Previous  Next  Index