|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.swing.layout.DeckLayout
public class DeckLayout
Deck layout. DeckLayout treats each component in the container as a card. Only one card is visible at a time, and the container acts like a deck of cards. The ordering of cards is determined by the container's own internal ordering of its component objects. DeckLayout defines a set of methods that allow an application to flip through the cards sequentially, or to show a specified card. The addLayoutComponent method can be used to associate a string identifier with a given card for faster random access.
| Constructor Summary | |
|---|---|
DeckLayout()
Constructor. |
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(java.awt.Component c,
java.lang.Object constraints)
Adds the specified component to this deck layout's internal table, by name. |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component c)
Deprecated. replaced by addLayoutComponent(Component, Object) |
void |
first(java.awt.Container parent)
Flips to the first card of the container. |
java.awt.Component |
getComponentByName(java.lang.String name)
Gets a component by its name. |
float |
getLayoutAlignmentX(java.awt.Container parent)
Returns the alignment along the x axis. |
float |
getLayoutAlignmentY(java.awt.Container parent)
Returns the alignment along the y axis. |
void |
invalidateLayout(java.awt.Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded. |
boolean |
isWrap()
Gets the wrap around when flipping through the card stack. |
void |
last(java.awt.Container parent)
Flips to the last card of the container. |
void |
layoutContainer(java.awt.Container parent)
Lays out the specified container using this deck layout. |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target)
Returns the maximum dimensions for this layout given the component in the specified target container. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Calculates the minimum size for the specified page. |
int |
next(java.awt.Container parent)
Flips to the next card of the specified container. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Calculates the preferred size for the specified page. |
int |
previous(java.awt.Container parent)
Flips to the previous card of the specified container. |
void |
removeLayoutComponent(java.awt.Component c)
Removes the specified component from the layout. |
void |
setWrap(boolean wrap)
Sets the wrap around when flipping through the card stack. |
void |
show(java.awt.Container parent,
int index)
Flips to the component at the numbered position. |
void |
show(java.awt.Container parent,
java.lang.String name)
Flips to the component that was added to this layout using the specified name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeckLayout()
| Method Detail |
|---|
public boolean isWrap()
public void setWrap(boolean wrap)
public void addLayoutComponent(java.awt.Component c,
java.lang.Object constraints)
addLayoutComponent in interface java.awt.LayoutManager2c - The component to be addedconstraints - A name that identifies the component
public void addLayoutComponent(java.lang.String name,
java.awt.Component c)
addLayoutComponent in interface java.awt.LayoutManagerpublic void removeLayoutComponent(java.awt.Component c)
removeLayoutComponent in interface java.awt.LayoutManagerc - The component to be removedpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManagerparent - The name of the parent container
public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerparent - The name of the parent container
public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize in interface java.awt.LayoutManager2target - The component which needs to be laid out
public void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManagerparent - Container that owns the layoutpublic float getLayoutAlignmentX(java.awt.Container parent)
getLayoutAlignmentX in interface java.awt.LayoutManager2parent - Container that owns the layout
public float getLayoutAlignmentY(java.awt.Container parent)
getLayoutAlignmentY in interface java.awt.LayoutManager2parent - Container that owns the layout
public void invalidateLayout(java.awt.Container target)
invalidateLayout in interface java.awt.LayoutManager2target - Container that owns the layoutpublic void first(java.awt.Container parent)
parent - Container that owns the layoutpublic int next(java.awt.Container parent)
parent - Container that owns the layout
public int previous(java.awt.Container parent)
parent - Container that owns the layout
public void last(java.awt.Container parent)
parent - Container that owns the layout
public void show(java.awt.Container parent,
java.lang.String name)
parent - Container that owns the layoutname - The component name
public void show(java.awt.Container parent,
int index)
parent - Container that owns the layoutindex - The index (between 0 and component count - 1)public java.awt.Component getComponentByName(java.lang.String name)
name - Name of the component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||