Interface DocumentsGrid

    • 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)
      • destroy

        void destroy()
      • fetchNewData

        void fetchNewData​(DocumentsDS ds)
        Replace the actual data with a new source
        Parameters:
        ds - the data source for the grid