|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.optional.layout.ColumnLayout
public class ColumnLayout
A layout manager for forms. Components flow along rows till a break element is encountered abd then they flow to the next row along the page length
Copyright (c) Xoetrope Ltd., 2002-2006
$Revision: 1.2 $
License: see License.txt
| Constructor Summary | |
|---|---|
ColumnLayout(int cols,
int padding)
Creates a layout manager that will lay out components along the y axis. |
|
| 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)
If the layout manager uses a per-component string, adds the component comp to the layout,
associating it
with the string specified by name. |
void |
addRowSpacer()
Fill the next slot with a spacer, or advance a column before adding the next component |
void |
addSpacer()
Fill the next slot with a spacer, or advance a column before adding the next component |
void |
addSpacer(int numSpacers)
Fill the next N slots with a spacer, or advance a column before adding the next component |
void |
endRow()
End the row, so that the next component begins on the left |
float |
getLayoutAlignmentX(java.awt.Container target)
Returns the alignment along the x axis. |
float |
getLayoutAlignmentY(java.awt.Container target)
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. |
void |
layoutContainer(java.awt.Container parent)
Lays out the specified container. |
java.awt.Dimension |
maximumLayoutSize(java.awt.Container target)
Calculates the maximum size dimensions for the specified container, given the components it contains. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Calculates the minimum size dimensions for the specified container, given the components it contains. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Calculates the preferred size dimensions for the specified container, given the components it contains. |
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout. |
void |
setIndentX(int x)
Set the X indent |
void |
setIndentY(int y)
Set the Y indent |
void |
setMaxRowWidth(double maxWidth)
Set the maximum row width, or the amount of horizontal space that the layout consumes |
void |
setMaxRowWidth(java.lang.String s)
Set the maximum row width, or the amount of horizontal space that the layout consumes |
void |
setNumCols(int cols)
Set the number of columns |
void |
setNumCols(java.lang.String s)
Set the number of columns |
void |
setPadding(int pad)
Set the padding amount |
void |
setPadding(java.lang.String s)
Set the padding amount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColumnLayout(int cols,
int padding)
target - the container that needs to be laid out| Method Detail |
|---|
public void setMaxRowWidth(double maxWidth)
maxWidth - the maximum width in pixels or as a percentage if less than 1.0public void setMaxRowWidth(java.lang.String s)
s - a string representing the double value for the maximum widthpublic void setPadding(java.lang.String s)
s - the amount of paddingpublic void setPadding(int pad)
pad - the amount of paddingpublic void setNumCols(java.lang.String s)
s - the amount of paddingpublic void setNumCols(int cols)
pad - the amount of paddingpublic void setIndentX(int x)
x - the indent for the left hand side in pixelspublic void setIndentY(int y)
y - the indent for the top edge in pixelspublic void endRow()
public void addRowSpacer()
public void addSpacer()
public void addSpacer(int numSpacers)
numSpacers - the number of spacers to add
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 java.awt.Dimension maximumLayoutSize(java.awt.Container target)
maximumLayoutSize in interface java.awt.LayoutManager2Component.getMaximumSize(),
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.LayoutManager2
public void addLayoutComponent(java.lang.String name,
java.awt.Component comp)
comp to the layout,
associating it
with the string specified by name.
addLayoutComponent in interface java.awt.LayoutManagername - the string to be associated with the componentcomp - the component to be addedpublic void removeLayoutComponent(java.awt.Component comp)
removeLayoutComponent in interface java.awt.LayoutManagercomp - the component to be removedpublic java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
preferredLayoutSize in interface java.awt.LayoutManagerparent - the container to be laid outminimumLayoutSize(java.awt.Container)public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerparent - the component to be laid outpreferredLayoutSize(java.awt.Container)public void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManagerparent - the container to be laid out
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||