public class TableLayoutCell
extends Object
Represents a cell in a table layout.
| Constructor and description |
|---|
TableLayoutCell(TableLayoutRow parent)Creates a table cell associated with the supplied row. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
addComponent(Component component)Adds the component rendered by this table cell and registers the cell with its parent row. |
|
protected GridBagConstraints |
createConstraints()Creates the grid bag constraints that represent this cell in the table layout. |
|
protected int |
getAnchor()
|
|
public int |
getColspan()Returns the number of columns spanned by this cell. |
|
public Component |
getComponent()Returns the component currently rendered by this cell. |
|
public GridBagConstraints |
getConstraints()
|
|
public int |
getRowspan()Returns the number of rows spanned by this cell. |
|
public boolean |
isColfill()Returns the colfill. |
|
public boolean |
isRowfill()Returns the rowfill. |
|
public void |
setAlign(String align)Sets the horizontal alignment to a case insensitive value of {LEFT, CENTER, RIGHT} |
|
public void |
setColfill(boolean colfill)Sets whether or not this column should allow its component to stretch to fill the space available |
|
public void |
setColspan(int colspan)Sets the number of columns that this cell should span. |
|
public void |
setRowfill(boolean rowfill)Sets whether or not this row should allow its component to stretch to fill the space available |
|
public void |
setRowspan(int rowspan)Sets the number of rows that this cell should span. |
|
public void |
setValign(String valign)Sets the vertical alignment to a case insensitive value of {TOP, MIDDLE, BOTTOM} |
Logger used to report invalid cell usage.
Creates a table cell associated with the supplied row.
parent - the owning rowAdds the component rendered by this table cell and registers the cell with its parent row.
component - the component to render in the cellCreates the grid bag constraints that represent this cell in the table layout.
Returns the number of columns spanned by this cell.
Returns the component currently rendered by this cell.
null
Returns the number of rows spanned by this cell.
Returns the colfill.
Returns the rowfill.
Sets the horizontal alignment to a case insensitive value of {LEFT, CENTER, RIGHT}
align - one of 'left', 'center', or 'right'Sets whether or not this column should allow its component to stretch to fill the space available
colfill - The default is falseSets the number of columns that this cell should span. The default value is 1
colspan - The default is 1Sets whether or not this row should allow its component to stretch to fill the space available
rowfill - The default is falseSets the number of rows that this cell should span. The default value is 1
rowspan - The default is 1Sets the vertical alignment to a case insensitive value of {TOP, MIDDLE, BOTTOM}
valign - one of 'top', 'middle', 'bottom'Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.