Interface DocumentsGrid
-
- All Known Implementing Classes:
DocumentsListGrid
,DocumentsTileGrid
,NavigatorDocumentsGrid
,SearchHitsGrid
public interface DocumentsGrid
Shows a view on a collecion of documents- Since:
- 7.0
- Author:
- Marco Meschieri - LogicalDOC
-
-
Field Summary
Fields Modifier and Type Field Description static int
MODE_GALLERY
static int
MODE_LIST
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deselectAll()
Clear the actual selectionvoid
destroy()
void
expandVisibleRows()
Expands all visible rowsvoid
fetchNewData(DocumentsDS ds)
Replace the actual data with a new sourceint
getCount()
Counts the total number of elementsGUIDocument[]
getDocuments()
Retrieves all the documents dispalyed in the gridGUIFolder
getFolder()
Cursor
getGridCursor()
long[]
getIds()
Retrieves the list of all the idsint
getSelectedCount()
Counts the total number of selected elementsGUIDocument
getSelectedDocument()
Gets a bean representation of the currently selected item (not all properties are populated)GUIDocument[]
getSelectedDocuments()
Gets a bean representation of the currently selected items (not all properties are populated)long[]
getSelectedIds()
Retrieves the list of all selected documentsint
getSelectedIndex()
Retrieves the index of the currently selected recordvoid
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
removeSelectedDocuments()
Removed the selected documents from visualizationvoid
selectDocument(long docId)
Selects the specified documentvoid
setCanDrag(boolean drag)
Makes the grid support the dragvoid
setCanExpandRows()
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 Detail
-
MODE_LIST
static final int MODE_LIST
- See Also:
- Constant Field Values
-
MODE_GALLERY
static final int MODE_GALLERY
- See Also:
- Constant Field Values
-
-
Method Detail
-
updateDocument
void updateDocument(GUIDocument document)
Updates the visualization of the proper document element- Parameters:
document
- the document to update
-
setDocuments
void setDocuments(GUIDocument[] documents)
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 record- 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 documents- 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
void setGridCursor(Cursor cursor)
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
void fetchNewData(DocumentsDS ds)
Replace the actual data with a new source- Parameters:
ds
- the data source for the grid
-
loadGridLayout
void loadGridLayout(GUIFolder folder)
Loads the layout of the grid(columns, ordering ...)- Parameters:
folder
- Optional folder to take the layout from
-
-