|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectalgoanim.primitives.Primitive
public abstract class Primitive
A Primitive is an object which can be worked with in any
animation script language. Since all Primitive types share a common
administrative functionality this code is implemented in this class.
| Field Summary | |
|---|---|
protected GeneratorInterface |
gen
|
| Constructor Summary | |
|---|---|
protected |
Primitive(GeneratorInterface g,
DisplayOptions d)
|
| Method Summary | |
|---|---|
void |
changeColor(java.lang.String colorType,
java.awt.Color newColor,
Timing t,
Timing d)
Changes the color of a part of this Primitive which is
specified by colorType. |
void |
exchange(Primitive q)
Changes the position of this Primitive with the given one. |
DisplayOptions |
getDisplayOptions()
Returns the DisplayOptions of this Primitive. |
java.lang.String |
getName()
Returns the name of this Primitive. |
void |
hide()
Hides this Primitive now. |
void |
hide(Timing t)
Hides this Primitive after the given time. |
void |
moveBy(java.lang.String moveType,
int dx,
int dy,
Timing delay,
Timing duration)
Moves this Primitive to a Node. |
void |
moveTo(java.lang.String direction,
java.lang.String moveType,
Node target,
Timing delay,
Timing duration)
TODO Über die Exceptions nachdenken... |
void |
moveVia(java.lang.String direction,
java.lang.String moveType,
Primitive via,
Timing delay,
Timing duration)
Moves this Primitive along another one into a specific
direction. |
void |
rotate(Node center,
int degrees,
Timing t,
Timing d)
Rotates this Primitive around a given center. |
void |
rotate(Primitive around,
int degrees,
Timing t,
Timing d)
Rotates this Primitive around another one after a time
offset. |
void |
setName(java.lang.String newName)
Sets the name of this Primitive. |
void |
show()
Show this Primitive now. |
void |
show(Timing t)
Show this Primitive after the given offset. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected GeneratorInterface gen
| Constructor Detail |
|---|
protected Primitive(GeneratorInterface g,
DisplayOptions d)
g - the appropriate code Generator for this
Primitive.d - [optional] the DisplayOptions for this
Primitive.| Method Detail |
|---|
public java.lang.String getName()
Primitive.
Primitive.public void setName(java.lang.String newName)
Primitive.
newName - the new name for this Primitive.public DisplayOptions getDisplayOptions()
DisplayOptions of this Primitive.
DisplayOptions of this Primitive.public void exchange(Primitive q)
q - the other Primitive.
public void rotate(Primitive around,
int degrees,
Timing t,
Timing d)
Primitive around another one after a time
offset. The duration of this operation may also be specified.
around - the center of the rotation.degrees - the degrees by which the Primitive shall be
rotated.t - [optional] the offset until the operation shall be performed.d - [optional] the time, this operation shall last.
public void rotate(Node center,
int degrees,
Timing t,
Timing d)
Primitive around a given center.
center - the center of the rotation.degrees - the degrees by which the Primitive shall be
rotated.t - [optional] the offset until the operation shall be performed.d - [optional] the time, this operation shall last.
public void changeColor(java.lang.String colorType,
java.awt.Color newColor,
Timing t,
Timing d)
Primitive which is
specified by colorType. Please have a look at the
appropriate Language class, where valid color types may be
specified.
colorType - the part of this Primitive of which the color shall
be changed.newColor - the new color.t - [optional] the offset until the operation shall be performed.d - [optional] the time, this operation shall last.
public void moveVia(java.lang.String direction,
java.lang.String moveType,
Primitive via,
Timing delay,
Timing duration)
throws IllegalDirectionException
Primitive along another one into a specific
direction.
direction - the direction to move the Primitive.moveType - the type of the movement.via - the Arc, along which the Primitive
is moved.delay - the delay, before the operation is performed.duration - the duration of the operation.
IllegalDirectionException
public void moveBy(java.lang.String moveType,
int dx,
int dy,
Timing delay,
Timing duration)
Primitive to a Node.
moveType - the type of the movement.dx - the x offset to movedy - the y offset to movedelay - the delay, before the operation is performed.duration - the duration of the operation.
public void moveTo(java.lang.String direction,
java.lang.String moveType,
Node target,
Timing delay,
Timing duration)
throws IllegalDirectionException
Primitive to a
Node.
direction - the direction to move the Primitive.moveType - the type of the movement.target - the point where the Primitive is moved to.delay - the delay, before the operation is performed.duration - the duration of the operation.
IllegalDirectionExceptionpublic void show(Timing t)
Primitive after the given offset.
t - the offset until the operation shall be performed.public void show()
Primitive now.
public void hide(Timing t)
Primitive after the given time.
t - the offset until the operation shall be performed.public void hide()
Primitive now.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||