|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.olduvai.accordiondrawer.SplitTransition
public class SplitTransition
A class that helps compute coordinates for smooth animated transitions. This is a simple container class that stores a beginning relative position, an ending relative position and uses a straightforward (linear) equation to transition between them in a specified number of steps. These objects are created and enqueued in the SplitAxis class. They are read out of the queue from the drawFrame method of AccordionDrawer.
AccordionDrawer,
SplitAxis| Field Summary | |
|---|---|
private int |
curStep
Current step of transition, between 0 and maxStep - 1. |
private double |
endRelative
Ending relative position of this split line, between SplitLine.getOpBound() and SplitLine.getParent(). |
private SplitLine |
index
Pointer to split line that is moving. |
private int |
maxStep
Maximum step number, the total number of linear steps this line is taking, indexed by curStep. |
private double |
startRelative
Starting relative position of this split line, between SplitLine.getOpBound() and SplitLine.getParent(). |
| Constructor Summary | |
|---|---|
SplitTransition(SplitLine index,
double endRelative,
int numSteps)
Create a split transition. |
|
| Method Summary | |
|---|---|
boolean |
done()
Test to see if the transitions are done for index. |
void |
end()
Finalization of transition, verification of correct relative location of a jump cut is made, or round-off errors. |
void |
incr()
Update the curStep by one, used before move(). |
void |
move()
Do a single step of movement in the relative space of the splitline index. |
java.lang.String |
toString()
Debugging output function. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private SplitLine index
private int curStep
maxStep - 1.
private int maxStep
curStep.
private double startRelative
SplitLine.getOpBound() and SplitLine.getParent().
private double endRelative
SplitLine.getOpBound() and SplitLine.getParent().
| Constructor Detail |
|---|
public SplitTransition(SplitLine index,
double endRelative,
int numSteps)
index - split line to move. Value of startRelative is stored here.endRelative - Final relative position of the line. Sets endRelative.numSteps - Number of steps in the linear transition.| Method Detail |
|---|
public void move()
index.
(curStep/maxStep) * (endRelative - startRelative) + startRelative
public void incr()
curStep by one, used before move().
public boolean done()
index.
endRelative.public void end()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||