|
|
Package com.dassault_systemes.catjdialog |
Class CATKeyTableModel
|
Class Hierarchy |
java.lang.Object | +-com.dassault_systemes.catjdialog.CATCallbackSource | +-com.dassault_systemes.catjdialog.CATKeyTableModel
Class Location |
Class Description |
public abstract class CATKeyTableModel
The key table model is the interface used to feed a table component with content.
This design allows JDialog to request presentation data only when rendering the tree or table component to the Graphical User Interface (GUI), and to forget it right after that.
Example: a Table with a CATKeyTableModel and a controller listening to cell selection notifications
All Implemented Interfaces: CATRequestListener
Field Summary |
int | ALIGN_LEFT |
int | ALIGN_CENTER |
int | ALIGN_RIGHT |
int | tSTRING |
int | tIMAGE |
int | tCHECK |
int | tLINK |
int | tRADIO |
int | tEDITABLE |
int | tCHECK3STATE |
int | tACTIONLINK |
int | STATE3_UNCHECKED |
int | STATE3_CHECKED |
int | STATE3_UNDEFINED |
int | LINKTARGET_CURRENTFRAME |
int | LINKTARGET_TOPFRAME |
int | LINKTARGET_PARENTFRAME |
int | LINKTARGET_NEWWINDOW |
int | LINKTARGET_NAMEDFRAME |
int | TRUNCATE_CELL_POPUP_POLICY |
int | TRUNCATE_ROW_POPUP_POLICY |
int | WRAP_POLICY |
int | TRUNCATE_USER_POLICY |
Constructor Summary |
CATKeyTableModel() |
Method Summary |
int | getColumnCount() |
String | getColumnTitle(int iColumn) |
int | getColumnWidth(int iColumn) |
boolean | isColumnSortable(int iColumn) |
boolean | isColumnFilterable(int iColumn) |
String | getAdvancedFilterEditor(int iColumn) |
int | getColumnAlignment(int iColumn) |
int | getKeyCount() |
void | getKeys(int iOffset, String[] oKeys) |
int | getType(String iKey, int iColumn) |
String | getCell(String iKey, int iColumn) |
int | getLevel(String iKey, int iColumn) |
boolean | getEnable(String iKey, int iColumn) |
boolean | getState(String iKey, int iColumn) |
int | get3State(String iKey, int iColumn) |
String | getImage(String iKey, int iColumn) |
String | getTooltip(String iKey, int iColumn) |
String | getImageTooltip(String iKey, int iColumn) |
String | getLink(String iKey, int iColumn) |
int | getLinkTarget(String iKey, int iCol) |
String | getLinkTargetFrame(String iKey, int iCol) |
void | setCell(String iKey, int iCol, String iText) |
void | refreshContent() |
String | getTablePrefsRepository(CATTable iTable) |
int | getCellTruncatePolicy(CATTable iTable) |
void | giveDisplayedColumns(CATTable iTable, int[] iColumns) |
boolean | isListExportable() |
Field Detail |
int ALIGN_LEFTColumn alignment: left
int ALIGN_CENTERColumn alignment: center
int ALIGN_RIGHTColumn alignment: right
int tSTRINGcell type: simple text
int tIMAGEcell type: has an image
int tCHECKcell type: has a checkbox
int tLINKcell type: is an external link (web link to an outer URL)
int tRADIOcell type: has a radio-button
int tEDITABLEcell type: is editable
int tCHECK3STATEcell type: has a 3 states checkbox
int tACTIONLINKcell type: is an action link (that is an internal link)
int STATE3_UNCHECKEDtCHECK3STATE cell state: unchecked
int STATE3_CHECKEDtCHECK3STATE cell state: checked
int STATE3_UNDEFINEDtCHECK3STATE cell state: undefined
int LINKTARGET_CURRENTFRAMELink Target: opens the link in the current frame
int LINKTARGET_TOPFRAMELink Target: opens the link in the top frame
int LINKTARGET_PARENTFRAMELink Target: opens the link in the parent frame
int LINKTARGET_NEWWINDOWLink Target: opens the link in a new window
int LINKTARGET_NAMEDFRAMELink Target: opens the link in a window with a named specified by getLinkTargetFrame()
int TRUNCATE_CELL_POPUP_POLICYCell Truncate Policy: truncate cell (add '...') and show full cell text into a popup
int TRUNCATE_ROW_POPUP_POLICYCell Truncate Policy: truncate cell (add '...') and show full row text into a popup
int WRAP_POLICYCell Truncate Policy: wrap cell text if wider than defined
int TRUNCATE_USER_POLICYCell Truncate Policy: use user preference
Constructor Detail |
CATKeyTableModel()
Method Detail |
int getColumnCount()Returns the number of columns the table should display.
String getColumnTitle(int iColumn)Returns a column title.
iColumn
int getColumnWidth(int iColumn)Returns the column width (in characters).
A negative value means a fixed width column,
A null value means unconstained column width
A positive value means minimum column width, assuming it will spread on extra space (divided evenly among all positive width columns).
Default value is 0 (unconstained column width).
Every non-null value will cause wide cells to be "truncated". The truncate behavior is defined by getCellTruncatePolicy().
iColumn
boolean isColumnSortable(int iColumn)Determines whether the specified column is sortable or not. Default is false (not sortable).
Defining a column as sortale will display sort button in the column title, and will have the table component manage the sort requests from the user.
iColumn
true
if the column is sortable, false
otherwise.boolean isColumnFilterable(int iColumn)Determines whether if this column is filterable or not.
Defining a column as filterable will display a filter button in the column title, and will have the table component manage the filter requests from the user.
iColumn
true
if the column is filterable, false
otherwise.String getAdvancedFilterEditor(int iColumn)Returns the Advanced filter editor for the given column.
This method only applies to filterable columns. It returns the advanced editor command name (may be null). A null value unsets the advanced editor (filter is only editable through a basic textfield). A non-null value shows an "advanced filter" button that launches the given JDialog command when pressed.
iColumn
int getColumnAlignment(int iColumn)Returns the alignment type for the specified column (default is ALIGN_LEFT).
This parameter aligns text in the column.
iColumn
int getKeyCount()Returns the total number of keys (each key is displayed in a table row).
void getKeys(int iOffset, String[] oKeys)To get a bunch of keys starting from an offset.
The table component only displays a slice of data. This method retreives only a slice.
iOffset
oKeys
int getType(String iKey, int iColumn)Returns the type of the specified cell. Default is tSTRING (simple text cell).
iKey
iColumn
String getCell(String iKey, int iColumn)Returns the text label of the specified cell.
This method is called for every cell type.
iKey
iColumn
int getLevel(String iKey, int iColumn)Returns the text level of the specified cell (default level is 0).
This method is called for every cell type.
iKey
iColumn
boolean getEnable(String iKey, int iColumn)Determines whether the specified cell is enabled or not (default is true).
This method is called for tCHECK, tRADIO, tLINK and tACTIONLINK cell types.
iKey
iColumn
boolean getState(String iKey, int iColumn)Returns the check/radio state of the specified cell (default state is false).
This method is called for tCHECK and tRADIO cell types.
iKey
iColumn
int get3State(String iKey, int iColumn)Returns the state of the specified 3 state checkbox cell (default state is STATE3_UNCHECKED).
This method is called for tCHECK3STATE cell types.
iKey
iColumn
String getImage(String iKey, int iColumn)Returns the image URL of the specified cell (default is null).
This method is called for tIMAGE cell types.
iKey
iColumn
resources/graphic
directory of the runtime view, or an absolute URL to the image.String getTooltip(String iKey, int iColumn)Returns the tooltip of the image of the specified cell (default is null).
This method is called for tIMAGE cell types.
iKey
iColumn
String getImageTooltip(String iKey, int iColumn)Return the image tooltip of the specified cell (default is null).
This method is called for tIMAGE cell types.
iKey
iColumn
String getLink(String iKey, int iColumn)Returns the web link URL of the specified cell (default is null).
This method is called for tLINK cell types.
iKey
iColumn
int getLinkTarget(String iKey, int iCol)Returns the link target window of the specified cell (default is LINKTARGET_CURRENTFRAME).
This method is called for tLINK cell types, and defines the link target window.
iKey
iColumn
String getLinkTargetFrame(String iKey, int iCol)Returns the link target window name of the specified cell (default is LINKTARGET_CURRENTFRAME).
This method is called for tLINK cell types, that declared a link target LINKTARGET_NAMEDFRAME.
iKey
iColumn
void setCell(String iKey, int iCol, String iText)Warns the table model that the specified cell was edited.
This method is called for tEDITABLE cell types, when the user edits its value.
Override this method to handle cell editions at the table model level.
Overwise you can handle it though the CATTable 'CellChanged' Notification.
iKey
iColumn
iText
void refreshContent()Call this method to request a refresh of the display because the content of the list has changed.
String getTablePrefsRepository(CATTable iTable)Returns the repository name for the table preferences (default is null).
When returning a non-null repository name for the table activates a "preferences" link
that gives access to customization: reordering, showing/hiding columns and modifying their width.
Possible formats for preferences repository names are:
iTable
int getCellTruncatePolicy(CATTable iTable)Returns the cell truncate policy to apply to the specified table. Default value is TRUNCATE_USER_POLICY.
This setting has an effect only in non-null sized columns.
iTable
void giveDisplayedColumns(CATTable iTable, int[] iColumns)Performance optimization call.
This method is called once per request before rendering the table.
It passes to the model the displayed columns, so that the database query may be optimized.
This method is called before getKeys().
iTable
iColumns
boolean isListExportable()Determines whether the table content should be exportable (to an Excel spreadsheet). Default is false.
Override this method to add an "export" link in the table that will automatically manage the export to a spreadsheet file.
true
if this table should an "export" link; false
otherwise.