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
ConstructorsConstructorDescriptionGridCellLayout(int numRows, int numCols) GridCellLayout(int numRows, int numCols, int cellWidth, int cellHeight) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayoutComponent(Component parent, Object c) voidaddLayoutComponent(String name, Component comp) intintfloatgetLayoutAlignmentX(Container parent) floatgetLayoutAlignmentY(Container parent) intintvoidinvalidateLayout(Container parent) voidlayoutContainer(Container parent) maximumLayoutSize(Container parent) minimumLayoutSize(Container parent) preferredLayoutSize(Container parent) voidremoveLayoutComponent(Component parent) voidsetCellHeight(int cellHeight) voidsetCellWidth(int cellWidth) voidsetNumCols(int numCols) voidsetNumRows(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:
addLayoutComponentin interfaceLayoutManager
-
layoutContainer
- Specified by:
layoutContainerin interfaceLayoutManager
-
minimumLayoutSize
- Specified by:
minimumLayoutSizein interfaceLayoutManager
-
preferredLayoutSize
- Specified by:
preferredLayoutSizein interfaceLayoutManager
-
maximumLayoutSize
- Specified by:
maximumLayoutSizein interfaceLayoutManager2
-
removeLayoutComponent
- Specified by:
removeLayoutComponentin interfaceLayoutManager
-
addLayoutComponent
- Specified by:
addLayoutComponentin interfaceLayoutManager2
-
getLayoutAlignmentX
- Specified by:
getLayoutAlignmentXin interfaceLayoutManager2
-
getLayoutAlignmentY
- Specified by:
getLayoutAlignmentYin interfaceLayoutManager2
-
invalidateLayout
- Specified by:
invalidateLayoutin 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)
-