|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--FlexibleLayout
Flexible layout manager that allows components to be positionned either at an absolute or at a relative location. Component size can also adapt itself to the container size. Once positionned, the component can be newly laid out using FlexibleConstraints methods.
FlexibleConstraints| Constructor Summary | |
FlexibleLayout()
Creates a new FlexibleLayout instance with no size specified. |
|
FlexibleLayout(java.awt.Container target)
Creates a new FlexibleLayout instance to lay out the specified target container. |
|
FlexibleLayout(java.awt.Dimension size)
Creates a new FlexibleLayout instance with size. |
|
FlexibleLayout(java.awt.Dimension size,
java.awt.Insets insets)
Creates a new FlexibleLayout instance with size. |
|
FlexibleLayout(int width,
int height)
Creates a new FlexibleLayout instance with size. |
|
FlexibleLayout(int width,
int height,
java.awt.Insets insets)
Creates a new FlexibleLayout instance with size. |
|
| Method Summary | |
void |
addLayoutComponent(java.awt.Component comp,
java.lang.Object constraints)
|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
|
FlexibleConstraints |
getConstraints(java.awt.Component comp)
Gets the constraints for the specified component in this layout. |
float |
getLayoutAlignmentX(java.awt.Container target)
|
float |
getLayoutAlignmentY(java.awt.Container target)
|
java.awt.Dimension |
getSize()
Gets this layout size. |
void |
invalidateLayout(java.awt.Container target)
|
void |
layoutContainer(java.awt.Container parent)
Lays out the container using this FlexibleLayout rules. |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container parent)
|
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
|
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Calculates the preferred size dimensions for the specified container given the components in the specified parent container. |
void |
removeLayoutComponent(java.awt.Component comp)
|
void |
setConstraints(java.awt.Component comp,
FlexibleConstraints cons)
Specifies new constraints for the specified component in this layout. |
void |
setSize(java.awt.Dimension size)
Specifies this layout size. |
void |
setSize(int width,
int height)
Specifies this layout size. |
void |
setTarget(java.awt.Container target)
Sets this layout size so to lay out the specified target container. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FlexibleLayout()
public FlexibleLayout(java.awt.Dimension size)
This is the layout default size, and it defines the number of rows and columns to use for relative layout.
size - The size to use for layout.setSize(java.awt.Dimension)
public FlexibleLayout(int width,
int height)
This is the layout default size, and it defines the number of rows and columns to use for relative layout.
width - The width to use for layout.height - The height to use for layout.setSize(java.awt.Dimension)
public FlexibleLayout(java.awt.Dimension size,
java.awt.Insets insets)
This is the layout default size, and it defines the number of rows and columns to use for relative layout.
size - The size to use for layout.setSize(java.awt.Dimension)
public FlexibleLayout(int width,
int height,
java.awt.Insets insets)
This is the layout default size, and it defines the number of rows and columns to use for relative layout.
width - The width to use for layout.height - The height to use for layout.setSize(java.awt.Dimension)public FlexibleLayout(java.awt.Container target)
This layout size is set according to target client area, that is the
container size without its insets.
NB: It doesn't prevent you from using this layout for other containers too.
target - the target container.setTarget(java.awt.Container)| 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 java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
Fixed: Preferred size calculation was corrected in this version.
preferredLayoutSize in interface java.awt.LayoutManagerparent - the container to be laid out.minimumLayoutSize(java.awt.Container)public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerpublic java.awt.Dimension maximumLayoutSize(java.awt.Container parent)
maximumLayoutSize in interface java.awt.LayoutManager2public void layoutContainer(java.awt.Container parent)
Components that were not added to the container using FlexibleConstraints constraints (or null constraints) aren't laid out.
Most applications do not call this method directly.
layoutContainer in interface java.awt.LayoutManagerparent - the container in which to do the layoutFlexibleConstraints,
Container,
Container.doLayout()public 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.LayoutManager2
public void setConstraints(java.awt.Component comp,
FlexibleConstraints cons)
component - the component to be modified.constraints - the constraints to be applied.public FlexibleConstraints getConstraints(java.awt.Component comp)
component - the component to be queried.public void setSize(java.awt.Dimension size)
This is the layout default size, and it defines the number of rows and columns to use for relative layout.
size - The size to use for layout.getSize(),
setTarget(java.awt.Container),
FlexibleConstants.RELATIVE
public void setSize(int width,
int height)
This is the layout default size, and it defines the number of rows and columns to use for relative layout.
width - The width to use for layout.height - The height to use for layout.getSize(),
setTarget(java.awt.Container),
FlexibleConstants.RELATIVEpublic void setTarget(java.awt.Container target)
This layout size is set according to target client area, that is the target size without its insets.
target - the target container.setSize(java.awt.Dimension)public java.awt.Dimension getSize()
When not null, this is the layout preferred size, and it defines the number of rows and columns to use for relative layout.
setSize(java.awt.Dimension),
FlexibleConstants.RELATIVE
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||