|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.cmu.sun.folds.LayoutTransitoner
public class LayoutTransitoner
When the Folded Scrolling window changes, we need to make a smooth transition between scenes. In order to do this, we run the LayoutTransitioner. The transitioner takes two layouts, a current layout, and a next layout. The class creates a third layout as a return that represents the planed transition between the current layout and the next layout. The layout that is returned has components with their nextRange field set. This means that a call to updateNextRange will change the returned layout to the ranges needed to represent the next layout.
LayoutComponent| Field Summary | |
|---|---|
(package private) java.util.LinkedList<LayoutComponent> |
activeComps
We transition from the activeLayout to nextLayout. |
(package private) Layout |
activeLayout
the current, active layout |
(package private) int |
activePos
As we iterate, we build the plan slowly. |
(package private) java.util.LinkedList<LayoutComponent> |
nextComps
We transition from the activeLayout to nextLayout. |
(package private) Layout |
nextLayout
the next layout, the one we are transitioning to. |
(package private) int |
nextPos
As we iterate, we build the plan slowly. |
(package private) Layout |
plan
the layout that this object creates to transition between activeLayout and nextLayout. |
| Constructor Summary | |
|---|---|
LayoutTransitoner()
|
|
| Method Summary | |
|---|---|
private void |
addActiveComp(LayoutComponent lcActive)
|
private boolean |
addIfMatched(LayoutComponent lcActive,
LayoutComponent lcNext)
returns true if the components have been added |
private void |
addNextComp(LayoutComponent lcNext)
|
private void |
addNextComponentsToPlan()
|
private void |
addPlanComponent(LayoutComponent.Type type,
ListModel model,
IndexRange range,
IndexRange nextRange)
|
private void |
addUnmatchedFoldsOfType(LayoutComponent.Type type)
|
private void |
consolidateLayouts()
Before we begin the transition calculation, we want to make sure there are no empty components (size zero) hanging in there, or adjacent LIST components, that could introduce matching problems. |
private LayoutComponent |
getFirst(java.util.LinkedList<LayoutComponent> compList)
|
private void |
makeAnimationPlan()
makes an animation plan between activeLayout and nextLayout and stores it in the plan member variable |
private void |
matchLayouts()
Between the two laytous, match the components that need to animate between each other. |
Layout |
prepareAnimation(Layout fromActiveLayout,
Layout toNextLayout)
Creates an animation plan that visually transitions between two layouts. |
private void |
segmentLayouts()
Since we must insert and remove visual elements, we must make sure that they disaper or appear at the right spot in the list, and then animate correctly. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
Layout activeLayout
Layout nextLayout
Layout plan
int activePos
int nextPos
java.util.LinkedList<LayoutComponent> activeComps
java.util.LinkedList<LayoutComponent> nextComps
| Constructor Detail |
|---|
public LayoutTransitoner()
| Method Detail |
|---|
public Layout prepareAnimation(Layout fromActiveLayout,
Layout toNextLayout)
private void matchLayouts()
private void segmentLayouts()
Layoutprivate void consolidateLayouts()
private void makeAnimationPlan()
private void addUnmatchedFoldsOfType(LayoutComponent.Type type)
private void addNextComponentsToPlan()
private void addNextComp(LayoutComponent lcNext)
private void addActiveComp(LayoutComponent lcActive)
private boolean addIfMatched(LayoutComponent lcActive,
LayoutComponent lcNext)
private void addPlanComponent(LayoutComponent.Type type,
ListModel model,
IndexRange range,
IndexRange nextRange)
private LayoutComponent getFirst(java.util.LinkedList<LayoutComponent> compList)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||