|
|
|||||
| 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 |
| public static final int | CELL_SELECTION_MODE
Selection Mode: Cell |
| public static final int | LINE_SELECTION_MODE
Selection Mode: Row |
| public static final int | NO_SELECTION_MODE
Selection Mode: None |
| Constructor Summary |
| CATTable(CATDialog iDialog, String iName)
Creates a table with the specified parent and name. |
| Method Summary |
| public static int | advEditorGetColumn(CATDialog iFrom)
This is a helper method that allows Advanced Filter Editors to retrieve the related table column. |
| public static String | advEditorGetCurFilterValue(CATDialog iFrom)
This is a helper method that allows Advanced Filter Editors to retrieve the filter value. |
| public static CATTable | advEditorGetTable(CATDialog iFrom)
This is a helper method that allows Advanced Filter Editors to retrieve the related CATTable component. |
| public static 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. |
| public CATCellActionNotification | getActionLinkNotification()
Returns the action link notification. |
| public CATCellActionNotification | getCellActionNotification()
Returns the cell action notification. |
| public CATCellChangedNotification | getCellChangedNotification()
Returns the cell changed notification. |
| public CATNotification | getCellSelectNotification()
Returns the cell selection notification. |
| public CATNotification | getColumnSortNotification()
Returns the column sort notification. |
| public String | getFilter(int iColumn)
Returns the filter string associated to the given column. |
| public int | getFirstLine()
Returns the first line to be displayed. |
| public int | getHeight()
Returns the maximum number of lines to display. |
| public CATKeyTableModel | getKeyModel()
Returns the key table model (may be null). |
| public CATColumnSort | getLastSort()
Returns the most recent sort (if any). |
| public int | getLineGroup()
Returns the line groups size (used to visually group a set of lines). |
| public CATMenuModel | getMenu(Object iContext)
Returns the menu model defining the table contextual menu (may be null). |
| public CATMenuNotification | getMenuNotification()
Returns the menu notification. |
| public int | getMinWidth()
Returns the table minimum width (in characters). |
| public String | getModelURL()
Returns the key table model URL (if any). |
| public boolean | getMultipleSelection()
Determines whether multiple selection is allowed or not. |
| public CATNotification | getRowSelectNotification()
Returns the row selection notification. |
| public String[] | getSelectedKeys()
Returns the selected rows keys. |
| public CATCellSelection | getSelection()
Returns the current selected cell. |
| public int | getSelectionMode()
Returns the selection mode (default is CELL_SELECTION_MODE). |
| public CATColumnSort[] | getSortHistory()
Returns the sort history (may be null). |
| public CATMenuModel | getToolbar()
Returns the menu model defining the table toolbar content. |
| public CATMenuNotification | getToolbarNotification()
Returns the toolbar notification. |
| public boolean | hasMenu()
Determines whether this table has a contextual menu. |
| public boolean | isKeySelected(String iKey)
Determines whether the row is selected or not (from its key). |
| public void | resetFilters()
Unsets all filter values. |
| public void | setFirstLine(int iFirstLine)
Sets the first line to be displayed. |
| public void | setHeight(int iHeight)
Sets the maximum number of lines the table can display. |
| public void | setKeyModel(CATKeyTableModel iModel)
Sets the key table model (a null value unsets the table model). |
| public void | setLineGroup(int iGroup)
Sets the line groups size (to visually group a set of lines). |
| public void | setMinWidth(int iMinWidth)
Sets the table minimum width (in characters). |
| public void | setModelURL(String iModelURL)
Sets the key table model URL. |
| public void | setMultipleSelection(boolean iMultiple)
Enables/disables multipe selection. |
| public void | setSelectedKeys(String[] iSelection)
Sets selected rows from their keys. |
| public void | setSelection(CATCellSelection iSelection)
Sets the current selected cell. |
| public void | setSelectionMode(int iSelect)
Sets the selection mode. |
| public void | setToolbar(CATMenuModel iToolbar)
Sets the menu model defining the table toolbar content. |
| public void | sort(int iColumn, boolean iAscending)
Requests a sort on the specified column. |
| Field Detail |
public static final int CELL_SELECTION_MODE
Selection Mode: Cell
public static final int LINE_SELECTION_MODE
Selection Mode: Row
public static final int NO_SELECTION_MODE
Selection Mode: None
| Constructor Detail |
CATTable(CATDialog iDialog, String iName)
Creates a table with the specified parent and name.
iParentiName| Method Detail |
public static int advEditorGetColumn(CATDialog iFrom)
This is a helper method that allows Advanced Filter Editors to retrieve the related table column.
iFrom
public static String advEditorGetCurFilterValue(CATDialog iFrom)
This is a helper method that allows Advanced Filter Editors to retrieve the filter value.
iFrom
public static CATTable advEditorGetTable(CATDialog iFrom)
This is a helper method that allows Advanced Filter Editors to retrieve the related CATTable component.
iFrom
public static 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.
iFromiFilter
public CATCellActionNotification getActionLinkNotification()
Returns the action link notification.
This notification is sent when a cell that is of type CATKeyTableModel.tACTIONLINK is clicked.
public 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.
public CATCellChangedNotification getCellChangedNotification()
Returns the cell changed notification.
This notification is sent when the user changes an editable cell content.
public CATNotification getCellSelectNotification()
Returns the cell selection notification.
This notification is sent when one or more cells are selected (only in CELL_SELECTION_MODE).
public 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).
public String getFilter(int iColumn)
Returns the filter string associated to the given column.
iColumn
public int getFirstLine()
Returns the first line to be displayed.
public 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())
public CATKeyTableModel getKeyModel()
Returns the key table model (may be null).
public CATColumnSort getLastSort()
Returns the most recent sort (if any).
public int getLineGroup()
Returns the line groups size (used to visually group a set of lines).
public 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
public CATMenuNotification getMenuNotification()
Returns the menu notification.
This notification is sent when a contextual menu command is triggered.
public int getMinWidth()
Returns the table minimum width (in characters).
public String getModelURL()
Returns the key table model URL (if any).
public boolean getMultipleSelection()
Determines whether multiple selection is allowed or not.
true means multiple selection is enable, false means only single selection.
public CATNotification getRowSelectNotification()
Returns the row selection notification.
This notification is sent when one or more rows are selected (only in LINE_SELECTION_MODE).
public String[] getSelectedKeys()
Returns the selected rows keys.
This method is reserved for LINE_SELECTION_MODE with multiple selection.
null value means "empty selection".
public CATCellSelection getSelection()
Returns the current selected cell.
This method is reserved for CELL_SELECTION_MODE with single selection.
public int getSelectionMode()
Returns the selection mode (default is CELL_SELECTION_MODE).
public 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.
public CATMenuModel getToolbar()
Returns the menu model defining the table toolbar content.
null value means "no toolbar".
public CATMenuNotification getToolbarNotification()
Returns the toolbar notification.
This notification is sent when an active toolbar button is pressed.
public 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.
public 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)).
iKeytrue if the row is selected, false otherwise.
public void resetFilters()
Unsets all filter values.
public void setFirstLine(int iFirstLine)
Sets the first line to be displayed.
iFirstLine
public void setHeight(int iHeight)
Sets the maximum number of lines the table can display. Default is 12.
iHeight
public 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
public void setLineGroup(int iGroup)
Sets the line groups size (to visually group a set of lines). Default is 1.
iGroup
public 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
public 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
public void setMultipleSelection(boolean iMultiple)
Enables/disables multipe selection.
iMultipletrue to enable multiple selection, false to have only single selection.
public void setSelectedKeys(String[] iSelection)
Sets selected rows from their keys.
This method is reserved for LINE_SELECTION_MODE with multiple selection.
iSelectionnull value empties the selection.
public void setSelection(CATCellSelection iSelection)
Sets the current selected cell.
This method is reserved for CELL_SELECTION_MODE with single selection.
iSelection
public void setSelectionMode(int iSelect)
Sets the selection mode.
Note:
iSelect
public void setToolbar(CATMenuModel iToolbar)
Sets the menu model defining the table toolbar content.
iToolbarnull value unsets the toolbar.
public void sort(int iColumn, boolean iAscending)
Requests a sort on the specified column.
Appends the sort request into the sort history.
iColumniAscending