Package com.groiss.gui.table
Interface Table
- All Known Implementing Classes:
ConfiguredTable
,TableAdapter
public interface Table
Interface describing a table for rendering in HTML
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Possible shapes of a toolbar. -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The first column is the oid or object, but the column is not shown: the column is only needed to find out the object for tablehandlers (linestyle, filter)static final int
A link is used to select a row.static final int
Show a checkbox for multiple selection of rows.static final int
No selection of rows.static final int
The line is clickable, multiple selections possible.static final int
The line is clickable, only one line is selected.static final int
Show a radio button for single selection of a row. -
Method Summary
Modifier and TypeMethodDescriptionReturn a list of column descriptions.Returns the action that is executed on doubleclick on a row.The default target for toolbar functionsReturn the window properties for the edit targetReturns an url used as link for toolbar functionsReturn the name of the checkbox or radio buttonsReturns the id that is used when column filters are stored.Returns the context for online-helpgetId()
Returns the id of this tablegetPage()
Define the page the table uses.int
Return the size of a page (when using paging).int
Return the mode for selection.int
Return the sort column.Returns the name of the frame where the table resides.Builds the final tablemodel containing all data displayed in the table.int
Determines the tablesize of the tablemodel without reading all the objects.getTitle()
Return a string or Component for table titleReturn a comma separated list of action ids for the toolbar.Returns the name of the frame where the toolbar resides.Returns the desired mode of the toolbar.default Integer
boolean
Returns true if the toolbar is vertical, false for horizontal.void
init
(HttpServletRequest req) Init the tablemodel (determine data to be displayed).boolean
Is the table sortable.Use this method for defining a row specific css-class.boolean
oidOnly()
If true the value of the checkbox or radio button contains only the oid, otherwise it contains classname:oidvoid
setSearchString
(String searchString) Sets the search string for that table which may be used for filtering the table contentboolean
Returns true if a counter is shown below the table.boolean
Deprecated.use getToolbarShape()boolean
Is the table sorted ascending.boolean
Returns true if column picker should be shown.boolean
Returns true if column filters are enabled.boolean
Returns true if paging is enabled.
-
Field Details
-
SELECTION_NONE
static final int SELECTION_NONENo selection of rows.- See Also:
-
SELECTION_LINK
static final int SELECTION_LINKA link is used to select a row. When the link is clicked the edit function of the table is called.- See Also:
-
SELECTION_SINGLE
static final int SELECTION_SINGLEShow a radio button for single selection of a row.- See Also:
-
SELECTION_MULTIPLE
static final int SELECTION_MULTIPLEShow a checkbox for multiple selection of rows.- See Also:
-
SELECTION_HIDDEN
static final int SELECTION_HIDDENThe first column is the oid or object, but the column is not shown: the column is only needed to find out the object for tablehandlers (linestyle, filter)- See Also:
-
SELECTION_ROW_SINGLE
static final int SELECTION_ROW_SINGLEThe line is clickable, only one line is selected.- See Also:
-
SELECTION_ROW_MULTIPLE
static final int SELECTION_ROW_MULTIPLEThe line is clickable, multiple selections possible.- See Also:
-
-
Method Details
-
init
Init the tablemodel (determine data to be displayed).- Parameters:
req
-
-
setSearchString
Sets the search string for that table which may be used for filtering the table content- Parameters:
searchString
- a string for filtering or null if no search string is defined
-
getTableSize
int getTableSize()Determines the tablesize of the tablemodel without reading all the objects.- Returns:
- int representing the actual tablesize
-
getTableModel
TableModel getTableModel()Builds the final tablemodel containing all data displayed in the table.- Returns:
- TableModel containing all the data
-
getTitle
Object getTitle()Return a string or Component for table title -
getPage
Page getPage()Define the page the table uses. Has to return a new, empty page on each call. -
isSortable
boolean isSortable()Is the table sortable. -
sortAscending
boolean sortAscending()Is the table sorted ascending. -
getSortColumn
int getSortColumn()Return the sort column. -
getToolbarActions
String getToolbarActions()Return a comma separated list of action ids for the toolbar. -
getTableFrameName
String getTableFrameName()Returns the name of the frame where the table resides. -
getToolbarFrameName
String getToolbarFrameName()Returns the name of the frame where the toolbar resides. -
hasVerticalToolbar
boolean hasVerticalToolbar()Returns true if the toolbar is vertical, false for horizontal. -
showToolbarIcons
Deprecated.use getToolbarShape()Returns true if the toolbar shows the icons, false for text toolbar. -
getToolbarSize
-
getToolbarShape
Table.ToolbarShape getToolbarShape()Returns the desired mode of the toolbar. -
lineStyle
Use this method for defining a row specific css-class.- Parameters:
i
- the row indexstyle
- the css class that is set by the table renderer- Returns:
- a css class
-
getSelectionMode
int getSelectionMode()Return the mode for selection.- Returns:
- one of SELECTION_NONE, SELECTION_LINK, SELECTION_SINGLE, SELECTION_MULTIPLE, SELECTION_ROW_SINGLE, SELECTION_ROW_MULTIPLE
-
oidOnly
boolean oidOnly()If true the value of the checkbox or radio button contains only the oid, otherwise it contains classname:oid -
getEditTarget
String getEditTarget()The default target for toolbar functions -
getEditTargetProps
String getEditTargetProps()Return the window properties for the edit target -
getFieldName
String getFieldName()Return the name of the checkbox or radio buttons -
getEditUrl
String getEditUrl()Returns an url used as link for toolbar functions -
getDefaultAction
String getDefaultAction()Returns the action that is executed on doubleclick on a row. SeegetToolbarActions()
for a description of allowed values -
useFilter
boolean useFilter()Returns true if column filters are enabled. -
usePaging
boolean usePaging()Returns true if paging is enabled. -
useColumnPicker
boolean useColumnPicker()Returns true if column picker should be shown. -
getFilterId
String getFilterId()Returns the id that is used when column filters are stored. Normally this will be the id of the table, but if it is desired to use filters for several tables, another id can be defined. -
showCounter
boolean showCounter()Returns true if a counter is shown below the table. -
getColumns
List<ColumnDescription> getColumns()Return a list of column descriptions. -
getId
String getId()Returns the id of this table -
getSelectedItems
-
getHelpContext
String getHelpContext()Returns the context for online-help -
getPagesize
int getPagesize()Return the size of a page (when using paging).
-