|
|
Package com.dassault_systemes.catjdialog |
Class CATTable
|
Class Hierarchy |
java.lang.Object | +-com.dassault_systemes.catjdialog.CATCallbackSource | +-com.dassault_systemes.catjdialog.CATDialog | +-com.dassault_systemes.catjdialog.CATTable
Class Location |
Class Description |
public class CATTable
The table graphical component.
All Implemented Interfaces: CATIMenuProvider CATIMenuFirer
Field Summary |
int | CELL_SELECTION_MODE |
int | LINE_SELECTION_MODE |
int | NO_SELECTION_MODE |
Constructor Summary |
CATTable(CATDialog iDialog, String iName) |
Method Summary |
Field Detail |
int CELL_SELECTION_MODESelection Mode: Cell
int LINE_SELECTION_MODESelection Mode: Row
int NO_SELECTION_MODESelection Mode: None
Constructor Detail |
CATTable(CATDialog iDialog, String iName)Creates a table with the specified parent and name.
iParent
iName
Method Detail |
void setKeyModel(CATKeyTableModel iModel)Sets the key table model (a null value unsets the table model).
The table model is in charge of feeding the table with presentation data.
When no table model is defined (the default case), the table is not displayed.
iModel
void setModelURL(String iModelURL)Sets the key table model URL.
The expected format is: <model classname>@<arg1>,<arg2>,...
<model classname>
must have a constructor with the following signature:
void <Constructor>(CATDialog iDialog, String[] iArgs)
Note: This method allows to set the table key model inline in the XMLDlg file.
Example: <Table Name="mytable" ModelURL="com.mypackage.MyTableKeyModel@myarg"...
iModelURL
String getModelURL()Returns the key table model URL (if any).
CATKeyTableModel getKeyModel()Returns the key table model (may be null).
void setLineGroup(int iGroup)Sets the line groups size (to visually group a set of lines). Default is 1.
iGroup
int getLineGroup()Returns the line groups size (used to visually group a set of lines).
void setMinWidth(int iMinWidth)Sets the table minimum width (in characters). Default min width is 12.
This is used to ensure a minimum width to the table component.
iMinWidth
int getMinWidth()Returns the table minimum width (in characters).
int getFirstLine()Returns the first line to be displayed.
void setFirstLine(int iFirstLine)Sets the first line to be displayed.
iFirstLine
int getHeight()Returns the maximum number of lines to display.
The table component splits content data into slices, and provides
previous/next buttons to navigate across data slices.
The user might override this value if the table allows customization (see CATKeyTableModel.getTablePrefsRepository())
void setHeight(int iHeight)Sets the maximum number of lines the table can display. Default is 12.
iHeight
boolean hasMenu()Determines whether this table has a contextual menu.
This checks that the table model is of type CATKeyTableModelCtxMenuEx
true
if this table has a menu, false
otherwise.CATMenuModel getMenu(Object iContext)Returns the menu model defining the table contextual menu (may be null).
Invokes the menu from the table model (CATKeyTableModelCtxMenuEx.getContextualMenu())
iContext
CATMenuModel getToolbar()Returns the menu model defining the table toolbar content.
null
value means "no toolbar".void setToolbar(CATMenuModel iToolbar)Sets the menu model defining the table toolbar content.
iToolbar
null
value unsets the toolbar.int getSelectionMode()Returns the selection mode (default is CELL_SELECTION_MODE).
void setSelectionMode(int iSelect)Sets the selection mode.
Note:
iSelect
void setMultipleSelection(boolean iMultiple)Enables/disables multipe selection.
iMultiple
true
to enable multiple selection, false
to have only single selection.boolean getMultipleSelection()Determines whether multiple selection is allowed or not.
true
means multiple selection is enable, false
means only single selection.CATCellSelection getSelection()Returns the current selected cell.
This method is reserved for CELL_SELECTION_MODE with single selection.
void setSelection(CATCellSelection iSelection)Sets the current selected cell.
This method is reserved for CELL_SELECTION_MODE with single selection.
iSelection
String[] getSelectedKeys()Returns the selected rows keys.
This method is reserved for LINE_SELECTION_MODE with multiple selection.
null
value means "empty selection".void setSelectedKeys(String[] iSelection)Sets selected rows from their keys.
This method is reserved for LINE_SELECTION_MODE with multiple selection.
iSelection
null
value empties the selection.boolean isKeySelected(String iKey)Determines whether the row is selected or not (from its key).
This method is reserved for LINE_SELECTION_MODE (single and multiple selection)).
iKey
true
if the row is selected, false
otherwise.CATColumnSort[] getSortHistory()Returns the sort history (may be null).
The first CATColumnSort object is the most recent sort request. The last one is the oldest.
The sort history may be null if no sort request was made by the user yet.
CATColumnSort getLastSort()Returns the most recent sort (if any).
String getFilter(int iColumn)Returns the filter string associated to the given column.
iColumn
void resetFilters()Unsets all filter values.
CATTable advEditorGetTable(CATDialog iFrom)This is a helper method that allows Advanced Filter Editors to retrieve the related CATTable component.
iFrom
int advEditorGetColumn(CATDialog iFrom)This is a helper method that allows Advanced Filter Editors to retrieve the related table column.
iFrom
String advEditorGetCurFilterValue(CATDialog iFrom)This is a helper method that allows Advanced Filter Editors to retrieve the filter value.
iFrom
void advEditorSetFilterValue(CATDialog iFrom, String iFilter)This is a helper method that allows Advanced Filter Editors to set a new filter value when the user is done with edition.
iFrom
iFilter
void sort(int iColumn, boolean iAscending)Requests a sort on the specified column.
Appends the sort request into the sort history.
iColumn
iAscending
CATNotification getCellSelectNotification()Returns the cell selection notification.
This notification is sent when one or more cells are selected (only in CELL_SELECTION_MODE).
CATNotification getRowSelectNotification()Returns the row selection notification.
This notification is sent when one or more rows are selected (only in LINE_SELECTION_MODE).
CATCellActionNotification getCellActionNotification()Returns the cell action notification.
This notification is sent when a cell is clicked in NO_SELECTION_MODE, or doubled-clicked in CELL_SELECTION_MODE or LINE_SELECTION_MODE.
CATCellActionNotification getActionLinkNotification()Returns the action link notification.
This notification is sent when a cell that is of type CATKeyTableModel.tACTIONLINK is clicked.
CATMenuNotification getMenuNotification()Returns the menu notification.
This notification is sent when a contextual menu command is triggered.
CATMenuNotification getToolbarNotification()Returns the toolbar notification.
This notification is sent when an active toolbar button is pressed.
CATNotification getColumnSortNotification()Returns the column sort notification.
This notification is sent each time the user makes a sort request on a column.
The application should not require this notification since the last
sort and sort history are always available as a table property (so
the table model should always take care of them).
CATCellChangedNotification getCellChangedNotification()Returns the cell changed notification.
This notification is sent when the user changes an editable cell content.