Interface DocumentsGrid
- All Known Implementing Classes:
DocumentsListGrid
,DocumentsTileGrid
,NavigatorDocumentsGrid
,SearchHitsGrid
,SearchIndexEntriesGrid
public interface DocumentsGrid
Shows a view on a collecion of documents
- Since:
- 7.0
- Author:
- Marco Meschieri - LogicalDOC
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear the actual selectionvoid
destroy()
void
Expands all visible rowsvoid
Replace the actual data with a new sourceint
getCount()
Counts the total number of elementsRetrieves all the documents dispalyed in the gridLong[]
getIds()
Retrieves the list of all the idsint
Counts the total number of selected elementsGets a bean representation of the currently selected item (not all properties are populated)Gets a bean representation of the currently selected items (not all properties are populated)Long[]
Retrieves the list of all selected document IDsint
Retrieves the index of the currently selected recint
loadGridLayout
(GUIFolder folder) Loads the layout of the grid(columns, ordering ...)void
registerCellContextClickHandler
(com.smartgwt.client.widgets.grid.events.CellContextClickHandler handler) Defines the handler of the context menu.void
registerDataArrivedHandler
(com.smartgwt.client.widgets.grid.events.DataArrivedHandler handler) void
registerDoubleClickHandler
(com.smartgwt.client.widgets.events.DoubleClickHandler handler) Defines the handler for double clicks.void
registerSelectionChangedHandler
(com.smartgwt.client.widgets.grid.events.SelectionChangedHandler handler) Defines the handler for double clicks.void
Removed the selected documents from visualizationvoid
selectDocument
(long docId) Selects the specified documentvoid
setCanDrag
(boolean drag) Makes the grid support the dragvoid
Enable the records expansionvoid
setDocuments
(GUIDocument[] documents) Forces the records in the gridvoid
setGridCursor
(Cursor cursor) Defines the cursor widget this grid will have to interact tovoid
showFilters
(boolean showFilters) Shows or hide the filtersvoid
updateDocument
(GUIDocument document) Updates the visualization of the proper document element
-
Field Details
-
MODE_LIST
static final int MODE_LIST- See Also:
-
MODE_GALLERY
static final int MODE_GALLERY- See Also:
-
-
Method Details
-
updateDocument
Updates the visualization of the proper document element- Parameters:
document
- the document to update
-
setDocuments
Forces the records in the grid- Parameters:
documents
- array of documents to render
-
getDocuments
GUIDocument[] getDocuments()Retrieves all the documents dispalyed in the grid- Returns:
- the array of documents
-
getSelectedDocument
GUIDocument getSelectedDocument()Gets a bean representation of the currently selected item (not all properties are populated)- Returns:
- the first selected document
-
getSelectedIndex
int getSelectedIndex()Retrieves the index of the currently selected rec- Returns:
- the row of the selected element
-
getSelectedDocuments
GUIDocument[] getSelectedDocuments()Gets a bean representation of the currently selected items (not all properties are populated)- Returns:
- the documents selected in the grid
-
getSelectedIds
Long[] getSelectedIds()Retrieves the list of all selected document IDs- Returns:
- identifiers of the selected documents
-
getIds
Long[] getIds()Retrieves the list of all the ids- Returns:
- list of identifiers
-
deselectAll
void deselectAll()Clear the actual selection -
setCanExpandRows
void setCanExpandRows()Enable the records expansion -
getCount
int getCount()Counts the total number of elements- Returns:
- total number of records
-
getSelectedCount
int getSelectedCount()Counts the total number of selected elements- Returns:
- number of selected rows
-
showFilters
void showFilters(boolean showFilters) Shows or hide the filters- Parameters:
showFilters
- if the filters must be displayed
-
selectDocument
void selectDocument(long docId) Selects the specified document- Parameters:
docId
- identifier of the document to display
-
removeSelectedDocuments
void removeSelectedDocuments()Removed the selected documents from visualization -
expandVisibleRows
void expandVisibleRows()Expands all visible rows -
setCanDrag
void setCanDrag(boolean drag) Makes the grid support the drag- Parameters:
drag
- if the drag must be supported
-
setGridCursor
Defines the cursor widget this grid will have to interact to- Parameters:
cursor
- the cursor
-
getGridCursor
Cursor getGridCursor() -
registerDoubleClickHandler
void registerDoubleClickHandler(com.smartgwt.client.widgets.events.DoubleClickHandler handler) Defines the handler for double clicks. Implementations must check if the document is password protected- Parameters:
handler
- invoked when the user does the double-click
-
registerSelectionChangedHandler
void registerSelectionChangedHandler(com.smartgwt.client.widgets.grid.events.SelectionChangedHandler handler) Defines the handler for double clicks. Implementations must check if the document is password protected- Parameters:
handler
- invoked when the user changes the selection
-
registerCellContextClickHandler
void registerCellContextClickHandler(com.smartgwt.client.widgets.grid.events.CellContextClickHandler handler) Defines the handler of the context menu. Implementations must check if the document is password protected- Parameters:
handler
- invoked when the user clicks with right-button
-
registerDataArrivedHandler
void registerDataArrivedHandler(com.smartgwt.client.widgets.grid.events.DataArrivedHandler handler) -
getFolder
GUIFolder getFolder() -
destroy
void destroy() -
fetchNewData
Replace the actual data with a new source- Parameters:
ds
- the data source for the grid
-
loadGridLayout
Loads the layout of the grid(columns, ordering ...)- Parameters:
folder
- Optional folder to take the layout from- Returns:
- the page size
-