|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel acm.gui.TablePanel
public class TablePanel
This class represents a simple JPanel
that uses
TableLayout
as its layout manager.
The purpose of TablePanel
is to support tabular component
structures without the complexity of the GridBagLayout
class.
Field Summary | |
---|---|
int |
BOTH
|
int |
BOTTOM
|
int |
CENTER
|
int |
FILL
|
int |
HORIZONTAL
|
int |
LEFT
|
int |
NONE
|
int |
RIGHT
|
int |
TOP
|
int |
VERTICAL
|
Constructor Summary | |
---|---|
TablePanel(int rows,
int columns)
TablePanel whose layout manager supports the
specified number of rows and columns. |
|
TablePanel(int rows,
int columns,
int hgap,
int vgap)
TablePanel with the specified number
of rows and columns and the supplied values for the horizontal and
vertical gap. |
Method Summary | |
---|---|
int |
getDefaultFill()
|
int |
getHgap()
|
int |
getHorizontalAlignment()
|
int |
getVerticalAlignment()
|
int |
getVgap()
|
void |
setDefaultFill(int fill)
|
void |
setHgap(int pixels)
|
void |
setHorizontalAlignment(int align)
|
void |
setVerticalAlignment(int align)
|
void |
setVgap(int pixels)
|
Field Detail |
---|
public static final int BOTH
public static final int BOTTOM
public static final int CENTER
public static final int FILL
public static final int HORIZONTAL
public static final int LEFT
public static final int NONE
public static final int RIGHT
public static final int TOP
public static final int VERTICAL
Constructor Detail |
---|
public TablePanel(int rows,
int columns)
TablePanel
whose layout manager supports the
specified number of rows and columns.
Usage: | TablePanel panel = new TablePanel(rows, columns); | ||||
Parameters: |
|
public TablePanel(int rows,
int columns,
int hgap,
int vgap)
TablePanel
with the specified number
of rows and columns and the supplied values for the horizontal and
vertical gap.
Usage: | TablePanel panel = new TablePanel(rows, columns, hgap, vgap); | ||||||||
Parameters: |
|
Method Detail |
---|
public int getDefaultFill()
Usage: | fill = layout.getDefaultFill(); |
Returns: | The default fill parameter for components in the table |
public int getHgap()
Returns: | The horizontal gap between components |
public int getHorizontalAlignment()
Usage: | align = layout.getHorizontalAlignment(); |
Returns: | The horizontal alignment for the table |
public int getVerticalAlignment()
Usage: | align = layout.getVerticalAlignment(); |
Returns: | The vertical alignment for the table |
public int getVgap()
Returns: | The vertical gap between components |
public void setDefaultFill(int fill)
NONE
, HORIZONTAL
, VERTICAL
, and
BOTH
.
Usage: | layout.setDefaultFill(fill); | ||
Parameter: |
|
public void setHgap(int pixels)
Parameter: |
|
public void setHorizontalAlignment(int align)
CENTER
, LEFT
, RIGHT
, and
FILL
.
Usage: | layout.setHorizontalAlignment(align); | ||
Parameter: |
|
public void setVerticalAlignment(int align)
CENTER
, TOP
, BOTTOM
, and
FILL
.
Usage: | layout.setVerticalAlignment(align); | ||
Parameter: |
|
public void setVgap(int pixels)
Parameter: |
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |