|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swingx.StackLayout
public class StackLayout
StackLayout is a Swing layout aimed to act as the layers
stack of most popuplar graphics editing tools like The GIMP or
Photoshop. While similar to CardLayout, this layout
displays all the components of the container. If you are using non-rectangular
components (i.e. transparent) you will see them from top to bottom of the
stack.
When using this layout, each component can be added in the container either on top of the stack or at the bootom:
JPanel panel = new JPanel(new StackLayout());
panel.add(new JLabel("On top"), StackLayout.TOP);
panel.add(new JLabel("At bottom"), StackLayout.BOTTOM);
If you don't specify the constraint, the component will be added at the top
of the components stack.
All the components managed by this layout will be given the same size as the container itself. The minimum, maximum and preferred size of the container are based upon the largest minimum, maximum and preferred size of the children components.
StackLayout works only with JSE 1.5 and Java SE 6 and
greater.
| Field Summary | |
|---|---|
static java.lang.String |
BOTTOM
Use this constraint to add a component at the bottom of the stack. |
static java.lang.String |
TOP
Use this contrainst to add a component at the top of the stack. |
| Constructor Summary | |
|---|---|
StackLayout()
|
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
|
float |
getLayoutAlignmentX(java.awt.Container target)
|
float |
getLayoutAlignmentY(java.awt.Container target)
|
void |
invalidateLayout(java.awt.Container target)
|
void |
layoutContainer(java.awt.Container parent)
|
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target)
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
|
void |
removeLayoutComponent(java.awt.Component comp)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String BOTTOM
public static final java.lang.String TOP
| Constructor Detail |
|---|
public StackLayout()
| Method Detail |
|---|
public void addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
addLayoutComponent in interface java.awt.LayoutManager2
public void addLayoutComponent(java.lang.String name,
java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManagerpublic void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent in interface java.awt.LayoutManagerpublic float getLayoutAlignmentX(java.awt.Container target)
getLayoutAlignmentX in interface java.awt.LayoutManager2public float getLayoutAlignmentY(java.awt.Container target)
getLayoutAlignmentY in interface java.awt.LayoutManager2public void invalidateLayout(java.awt.Container target)
invalidateLayout in interface java.awt.LayoutManager2public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManagerpublic java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerpublic java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize in interface java.awt.LayoutManager2public void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||