|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.kupzog.ktable.KTableDefaultModel
de.kupzog.examples.TextModelExample
public class TextModelExample
Constructor Summary | |
---|---|
TextModelExample()
Initialize the base implementation. |
Method Summary | |
---|---|
org.eclipse.swt.graphics.Point |
doBelongsToCell(int col,
int row)
Return (0,0) if cell should stay in its own area, or return the cell that should overlap this cell. |
KTableCellEditor |
doGetCellEditor(int col,
int row)
Returns the celleditor for the given table cell. |
KTableCellRenderer |
doGetCellRenderer(int col,
int row)
Called to retrieve the cell renderer for a given cell. |
int |
doGetColumnCount()
This function tells the KTable how many columns have to be displayed. |
java.lang.Object |
doGetContentAt(int col,
int row)
Returns the content at the given cell. |
int |
doGetRowCount()
This function tells the KTable how many rows have to be displayed. |
void |
doSetContentAt(int col,
int row,
java.lang.Object value)
Called to change the cell value in the model. |
int |
getFixedHeaderColumnCount()
This function tells the KTable how many columns form the "column header". |
int |
getFixedHeaderRowCount()
This function tells the KTable how many rows form the "row header". |
int |
getFixedSelectableColumnCount()
This functon tells the KTable how many columns form a fixed region that is not scrolled. |
int |
getFixedSelectableRowCount()
This functon tells the KTable how many rows form a fixed region that is not scrolled. |
int |
getInitialColumnWidth(int column)
Returns the initial column width for the column index given. |
int |
getInitialRowHeight(int row)
|
int |
getRowHeightMinimum()
This function should return the minimum height of the rows. |
boolean |
isColumnResizable(int col)
This function should return true if the user should be allowed to resize the given column. |
boolean |
isRowResizable(int row)
This function should return true if the user should be allowed to resize the rows. |
Methods inherited from class de.kupzog.ktable.KTableDefaultModel |
---|
belongsToCell, doGetTooltipAt, getCellEditor, getCellRenderer, getColumnCount, getColumnWidth, getContentAt, getFirstRowHeight, getFixedColumnCount, getFixedRowCount, getInitialFirstRowHeight, getRowCount, getRowHeight, getTooltipAt, initialize, isFixedCell, isHeaderCell, mapRowIndexToModel, mapRowIndexToTable, setColumnWidth, setContentAt, setFirstRowHeight, setRowHeight |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextModelExample()
Method Detail |
---|
public java.lang.Object doGetContentAt(int col, int row)
KTableDefaultModel
doGetContentAt
in class KTableDefaultModel
col
- The column index.row
- The row index.
public KTableCellEditor doGetCellEditor(int col, int row)
KTableDefaultModel
doGetCellEditor
in class KTableDefaultModel
col
- The column index.row
- The row index.
null
if none.public void doSetContentAt(int col, int row, java.lang.Object value)
KTableDefaultModel
doSetContentAt
in class KTableDefaultModel
col
- The column indexrow
- The row indexvalue
- The new value to set in the model.public int doGetRowCount()
KTableDefaultModel
KTable counts header rows as normal rows, so the number of header rows has to be added to the number of data rows. The function must at least return the number of fixed (header + selectable) rows.
doGetRowCount
in class KTableDefaultModel
public int getFixedHeaderRowCount()
KTableModel
These rows are always displayed and not scrolled. Note that the total number of fixed columns is the sum of header and selectable fixed columns.
public int doGetColumnCount()
KTableDefaultModel
It must at least return the number of fixed and fixed selectable Columns.
So the easiest way is to return the number of normal columns and add the
value of getFixedColumnCount()
.
doGetColumnCount
in class KTableDefaultModel
public int getFixedHeaderColumnCount()
KTableModel
public int getFixedSelectableRowCount()
KTableModel
public int getFixedSelectableColumnCount()
KTableModel
public boolean isColumnResizable(int col)
KTableModel
col
- The column index
public boolean isRowResizable(int row)
KTableModel
public int getRowHeightMinimum()
KTableModel
public KTableCellRenderer doGetCellRenderer(int col, int row)
KTableDefaultModel
doGetCellRenderer
in class KTableDefaultModel
col
- the column indexrow
- The row index
public org.eclipse.swt.graphics.Point doBelongsToCell(int col, int row)
KTableDefaultModel
Defaults to no spanning.
doBelongsToCell
in class KTableDefaultModel
KTableModel.belongsToCell(int, int).
public int getInitialColumnWidth(int column)
KTableDefaultModel
getColumnWidth()
corresponds
to the real width used when painting the table!
getInitialColumnWidth
in class KTableDefaultModel
column
- The column index
public int getInitialRowHeight(int row)
getInitialRowHeight
in class KTableDefaultModel
row
- The row index.
getRowHeight(int)
might not
always be this value!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |