|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.cmu.sun.folds.Layout
public class Layout
A Layout is a model representation of the contents of a Window. That is, It represents the folded scrolling portion of the window. Simply put, it contains a set of LayoutComponents, in order, that make up the layout. This class also provides some methods for helping with the animations process. For example, the Segment and Consolidate functions are called during the animation process to ensure that the layout is formed correctly for the next step.
| Field Summary | |
|---|---|
(package private) java.util.List<LayoutComponent> |
components
The underlying components that make up the Layout. |
| Constructor Summary | |
|---|---|
Layout()
Create a new Layout, initially empty. |
|
Layout(Layout otherLayout)
Create a layout that is a copy of another layout. |
|
| Method Summary | |
|---|---|
void |
addComponent(LayoutComponent newComp)
Adds a component to the end of this layout, and sets the parent of the provided component to this Layout. |
void |
clearMatches()
Clears all of the matches from the children LayoutComponents |
void |
consolidate()
Cleans up the Layout. |
java.util.LinkedList<LayoutComponent> |
getComponentList()
Returns the ListCompoennts that make up this Layout. |
java.util.List<LayoutComponent> |
getComponentsTypedAsList()
|
LayoutComponent |
getFirstComponent()
Returns the first component of this list. |
float |
getHeight()
|
LayoutComponent |
getLastComponent()
Returns the last component of this list. |
LayoutComponent |
getNextSibling(LayoutComponent component)
Gets the next component in the Layout |
LayoutComponent |
getPreviousSibling(LayoutComponent component)
Gets the previous component in the Layout |
void |
segment(Layout acrossLayout)
Segment the layout across another layout. |
private boolean |
segmentAcorss(Layout acrossLayout)
Implementation of the Segment Algorithm. |
private void |
segmentComponent(LayoutComponent localComp,
int rangeIndex)
Segments a particular LIST component that belongs to this Layout. |
java.lang.String |
toString()
Simply for debugging. |
void |
updateToNextRanges()
Updates all of the child LayoutComponents to their next ranges. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
java.util.List<LayoutComponent> components
| Constructor Detail |
|---|
public Layout()
public Layout(Layout otherLayout)
otherLayout - the layout to copy from.| Method Detail |
|---|
public float getHeight()
public java.util.LinkedList<LayoutComponent> getComponentList()
public LayoutComponent getFirstComponent()
public LayoutComponent getLastComponent()
public void addComponent(LayoutComponent newComp)
newComp - public java.util.List<LayoutComponent> getComponentsTypedAsList()
public void consolidate()
public void segment(Layout acrossLayout)
acrossLayout - layout to segment across.LayoutTransitionerprivate boolean segmentAcorss(Layout acrossLayout)
acrossLayout - layout to segment across.
private void segmentComponent(LayoutComponent localComp,
int rangeIndex)
localComp - component in this Layout to segmentrangeIndex - inded at which to segment the component.public void updateToNextRanges()
LayoutComponentpublic void clearMatches()
LayoutComponentpublic java.lang.String toString()
toString in class java.lang.Objectpublic LayoutComponent getPreviousSibling(LayoutComponent component)
component - returns a component previous to this one.
public LayoutComponent getNextSibling(LayoutComponent component)
component - returns a component after to this one.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||