In a Java-client table, there are two main mechanisms for sizing rows and columns. The table can automatically determine an appropriate size for a cell, or you can set sizes explicitly. End users can drag the boundaries of cells to resize rows and columns as well, to set the sizes explicitly.
The table uses default sizes for columns and rows, and it also automatically sizes columns and rows for you. It bases automatic sizes on the data in the cell, the size of the font in which the data is displayed, whether word wrapping is enabled for the cell, and so on. Each time new data is displayed in the table, cells are automatically resized, for better readability. As the sizes of columns and rows change, the table changes the default sizes as necessary.
You can set properties of the table to specify what the table should automatically
resize and how it should determine sizes. The following table lists properties
that affect automatic sizing in a table, with a description of each. These properties
are defined in the oracle.dss.gridView.GridView
class.
Property |
Description |
---|---|
|
Tells the table what to autofit, such as row heights, column widths, column widths in the row headers, row heights in the column headers, and so on. |
|
Tells the table how many rows to consider when it calculates an autofit size; the default value is 20 |
AutoFitColumnCount | Tells the crosstab how many columns to consider when it calculates an autofit size; the default value is 20 |
For finer control over autofitting, you can implement callbacks and register
them with the table. To have the table consider a particular set of rows, create
and register an AutoFitRowRangeCallback
. To have the table consider
a particular set of columns, create and register an AutoFitColumnRangeCallback
.
By default, users can change the size of columns in the databody. They cannot change row height in the table. The following table lists properties, with their descriptions, that allow you to control what users can resize by dragging borders with the mouse.
Property |
Description |
---|---|
|
Specifies whether users can manually change the height of the rows in the databody |
|
Specifies whether users can manually change the width of the rows in the databody |
The following table lists table properties, with their descriptions, that specify manually set sizes for cells. When users drag cell boundaries to resize parts of a table, these properties are automatically set.
Sizing property |
Description |
---|---|
|
The width of a column in the databody |
|
The height of a row in the databody |