|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.GObject
org.gnu.gtk.GtkObject
org.gnu.gtk.Widget
org.gnu.gtk.Container
org.gnu.gtk.Table
A container that creates a grid of flexible static rectangles that you can use to position and size widgets.
The table cells are referenced by rows and columns. The top left of the table is row 0, column 0.
Field Summary |
Fields inherited from class org.gnu.glib.GObject |
eventsInitialized |
Constructor Summary | |
Table(Handle handle)
Construct a new Table from a handle to a native resource. |
|
Table(int rows,
int columns,
boolean homogenous)
Constructs a new table widget. |
Method Summary | |
void |
attach(Widget child,
int leftAttach,
int rightAttach,
int topAttach,
int bottomAttach)
Attaches a child widget to a position in the table. |
void |
attach(Widget child,
int leftAttach,
int rightAttach,
int topAttach,
int bottomAttach,
AttachOptions xOptions,
AttachOptions yOptions,
int xPadding,
int yPadding)
Attaches a child widget to a position in the table |
int |
getColumnSpacing(int column)
Gets the amount of space between column column , and column
column + 1 . |
int |
getDefaultColumnSpacing()
returns the default spacing between columns. |
int |
getDefaultRowSpacing()
returns the default spacing between rows. |
boolean |
getHomogeneous()
Returns whether the table cells are all constrained to the same width and height |
int |
getRowSpacing(int row)
Gets the amount of space between row row , and row
row + 1 . |
static Type |
getType()
Retrieve the runtime type used by the GLib library. |
protected static void |
gtk_table_attach_defaults(Handle table,
Handle child,
int leftAttach,
int rightAttach,
int topAttach,
int bottomAttach)
|
protected static void |
gtk_table_attach(Handle table,
Handle child,
int leftAttach,
int rightAttach,
int topAttach,
int bottomAttach,
int xoptions,
int yoptions,
int xpadding,
int ypadding)
|
protected static int |
gtk_table_get_col_spacing(Handle table,
int column)
|
protected static int |
gtk_table_get_default_col_spacing(Handle table)
|
protected static int |
gtk_table_get_default_row_spacing(Handle table)
|
protected static boolean |
gtk_table_get_homogeneous(Handle table)
|
protected static int |
gtk_table_get_row_spacing(Handle table,
int row)
|
protected static int |
gtk_table_get_type()
|
protected static Handle |
gtk_table_new(int rows,
int columns,
boolean homogenous)
|
protected static void |
gtk_table_resize(Handle table,
int rows,
int cols)
|
protected static void |
gtk_table_set_col_spacing(Handle table,
int column,
int spacing)
|
protected static void |
gtk_table_set_col_spacings(Handle table,
int spacing)
|
protected static void |
gtk_table_set_homogeneous(Handle table,
boolean homogeneous)
|
protected static void |
gtk_table_set_row_spacing(Handle table,
int row,
int spacing)
|
protected static void |
gtk_table_set_row_spacings(Handle table,
int spacing)
|
void |
resize(int rows,
int columns)
Changes the size of the table after it has been created. |
void |
setColumnSpacing(int spacing)
Sets the space between every column in the table. |
void |
setColumnSpacing(int column,
int spacing)
Changes the space between a given table column and its surrounding columns. |
void |
setHomogeneous(boolean homogeneous)
Changes the homogenous property of table cells (ie whether all cells are an equal size or not). |
void |
setRowSpacing(int spacing)
Sets the space between every row in the table. |
void |
setRowSpacing(int row,
int spacing)
Changes the space between a given table row and its surrounding rows. |
Methods inherited from class org.gnu.gtk.GtkObject |
getFlags, gtk_object_destroy, gtk_object_get_type, gtk_object_sink, setFlags, sink |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Table(int rows, int columns, boolean homogenous)
rows
- The initial number of rows in the tablecolumns
- The initial number of columns for the tablehomogenous
- If set to TRUE, all table cells are resized to
the size of the cell containing the largest widget.public Table(Handle handle)
Method Detail |
public void resize(int rows, int columns)
public void attach(Widget child, int leftAttach, int rightAttach, int topAttach, int bottomAttach, AttachOptions xOptions, AttachOptions yOptions, int xPadding, int yPadding)
child
- The widget to add.leftAttach
- The column number to attach the left side of a child
widget to.rightAttach
- The column number to attach the right side of a
child widget to.topAttach
- The row number to attach the top of a child
widget to.bottomAttach
- The row number to attach the bottom of a
child widget to.xOptions
- Used to specify the properties of the child widget
when the table is resized.yOptions
- The same as xOptions, except this field determines
behaviour of vertical resizing.xPadding
- An integer value specifying the padding on the left
and right of the widget being added to the table.yPadding
- The amount of padding above and below the child widget.public void attach(Widget child, int leftAttach, int rightAttach, int topAttach, int bottomAttach)
child
- The widget to add.leftAttach
- The column number to attach the left side of a child
widget to.rightAttach
- The column number to attach the right side of a
child widget to.topAttach
- The row number to attach the top of a child
widget to.bottomAttach
- The row number to attach the bottom of a
child widget to.public void setColumnSpacing(int column, int spacing)
column
- Column number whose spacing will be changed.spacing
- Number of pixels that the spacing should take up.public void setRowSpacing(int row, int spacing)
row
- Row number whose spacing will be changed.spacing
- Number of pixels that the spacing should take up.public int getRowSpacing(int row)
row
, and row
row + 1
.
row
- A row in the table, 0 indicates the first row.public int getColumnSpacing(int column)
column
, and column
column + 1
.
column
- A row in the table, 0 indicates the first row.public int getDefaultRowSpacing()
setRowSpacings
, which changes the spacing of
all cells, regardless of whether they have been set
independently.
setRowSpacing(int, int)
public int getDefaultColumnSpacing()
setColumnSpacings
, which changes the spacing of
all cells, regardless of whether they have been set
independently.
setColumnSpacing(int, int)
public void setRowSpacing(int spacing)
spacing
- The number of pixels of space to place between every row in
the table.public void setColumnSpacing(int spacing)
spacing
- The number of pixels of space to place between every column in
the table.public void setHomogeneous(boolean homogeneous)
homogeneous
- Set to TRUE to ensure all table cells are
the same size. Set to FALSE if this is not your desired
behaviour.public boolean getHomogeneous()
setHomogeneous(boolean)
public static Type getType()
protected static final int gtk_table_get_type()
protected static final Handle gtk_table_new(int rows, int columns, boolean homogenous)
protected static final void gtk_table_resize(Handle table, int rows, int cols)
protected static final void gtk_table_attach(Handle table, Handle child, int leftAttach, int rightAttach, int topAttach, int bottomAttach, int xoptions, int yoptions, int xpadding, int ypadding)
protected static final void gtk_table_attach_defaults(Handle table, Handle child, int leftAttach, int rightAttach, int topAttach, int bottomAttach)
protected static final void gtk_table_set_row_spacing(Handle table, int row, int spacing)
protected static final int gtk_table_get_row_spacing(Handle table, int row)
protected static final void gtk_table_set_col_spacing(Handle table, int column, int spacing)
protected static final int gtk_table_get_col_spacing(Handle table, int column)
protected static final void gtk_table_set_row_spacings(Handle table, int spacing)
protected static final int gtk_table_get_default_row_spacing(Handle table)
protected static final void gtk_table_set_col_spacings(Handle table, int spacing)
protected static final int gtk_table_get_default_col_spacing(Handle table)
protected static final void gtk_table_set_homogeneous(Handle table, boolean homogeneous)
protected static final boolean gtk_table_get_homogeneous(Handle table)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |