|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.visuals.BoxLayout
public class BoxLayout
BoxLayout is a layoutManager that positions components in an arrangement similar to the
java.awt.BorderLayout, but also allows for individual margins between the components.
A component is positioned based on the orientation it is added with. It also allows
for overlapping components and switching a components orientation without
adding/removing the component.
Notes:
| Field Summary | |
|---|---|
static int |
BOTTOM
BOTTOM orientation value |
static int |
LEFT
LEFT orientation value |
static int |
NONE
NONE orientation value ( places component at the center of the container ) |
static int |
RIGHT
RIGHT orientation value |
static int |
TOP
TOP orientation value |
| Constructor Summary | |
|---|---|
BoxLayout()
Constructs a new BorderLayout with no margins between components. |
|
BoxLayout(int topGap,
int bottomGap,
int rightGap,
int leftGap)
Constructs a BorderLayout with the specified margins between components. |
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
Adds the specified component to the layout, using the specified constraint object. |
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Deprecated. |
void |
changeOrientation(java.awt.Component comp,
int newOrientation)
Change the orientation of a component in this layout. |
int |
getBottomBorder()
Get the gap between the bottom and center components. |
int |
getBottomHeight()
Get the height to set the bottom component's height. |
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. |
int |
getLeftBorder()
Get the gap between the left and center components. |
int |
getLeftWidth()
Get the width to set the left component's width. |
int |
getRightBorder()
Get the gap between the right and center components. |
int |
getRightWidth()
Get the width to set the right component's width. |
int |
getTopBorder()
Get the gap between the top and center components. |
int |
getTopHeight()
Get the height to set the top component's height. |
void |
invalidateLayout(java.awt.Container target)
Invalidates the layout, indicating that if the layout manager has cached information it should be discarded. |
void |
layoutContainer(java.awt.Container parent)
Lays out the specified container. |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target)
Returns the maximum dimensions for this layout given the components in the specified target container. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container target)
Returns the minimum dimensions needed to layout the components contained in the specified target container. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container target)
Returns the preferred dimensions for this layout given the components in the specified target container. |
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout. |
void |
setBottomBorder(int size)
Set the gap between the bottom and center components. |
void |
setBottomHeight(int size)
Set the height to set the bottom component's height. |
void |
setLeftBorder(int size)
Set the gap between the left and center components. |
void |
setLeftWidth(int size)
Set the width to set the left component's width. |
void |
setRightBorder(int size)
Set the gap between the right and center components. |
void |
setRightWidth(int size)
Set the width to set the right component's width. |
void |
setTopBorder(int size)
Set the gap between the top and center components. |
void |
setTopHeight(int size)
Set the height to set the top component's height. |
java.lang.String |
toString()
Returns the String representation of this BorderLayout's values. |
| Field Detail |
|---|
public static final int NONE
public static final int TOP
public static final int BOTTOM
public static final int LEFT
public static final int RIGHT
| Constructor Detail |
|---|
public BoxLayout()
public BoxLayout(int topGap,
int bottomGap,
int rightGap,
int leftGap)
topGap - the gap between the top and the center componentsbottomGap - the gap between the bottom and the center componentsrightGap - the gap between the right and the center componentsleftGap - the gap between the left and the center components| Method Detail |
|---|
public int getTopBorder()
public void setTopBorder(int size)
public int getBottomBorder()
public void setBottomBorder(int size)
public int getRightBorder()
public void setRightBorder(int size)
public int getLeftBorder()
public void setLeftBorder(int size)
public int getTopHeight()
public void setTopHeight(int size)
public int getBottomHeight()
public void setBottomHeight(int size)
public int getRightWidth()
public void setRightWidth(int size)
public int getLeftWidth()
public void setLeftWidth(int size)
public void changeOrientation(java.awt.Component comp,
int newOrientation)
comp - the component to change the orientation ofnewOrientation - the components new orientation.
public void addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
addLayoutComponent in interface java.awt.LayoutManager2comp - the component to be addedconstraints - where/how the component is added to the layout.
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.LayoutManagercomp - the component to be removedpublic java.awt.Dimension minimumLayoutSize(java.awt.Container target)
minimumLayoutSize in interface java.awt.LayoutManagertarget - the Container on which to do the layoutContainer,
preferredLayoutSize(java.awt.Container)public java.awt.Dimension preferredLayoutSize(java.awt.Container target)
preferredLayoutSize in interface java.awt.LayoutManagertarget - the component which needs to be laid outContainer,
minimumLayoutSize(java.awt.Container)public java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize in interface java.awt.LayoutManager2target - the component which needs to be laid outContainer,
minimumLayoutSize(java.awt.Container),
preferredLayoutSize(java.awt.Container)public float getLayoutAlignmentX(java.awt.Container parent)
getLayoutAlignmentX in interface java.awt.LayoutManager2public float getLayoutAlignmentY(java.awt.Container parent)
getLayoutAlignmentY in interface java.awt.LayoutManager2public void invalidateLayout(java.awt.Container target)
invalidateLayout in interface java.awt.LayoutManager2public void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManagertarget - the component being laid outContainerpublic java.lang.String toString()
toString in class java.lang.Object
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||