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.
-
JotsaAnimationCollection(JotsaAnimationObject)
- Create a collection of objects controlled by a given master.
-
Duplicate()
- Create a new collection with identical to this collection.
-
GetMaster()
- Return the object which is the controlling master of this collection.
-
GetObject(int)
- Return an object from this collection.
-
GetSize()
- Return the number of objects in this collection.
-
Insert(JotsaAnimationObject)
- Insert the given object into the collection whose position is the same
as the master.
-
Insert(JotsaAnimationObject, int, int)
- Insert the given object into the collection with a position which is
offset from the position of the master.
-
Merge(JotsaAnimationCollection)
- Merge this collection into the collection given.
-
ScaleScale(double)
- Modify the scale of the master object.
-
ScaleScale(double, double)
- Modify the scales of the master object.
-
SetScale(double)
- Set the scale of the master object.
-
SetScale(double, double)
- Set the scales of the master object.
-
Show()
-
JotsaAnimationCollection
public JotsaAnimationCollection(JotsaAnimationObject master)
- Create a collection of objects controlled by a given master.
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
GetMaster
public JotsaAnimationObject GetMaster()
- Return the object which is the controlling master of this collection.
- Returns:
- The master of this collection.
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.
GetSize
public int GetSize()
- Return the number of objects in this collection.
- Returns:
- The number of objects in this collection
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
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.
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
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
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
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
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
Show
public void Show()
All Packages Class Hierarchy This Package Previous Next Index