Package ca.phon.ui.layout
Class GridCellLayout
java.lang.Object
ca.phon.ui.layout.GridCellLayout
- All Implemented Interfaces:
LayoutManager
,LayoutManager2
Layout components in a rigid (i.e., non-scaling) grid.
Each component must be added with a
GridCellConstraints
object which identifies the (x + w, y + h) cell
location of the component. Each cell is given equal
size and is square.
NOTE: This layout allows for overlaps.-
Constructor Summary
ConstructorDescriptionGridCellLayout
(int numRows, int numCols) GridCellLayout
(int numRows, int numCols, int cellWidth, int cellHeight) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addLayoutComponent
(Component parent, Object c) void
addLayoutComponent
(String name, Component comp) int
int
float
getLayoutAlignmentX
(Container parent) float
getLayoutAlignmentY
(Container parent) int
int
void
invalidateLayout
(Container parent) void
layoutContainer
(Container parent) maximumLayoutSize
(Container parent) minimumLayoutSize
(Container parent) preferredLayoutSize
(Container parent) void
removeLayoutComponent
(Component parent) void
setCellHeight
(int cellHeight) void
setCellWidth
(int cellWidth) void
setNumCols
(int numCols) void
setNumRows
(int numRows)
-
Constructor Details
-
GridCellLayout
public GridCellLayout(int numRows, int numCols) -
GridCellLayout
public GridCellLayout(int numRows, int numCols, int cellWidth, int cellHeight)
-
-
Method Details
-
addLayoutComponent
- Specified by:
addLayoutComponent
in interfaceLayoutManager
-
layoutContainer
- Specified by:
layoutContainer
in interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSize
in interfaceLayoutManager
-
preferredLayoutSize
- Specified by:
preferredLayoutSize
in interfaceLayoutManager
-
maximumLayoutSize
- Specified by:
maximumLayoutSize
in interfaceLayoutManager2
-
removeLayoutComponent
- Specified by:
removeLayoutComponent
in interfaceLayoutManager
-
addLayoutComponent
- Specified by:
addLayoutComponent
in interfaceLayoutManager2
-
getLayoutAlignmentX
- Specified by:
getLayoutAlignmentX
in interfaceLayoutManager2
-
getLayoutAlignmentY
- Specified by:
getLayoutAlignmentY
in interfaceLayoutManager2
-
invalidateLayout
- Specified by:
invalidateLayout
in interfaceLayoutManager2
-
getNumRows
public int getNumRows() -
setNumRows
public void setNumRows(int numRows) -
getNumCols
public int getNumCols() -
setNumCols
public void setNumCols(int numCols) -
getCellWidth
public int getCellWidth() -
setCellWidth
public void setCellWidth(int cellWidth) -
getCellHeight
public int getCellHeight() -
setCellHeight
public void setCellHeight(int cellHeight)
-