|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
com.sas.visuals.RowColumnLayout
public class RowColumnLayout
RowColumnLayout is a class that implements the java.awt.LayoutManager interface to
be able to layout components within a container in rows and columns. By
default it creates a grid layout that is filled column first.
Notes:
| Constructor Summary | |
|---|---|
RowColumnLayout()
Default constructor. |
|
RowColumnLayout(int rows,
int cols,
int fill)
Creates a grid layout with the specified rows and columns. |
|
RowColumnLayout(int rows,
int cols,
int fill,
int hgap,
int vgap)
Creates a grid layout with the specified rows, columns, horizontal gap, and vertical gap. |
|
RowColumnLayout(int rows,
int cols,
int fill,
int hgap,
int vgap,
boolean spacing)
Creates a grid layout with the specified rows, columns, horizontal gap, and vertical gap. |
|
| Method Summary | |
|---|---|
void |
addLayoutComponent(java.lang.String name,
java.awt.Component comp)
Adds the specified component with the specified name to the layout. |
boolean |
equals(java.lang.Object obj)
|
int |
getColumns()
Get the number of columns in this layout. |
int |
getFill()
Get the order the grid gets filled with objects. |
int |
getHgap()
Get the horizontal gap between components. |
int |
getRows()
Get the number of rows in this layout. |
int |
getVgap()
Get the vertical gap between components. |
boolean |
isAutoSpacing()
Get if the RowColumnLayout is autoSpacing. |
void |
layoutContainer(java.awt.Container parent)
Layout the components in the specified container. |
java.awt.Dimension |
minimumLayoutSize(java.awt.Container parent)
Returns the minimum dimensions needed to layout the components contained in the specified panel. |
java.awt.Dimension |
preferredLayoutSize(java.awt.Container parent)
Returns the preferred dimensions for this layout given the components in the specified panel. |
void |
removeLayoutComponent(java.awt.Component comp)
Removes the specified component from the layout. |
void |
setAutoSpacing(boolean s)
Set the RowColumnLayout autoSpacing property. |
void |
setColumns(int cols)
Set the number of columns in this layout. |
void |
setFill(int fillFirst)
Set the order the grid gets filled with objects. |
void |
setHgap(int hgap)
Set the horizontal gap between components. |
void |
setRows(int rows)
Set the number of rows in this layout. |
void |
setVgap(int vgap)
Set the vertical gap between components. |
java.lang.String |
toString()
Return the String representation of this RowColumnLayout's values. |
| Constructor Detail |
|---|
public RowColumnLayout()
public RowColumnLayout(int rows,
int cols,
int fill)
rows - the rowscols - the columnsfill - the order to fill the grid: by column or by row.
public RowColumnLayout(int rows,
int cols,
int fill,
int hgap,
int vgap)
rows - the rows; zero means 'any number.'cols - the columns; zero means 'any number.'fill - the order to fill the grid: by column or by row.hgap - the horizontal gap variablevgap - the vertical gap variable
public RowColumnLayout(int rows,
int cols,
int fill,
int hgap,
int vgap,
boolean spacing)
rows - the rows; zero means 'any number of rows'cols - the columns; zero means 'any number of columns'fill - the order to fill the grid: by column or by row.hgap - the horizontal gap variablevgap - the vertical gap variablespacing - the autoSpacing variable| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean isAutoSpacing()
setAutoSpacing(boolean)public void setAutoSpacing(boolean s)
s - if true, autoSpacing is on, otherwise autoSpacing is offisAutoSpacing()public int getRows()
setRows(int)public void setRows(int rows)
rows - number of rows in this layoutgetRows()public int getColumns()
setColumns(int)public void setColumns(int cols)
cols - number of columns in this layoutgetColumns()public int getHgap()
setHgap(int)public void setHgap(int hgap)
hgap - the horizontal gap between componentsgetHgap()public int getVgap()
setVgap(int)public void setVgap(int vgap)
vgap - the vertical gap between componentsgetVgap()public int getFill()
setFill(int)public void setFill(int fillFirst)
fillFirst - if 0 the columns are filled first,
if 1 the rows are filled first.getFill()
public void addLayoutComponent(java.lang.String name,
java.awt.Component comp)
addLayoutComponent in interface java.awt.LayoutManagername - the name of 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 component which needs to be laid outminimumLayoutSize(java.awt.Container)public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
minimumLayoutSize in interface java.awt.LayoutManagerparent - the component which needs to be laid outpreferredLayoutSize(java.awt.Container)public void layoutContainer(java.awt.Container parent)
layoutContainer in interface java.awt.LayoutManagerparent - the specified container 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 | |||||||||||||