|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.cmu.sun.folds.LayoutMatcher
public class LayoutMatcher
When the Folded Scrolling window changes, we need to make a smooth transition between scenes. In order to do this, we run the LayoutTransitioner. One of the steps in the transition is to match component from the current layout to the next layout. These matched components will animate between one another. The LayoutMatcher matches together components based on a number of limits: First, the LayoutComponents must be of the same type. Edge folds (TOP_FOLD or BOTTOM_FOLD) are matched before any other component. Next, the manager matches components in the order of their overlap. For example, it Matches all components with an EXACT_OVERLAP first. Then, after all matching has been done for EXACT_OVERLAP, the matcher moves on to TOTAL_OVERLAP, then PARTIAL_OVERLAP. Once components have been matched, they can be built together into a layout that acts as an animation plan.
LayoutTransitioner, LayoutComponent, IndexRange| Nested Class Summary | |
|---|---|
(package private) static class |
LayoutMatcher.Mode
|
| Field Summary | |
|---|---|
(package private) Layout |
layout1
first layotu to match against. |
(package private) Layout |
layout2
second layout to match against. |
(package private) LayoutMatcher.Mode |
mode
The mode of operation for the matchLayouts() call. |
(package private) IndexRange.Overlap.Type |
overlapMode
The types of overlap that will be accepted as a match when matchLayouts() is called. |
| Constructor Summary | |
|---|---|
LayoutMatcher()
|
|
| Method Summary | |
|---|---|
private boolean |
doesMatch(LayoutComponent lc1,
LayoutComponent lc2)
Returns True if the two components are matched based on the specs in the mode field and the overlapMode field. |
void |
match(Layout firstLayout,
Layout secondLayout)
Mathces components between these two layouts. |
private void |
matchLayouts()
Go through each pair of components (cross product) and call tryToMatch(); |
private void |
tryToMatch(LayoutComponent lc1,
LayoutComponent lc2)
Tries to match two components together using the doesMatch() method as a test to see if the components should match together. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
LayoutMatcher.Mode mode
IndexRange.Overlap.Type overlapMode
Layout layout1
Layout layout2
| Constructor Detail |
|---|
public LayoutMatcher()
| Method Detail |
|---|
public void match(Layout firstLayout,
Layout secondLayout)
private void matchLayouts()
private void tryToMatch(LayoutComponent lc1,
LayoutComponent lc2)
private boolean doesMatch(LayoutComponent lc1,
LayoutComponent lc2)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||