public static class LayoutConstraints.GridLayoutConstraints extends LayoutConstraints
LayoutConstraints.ConstraintType, LayoutConstraints.GridLayoutConstraints, LayoutConstraints.NoneLayoutConstraints
Modifier and Type | Method and Description |
---|---|
void |
_setColumnRight(int column,
double x)
Sets the x coordinate of the right column border.
|
void |
_setRowBottom(int row,
double y)
Sets the y coordinate of the bottom row border.
|
void |
addColumns(int count)
Adds new columns to the right of the last column.
|
void |
addRows(int count)
Adds new rows to the bottom of the last row.
|
java.util.ArrayList<Element> |
getCellElements(java.lang.Integer row,
java.lang.Integer column)
Returns a list of elements belonging to the specified cell.
|
java.lang.Integer |
getColumn(Element elem)
Returns the column number of the given element, or
null if none. |
double |
getColumnBorderSpacing(int column)
Gets the spacing of the right border of the given column.
|
int |
getColumnCount()
Returns the number of columns in this grid.
|
java.util.ArrayList<Element> |
getColumnElements(java.lang.Integer column)
Returns a list of elements belonging to the specified column.
|
double |
getColumnLeft(int column)
Gets the left coordinate of the column.
|
double |
getColumnMinWidth(int column)
Gets the minimum width of the given column.
|
double |
getColumnRight(int column)
Gets the right coordinate of the column.
|
double |
getColumnWidth(int column)
Returns the current width of the given column.
|
double |
getDefaultColumnSpacing()
Gets the default spacing for column borders, used when creating new columns.
|
double |
getDefaultColumnWidth()
Returns the default column width used for new columns and when resetting column widths.
|
double |
getDefaultRowHeight()
Returns the default row height used for new rows and when resetting row heights.
|
double |
getDefaultRowSpacing()
Gets the default spacing for row borders, used when creating new rows.
|
java.lang.Integer |
getRow(Element elem)
Returns the row number of the given element, or
null if none. |
double |
getRowBorderSpacing(int row)
Gets the spacing of the bottom border of the given row.
|
double |
getRowBottom(int row)
Gets the bottom coordinate of the row.
|
int |
getRowCount()
Returns the number of rows in this grid.
|
java.util.ArrayList<Element> |
getRowElements(java.lang.Integer row)
Returns a list of elements belonging to the specified row.
|
double |
getRowHeight(int row)
Gets the current height of the given row.
|
double |
getRowMinHeight(int row)
Gets the minimum height of the given row.
|
double |
getRowTop(int row)
Gets the top coordinate of the row.
|
LayoutConstraints.ConstraintType |
getType()
Returns this layout's type.
|
void |
mergeColumns(int first,
int last)
Merges consecutive grid columns from
first to last , inclusive, into a
single column by erasing intermediate grid constraint lines. |
void |
mergeRows(int first,
int last)
Merges consecutive grid rows from
first to last , inclusive, into a single
row by erasing intermediate grid constraint lines. |
void |
resetColumnSpacings()
Resets the spacing of every column border to the current default value.
|
void |
resetColumnWidths()
Resets the minimum width of all columns to the current default column width.
|
void |
resetRowHeights()
Resets the minimum height of all rows to the current default row height.
|
void |
resetRowSpacings()
Resets the spacing of every row border to the current default value.
|
void |
setCell(Element elem,
java.lang.Integer row,
java.lang.Integer column)
Sets the cell of the element.
|
void |
setColumn(Element elem,
java.lang.Integer column)
Sets the column of the element.
|
void |
setColumnBorderSpacing(int column,
double spacing)
Sets the spacing of the right border of the given column.
|
void |
setColumnLeft(int column,
double x)
Sets the left coordinate of the column.
|
void |
setColumnMinWidth(int column,
double width)
Sets the minimum width of the column.
|
void |
setColumnRight(int column,
double x)
Sets the right coordinate of the column.
|
void |
setDefaultColumnSpacing(double spacing)
Sets the default spacing for column borders, used when creating new columns.
|
void |
setDefaultColumnWidth(double width)
Sets the new default column width used for new columns and when resetting column widths.
|
void |
setDefaultRowHeight(double height)
Sets the new default row height used for new rows and when resetting row heights.
|
void |
setDefaultRowSpacing(double spacing)
Sets the default spacing for row borders, used when creating new row.
|
void |
setRow(Element elem,
java.lang.Integer row)
Sets the row of the element.
|
void |
setRowBorderSpacing(int row,
double spacing)
Sets the spacing of the bottom border of the given row.
|
void |
setRowBottom(int row,
double y)
Sets the bottom coordinate of the row.
|
void |
setRowMinHeight(int row,
double height)
Sets the minimum height of the row.
|
void |
setRowTop(int row,
double y)
Sets the top coordinate of the row.
|
public java.lang.Integer getColumn(Element elem)
null
if none. Column numbers
are 1-based.elem
- the element whose column to get.null
if none.public java.lang.Integer getRow(Element elem)
null
if none. Row numbers are
1-based.elem
- the element whose row number to get.null
if none.public void setColumn(Element elem, java.lang.Integer column)
elem
- the element whose column to setcolumn
- the new column number of the element, can be null
public void setRow(Element elem, java.lang.Integer row)
elem
- the element whose row to setrow
- the new row number of the element, can be null
public void setCell(Element elem, java.lang.Integer row, java.lang.Integer column)
elem
- the element whose cell to setrow
- the new row of the element, can be null
column
- the new column of the element, can be null
public void addColumns(int count)
count
- the number of the columns to addpublic void addRows(int count)
count
- the number of the rows to addpublic void setDefaultColumnWidth(double width)
width
- the new default column widthpublic void setDefaultRowHeight(double height)
height
- the new default row heightpublic double getDefaultColumnWidth()
public double getDefaultRowHeight()
public void resetColumnWidths()
public void resetRowHeights()
public void setColumnBorderSpacing(int column, double spacing)
column
- the column whose right border's spacing to set.spacing
- the new spacing of the borderpublic void setRowBorderSpacing(int row, double spacing)
row
- the row whose bottom border's spacing to set.spacing
- the new spacing of the borderpublic double getColumnBorderSpacing(int column)
column
- the column whose right border's spacing to get.public double getRowBorderSpacing(int row)
row
- the row whose bottom borders spacing to get.public void setDefaultColumnSpacing(double spacing)
spacing
- the new default column border spacing.public void setDefaultRowSpacing(double spacing)
spacing
- the new default row border spacing.public double getDefaultColumnSpacing()
public double getDefaultRowSpacing()
public void resetColumnSpacings()
public void resetRowSpacings()
public void mergeColumns(int first, int last)
first
to last
, inclusive, into a
single column by erasing intermediate grid constraint lines. The columns are renumbered
automatically.first
- the index of the first column to mergelast
- the index of the last column to mergepublic void mergeRows(int first, int last)
first
to last
, inclusive, into a single
row by erasing intermediate grid constraint lines. The rows are renumbered automatically.first
- the index of the first row to mergelast
- the index of the last row to mergepublic java.util.ArrayList<Element> getCellElements(java.lang.Integer row, java.lang.Integer column)
row
- the row of the cellcolumn
- the column of the cellpublic java.util.ArrayList<Element> getRowElements(java.lang.Integer row)
row
- the row whose elements to getpublic java.util.ArrayList<Element> getColumnElements(java.lang.Integer column)
column
- the column whose elements to getpublic int getColumnCount()
public int getRowCount()
public double getColumnLeft(int column)
column
- the column whose coordinate to getpublic double getColumnRight(int column)
column
- the column whose coordinate to getpublic double getRowTop(int row)
row
- the row whose coordinate to getpublic double getRowBottom(int row)
row
- the row whose coordinate to getpublic void setColumnLeft(int column, double x)
column
- the column to set left coordinate tox
- the abscissa of the new column leftpublic void setColumnRight(int column, double x)
column
- the column to set right coordinate tox
- the abscissa of the new column rightpublic void setRowTop(int row, double y)
row
- the row to set top coordinate toy
- the ordinate of the new row toppublic void setRowBottom(int row, double y)
row
- the row to set bottom coordinate toy
- the ordinate of the new row bottompublic void _setColumnRight(int column, double x)
column
- the column whose right border to changex
- the new abscissa of the borderpublic void _setRowBottom(int row, double y)
row
- the row whose bottom border to changey
- the new ordinate of the borderpublic void setColumnMinWidth(int column, double width)
column
- the column whose minimum width to setwidth
- the new minimum width of the columnpublic void setRowMinHeight(int row, double height)
row
- the row whose height to setheight
- the new minimum height of the rowpublic double getColumnMinWidth(int column)
column
- the column whose minimum width to getpublic double getRowMinHeight(int row)
row
- the row whose minimum height to getpublic double getRowHeight(int row)
row
- the row whose height to getpublic double getColumnWidth(int column)
column
- the column whose width to getpublic LayoutConstraints.ConstraintType getType()
LayoutConstraints
getType
in class LayoutConstraints