Interface DocumentsGrid
- 
- All Known Implementing Classes:
 DocumentsListGrid,DocumentsTileGrid,NavigatorDocumentsGrid,SearchHitsGrid
public interface DocumentsGridShows a view on a collecion of documents- Since:
 - 7.0
 - Author:
 - Marco Meschieri - LogicalDOC
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static intMODE_GALLERYstatic intMODE_LIST 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeselectAll()Clear the actual selectionvoiddestroy()voidexpandVisibleRows()Expands all visible rowsvoidfetchNewData(DocumentsDS ds)Replace the actual data with a new sourceintgetCount()Counts the total number of elementsGUIDocument[]getDocuments()Retrieves all the documents dispalyed in the gridGUIFoldergetFolder()CursorgetGridCursor()long[]getIds()Retrieves the list of all the idsintgetSelectedCount()Counts the total number of selected elementsGUIDocumentgetSelectedDocument()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 documentsintgetSelectedIndex()Retrieves the index of the currently selected recordvoidloadGridLayout(GUIFolder folder)Loads the layout of the grid(columns, ordering ...)voidregisterCellContextClickHandler(com.smartgwt.client.widgets.grid.events.CellContextClickHandler handler)Defines the handler of the context menu.voidregisterDataArrivedHandler(com.smartgwt.client.widgets.grid.events.DataArrivedHandler handler)voidregisterDoubleClickHandler(com.smartgwt.client.widgets.events.DoubleClickHandler handler)Defines the handler for double clicks.voidregisterSelectionChangedHandler(com.smartgwt.client.widgets.grid.events.SelectionChangedHandler handler)Defines the handler for double clicks.voidremoveSelectedDocuments()Removed the selected documents from visualizationvoidselectDocument(long docId)Selects the specified documentvoidsetCanDrag(boolean drag)Makes the grid support the dragvoidsetCanExpandRows()Enable the records expansionvoidsetDocuments(GUIDocument[] documents)Forces the records in the gridvoidsetGridCursor(Cursor cursor)Defines the cursor widget this grid will have to interact tovoidshowFilters(boolean showFilters)Shows or hide the filtersvoidupdateDocument(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
 
 - 
 
 -