Class SpreadsheetWidget

    • Constructor Detail

      • SpreadsheetWidget

        public SpreadsheetWidget()
    • Method Detail

      • setHeight

        public void setHeight​(String height)
        Overrides:
        setHeight in class com.google.gwt.user.client.ui.UIObject
      • setWidth

        public void setWidth​(String width)
        Overrides:
        setWidth in class com.google.gwt.user.client.ui.UIObject
      • setLockFormatColumns

        public void setLockFormatColumns​(boolean enabled)
        Enable or disable Formatting columns locking.
        Parameters:
        enabled - the new content. Can not be HTML.
      • setLockFormatRows

        public void setLockFormatRows​(boolean enabled)
        Enable or disable Formatting rows locking.
        Parameters:
        enabled - the new content. Can not be HTML.
      • setInfoLabelValue

        public void setInfoLabelValue​(String value)
        Sets the content of the info label.
        Parameters:
        value - the new content. Can not be HTML.
      • getInfoLabelValue

        public String getInfoLabelValue()
        Returns:
        current content of the info label.
      • load

        public void load()
      • sheetUpdated

        public void sheetUpdated​(String[] sheetNames,
                                 int sheetIndex,
                                 boolean clearScrollPosition)
      • widgetSizeChanged

        public void widgetSizeChanged()
      • clearSpreadsheet

        public void clearSpreadsheet​(boolean removed)
        Clear all current sheet related data
      • loadSheet

        protected void loadSheet​(int sheetIndex)
        Parameters:
        sheetIndex - 0-based index of the sheet to load
      • relayoutSheet

        public void relayoutSheet()
      • setSpreadsheetHandler

        public void setSpreadsheetHandler​(SpreadsheetHandler spreadsheetHandler)
      • showCellCustomComponents

        public void showCellCustomComponents​(HashMap<String,​com.google.gwt.user.client.ui.Widget> customWidgetMap)
      • removePopupButton

        public void removePopupButton​(PopupButtonWidget popupButton)
      • updateFormulaBar

        public void updateFormulaBar​(String possibleName,
                                     int col,
                                     int row)
      • invalidCellAddress

        public void invalidCellAddress()
      • focusSheet

        public void focusSheet()
      • setCustomEditorFactory

        public void setCustomEditorFactory​(SpreadsheetCustomEditorFactory customEditorFactory)
        Parameters:
        customEditorFactory - the customEditorFactory to set
      • loadSelectedCellEditor

        public void loadSelectedCellEditor()
        Called when the customEditorFactory might have a new editor for the currently selected cell.
      • addVisibleCellComment

        public void addVisibleCellComment​(String key)
      • removeVisibleCellComment

        public void removeVisibleCellComment​(String key)
      • onScrollViewChanged

        public void onScrollViewChanged​(int firstRowIndex,
                                        int lastRowIndex,
                                        int firstColumnIndex,
                                        int lastColumnIndex)
        Specified by:
        onScrollViewChanged in interface SheetHandler
      • onCellRightClick

        public void onCellRightClick​(com.google.gwt.dom.client.NativeEvent event,
                                     int column,
                                     int row)
        Description copied from interface: SheetHandler
        Called on right mouse button click on top of some cell.
        Specified by:
        onCellRightClick in interface SheetHandler
        column - 1-based
        row - 1-based
      • onRowHeaderRightClick

        public void onRowHeaderRightClick​(com.google.gwt.dom.client.NativeEvent nativeEvent,
                                          int rowIndex)
        Description copied from interface: SheetHandler
        Called on right mouse button click on top of a row header
        Specified by:
        onRowHeaderRightClick in interface SheetHandler
        rowIndex - 1-based
      • onColumnHeaderRightClick

        public void onColumnHeaderRightClick​(com.google.gwt.dom.client.NativeEvent nativeEvent,
                                             int columnIndex)
        Description copied from interface: SheetHandler
        Called on right mouse button click on top of a column header
        Specified by:
        onColumnHeaderRightClick in interface SheetHandler
        columnIndex - 1-based
      • onCellClick

        public void onCellClick​(int column,
                                int row,
                                String value,
                                boolean shiftKey,
                                boolean metaOrCtrlKey,
                                boolean updateToActionHandler)
        Specified by:
        onCellClick in interface SheetHandler
      • updateSelectedCellValues

        public void updateSelectedCellValues​(int column,
                                             int row)
      • updateSelectedCellValues

        public void updateSelectedCellValues​(int column,
                                             int row,
                                             String name)
      • onRowHeaderClick

        public void onRowHeaderClick​(int row,
                                     boolean shiftPressed,
                                     boolean metaOrCrtlPressed)
        Specified by:
        onRowHeaderClick in interface SheetHandler
      • onColumnHeaderClick

        public void onColumnHeaderClick​(int column,
                                        boolean shiftPressed,
                                        boolean metaOrCrtlPressed)
        Specified by:
        onColumnHeaderClick in interface SheetHandler
      • onRowHeaderDoubleClick

        public void onRowHeaderDoubleClick​(int rowIndex)
        Specified by:
        onRowHeaderDoubleClick in interface SheetHandler
        Parameters:
        rowIndex - 1-based
      • onSheetKeyPress

        public void onSheetKeyPress​(com.google.gwt.dom.client.NativeEvent event,
                                    String enteredCharacter)
        Specified by:
        onSheetKeyPress in interface SheetHandler
      • getMergedRegionStartingFrom

        public MergedRegion getMergedRegionStartingFrom​(int column,
                                                        int row)
        Description copied from interface: SheetHandler
        Params 1-based
        Specified by:
        getMergedRegionStartingFrom in interface SheetHandler
        Parameters:
        column - starting column of merged cell
        row - starting row of merged cell
        Returns:
      • createRangeSelectionString

        protected String createRangeSelectionString​(int col1,
                                                    int col2,
                                                    int row1,
                                                    int row2)
      • setRowBufferSize

        public void setRowBufferSize​(int rowBufferSize)
      • setColumnBufferSize

        public void setColumnBufferSize​(int columnBufferSize)
      • setRows

        public void setRows​(int rows)
      • setCols

        public void setCols​(int cols)
      • setColGroupingData

        public void setColGroupingData​(List<GroupingData> data)
      • setRowGroupingData

        public void setRowGroupingData​(List<GroupingData> data)
      • setRowH

        public void setRowH​(float[] rowH)
      • setColW

        public void setColW​(int[] colW)
      • setDefRowH

        public void setDefRowH​(float defRowH)
      • setDefColW

        public void setDefColW​(int defColW)
      • setVerticalScrollPositions

        public void setVerticalScrollPositions​(int[] verticalScrollPositions)
      • setHorizontalScrollPositions

        public void setHorizontalScrollPositions​(int[] horizontalScrollPositions)
      • setVerticalSplitPosition

        public void setVerticalSplitPosition​(int verticalSplitPosition)
      • setHorizontalSplitPosition

        public void setHorizontalSplitPosition​(int horizontalSplitPosition)
      • setCellStyleToCSSStyle

        public void setCellStyleToCSSStyle​(HashMap<Integer,​String> cellStyleToCSSStyle)
      • setRowIndexToStyleIndex

        public void setRowIndexToStyleIndex​(HashMap<Integer,​Integer> rowIndexToStyleIndex)
      • setColumnIndexToStyleIndex

        public void setColumnIndexToStyleIndex​(HashMap<Integer,​Integer> columnIndexToStyleIndex)
      • setLockedColumnIndexes

        public void setLockedColumnIndexes​(Set<Integer> lockedColumnIndexes)
      • setLockedRowIndexes

        public void setLockedRowIndexes​(Set<Integer> lockedRowIndexes)
      • setShiftedCellBorderStyles

        public void setShiftedCellBorderStyles​(ArrayList<String> shiftedCellBorderStyles)
      • setHyperlinksTooltips

        public void setHyperlinksTooltips​(HashMap<String,​String> cellLinksMap)
      • setSheetProtected

        public void setSheetProtected​(boolean sheetProtected)
      • setWorkbookProtected

        public void setWorkbookProtected​(boolean workbookProtected)
      • setHiddenColumnIndexes

        public void setHiddenColumnIndexes​(ArrayList<Integer> hiddenColumnIndexes)
      • setHiddenRowIndexes

        public void setHiddenRowIndexes​(ArrayList<Integer> hiddenRowIndexes)
      • setInvalidFormulaCells

        public void setInvalidFormulaCells​(Set<String> invalidFormulaCells)
      • setInvalidFormulaErrorMessage

        public void setInvalidFormulaErrorMessage​(String invalidFormulaMessage)
      • getRowHeight

        public float getRowHeight​(int row)
        Description copied from interface: SheetHandler
        Height of a row in points (pt) including bottom border. Rows are indexed from 1 to getRows(). Returns 0 for hidden rows.
        Specified by:
        getRowHeight in interface SheetHandler
      • getColWidth

        public int getColWidth​(int col)
        Description copied from interface: SheetHandler
        Width of a column in pixels including right border. Columns are indexed from 1 to getColumns(). Returns 0 for hidden columns.
        Specified by:
        getColWidth in interface SheetHandler
      • getColHeader

        public final String getColHeader​(int col)
        Get column header for column indexed 1..
        Specified by:
        getColHeader in interface SheetHandler
      • getDefinedRows

        public int getDefinedRows()
        Description copied from interface: SheetHandler
        Number of defined rows in the spreadsheet
        Specified by:
        getDefinedRows in interface SheetHandler
      • getMaxColumns

        public int getMaxColumns()
        Description copied from interface: SheetHandler
        The maximum amount of columns that are visible
        Specified by:
        getMaxColumns in interface SheetHandler
        Returns:
      • getMaxRows

        public int getMaxRows()
        Description copied from interface: SheetHandler
        The maximum amount of rows that are visible
        Specified by:
        getMaxRows in interface SheetHandler
        Returns:
      • isColumnHidden

        public boolean isColumnHidden​(int columnIndex)
        Specified by:
        isColumnHidden in interface SheetHandler
        Parameters:
        columnIndex - 1-based
        Returns:
        true if the column is hidden
      • isRowHidden

        public boolean isRowHidden​(int rowIndex)
        Specified by:
        isRowHidden in interface SheetHandler
        Parameters:
        rowIndex - 1-based
        Returns:
        true if the row is hidden
      • setDisplayGridlines

        public void setDisplayGridlines​(boolean displayGridlines)
      • setDisplayRowColHeadings

        public void setDisplayRowColHeadings​(boolean displayRowColHeadings)
      • refreshOverlayPositions

        public void refreshOverlayPositions()
      • updateBottomRightCellValues

        public void updateBottomRightCellValues​(ArrayList<CellData> cellData)
      • updateTopLeftCellValues

        public void updateTopLeftCellValues​(ArrayList<CellData> cellData)
      • updateTopRightCellValues

        public void updateTopRightCellValues​(ArrayList<CellData> cellData)
      • updateBottomLeftCellValues

        public void updateBottomLeftCellValues​(ArrayList<CellData> cellData)
      • cellValuesUpdated

        public void cellValuesUpdated​(ArrayList<CellData> updatedCellData)
        This can contain values for any of the panes or values that are just in the client side cache, but the cell is not actually visible.
        Parameters:
        updatedCellData -
      • onSheetPaste

        public void onSheetPaste​(String text)
        Description copied from interface: SheetHandler
        Called when user pastes something inside the sheet.
        Specified by:
        onSheetPaste in interface SheetHandler
        Parameters:
        text - the pasted content
      • clearSelectedCellsOnCut

        public void clearSelectedCellsOnCut()
        Description copied from interface: SheetHandler
        Called after successful cut operation; currently selected cells should be cleared
        Specified by:
        clearSelectedCellsOnCut in interface SheetHandler
      • setConditionalFormattingStyles

        public void setConditionalFormattingStyles​(HashMap<Integer,​String> map)
      • selectCell

        public void selectCell​(String name,
                               int col,
                               int row,
                               String value,
                               boolean formula,
                               boolean locked,
                               boolean initialSelection)
      • selectCellRange

        public void selectCellRange​(String name,
                                    int selectedCellColumn,
                                    int selectedCellRow,
                                    int firstColumn,
                                    int lastColumn,
                                    int firstRow,
                                    int lastRow,
                                    boolean scroll)
      • refreshCellStyles

        public void refreshCellStyles()
      • setTouchMode

        public void setTouchMode​(boolean touchMode)
      • editCellComment

        public void editCellComment​(int col,
                                    int row)
      • focus

        public void focus()
        Specified by:
        focus in interface com.vaadin.client.Focusable
      • setId

        public void setId​(String connectorId)
      • setColGroupingMax

        public void setColGroupingMax​(int max)
      • setRowGroupingMax

        public void setRowGroupingMax​(int max)
      • setColGroupingInversed

        public void setColGroupingInversed​(boolean inversed)
      • setRowGroupingInversed

        public void setRowGroupingInversed​(boolean inversed)
      • setNamedRanges

        public void setNamedRanges​(List<String> namedRanges)
      • setHost

        public void setHost​(com.google.gwt.dom.client.Element element)