Interface SheetHandler
-
- All Superinterfaces:
GroupingWidget.GroupingHandler
- All Known Implementing Classes:
SpreadsheetWidget
public interface SheetHandler extends GroupingWidget.GroupingHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanResizeColumn()booleancanResizeRow()voidclearSelectedCellsOnCut()Called after successful cut operation; currently selected cells should be clearedMap<Integer,String>getCellStyleToCSSStyle()StringgetColHeader(int col)Get header of a column as HTML.intgetColumnBufferSize()Map<Integer,Integer>getColumnIndexToStyleIndex()intgetColWidth(int col)Width of a column in pixels including right border.intgetColWidthActual(int col)Returns 0 for hidden columns, otherwise same asgetColWidth(int).int[]getColWidths()Map<Integer,String>getConditionalFormattingStyles()floatgetDefaultRowHeight()default row height in points (?)intgetDefinedRows()Number of defined rows in the spreadsheetFormulaBarWidgetgetFormulaBarWidget()intgetMaxColumns()The maximum amount of columns that are visibleintgetMaxRows()The maximum amount of rows that are visibleMergedRegiongetMergedRegion(int col, int row)Returns the merged region that this cell belongs to.MergedRegiongetMergedRegionStartingFrom(int col, int row)Params 1-basedintgetRowBufferSize()StringgetRowHeader(int row)Get header of a row as HTML.floatgetRowHeight(int row)Height of a row in points (pt) including bottom border.int[]getRowHeightsPX()Map<Integer,Integer>getRowIndexToStyleIndex()booleanhasCustomContextMenu()booleanisColProtected(int col)booleanisColumnHidden(int i)booleanisRowHidden(int i)booleanisRowProtected(int row)booleanisSheetProtected()voidonCellClick(int column, int row, String value, boolean shiftPressed, boolean metaOrCtrlPressed, boolean updateToActionHandler)voidonCellDoubleClick(int column, int row, String value)voidonCellInputBlur(String value)voidonCellInputCancel()voidonCellInputEnter(String value, boolean shift)voidonCellInputFocus()voidonCellInputTab(String value, boolean shift)voidonCellInputValueChange(String value)voidonCellRightClick(com.google.gwt.dom.client.NativeEvent nativeEvent, int column, int row)Called on right mouse button click on top of some cell.voidonColumnHeaderClick(int row, boolean shiftPressed, boolean metaOrCrtlPressed)voidonColumnHeaderResizeDoubleClick(int columnIndex)voidonColumnHeaderRightClick(com.google.gwt.dom.client.NativeEvent nativeEvent, int columnIndex)Called on right mouse button click on top of a column headervoidonColumnsResized(Map<Integer,Integer> newSizes)Map containing 1-based column indexes and new sizes as ptvoidonFinishedSelectingCellsWithDrag(int col1, int col2, int row1, int row2)voidonLinkCellClick(int column, int row)voidonRedoPress()voidonRowHeaderClick(int row, boolean shiftPressed, boolean metaOrCrtlPressed)voidonRowHeaderDoubleClick(int rowIndex)voidonRowHeaderRightClick(com.google.gwt.dom.client.NativeEvent nativeEvent, int rowIndex)Called on right mouse button click on top of a row headervoidonRowsResized(Map<Integer,Float> newSizes)Map containing 1-based row indexes and new sizes as ptvoidonScrollViewChanged(int firstRow, int lastRow, int firstColumn, int lastColumn)voidonSelectingCellsWithDrag(int parsedCol, int parsedRow)voidonSelectionDecreasePainted(int colEdgeIndex, int rowEdgeIndex)voidonSelectionIncreasePainted(int c1, int c2, int r1, int r2)voidonSheetKeyPress(com.google.gwt.dom.client.NativeEvent nativeEvent, String enteredCharacter)voidonSheetPaste(String text)Called when user pastes something inside the sheet.voidonUndoPress()voidselectAll()voidsetCellStyleWidthRatios(HashMap<Integer,Float> cellStyleWidthRatioMap)voidupdateCellComment(String text, int col, int row)-
Methods inherited from interface com.vaadin.addon.spreadsheet.client.GroupingWidget.GroupingHandler
levelHeaderClicked, setGroupingCollapsed
-
-
-
-
Method Detail
-
onCellClick
void onCellClick(int column, int row, String value, boolean shiftPressed, boolean metaOrCtrlPressed, boolean updateToActionHandler)
-
onLinkCellClick
void onLinkCellClick(int column, int row)
-
onCellDoubleClick
void onCellDoubleClick(int column, int row, String value)
-
onRowHeaderClick
void onRowHeaderClick(int row, boolean shiftPressed, boolean metaOrCrtlPressed)
-
onColumnHeaderClick
void onColumnHeaderClick(int row, boolean shiftPressed, boolean metaOrCrtlPressed)
-
onScrollViewChanged
void onScrollViewChanged(int firstRow, int lastRow, int firstColumn, int lastColumn)
-
onSelectionIncreasePainted
void onSelectionIncreasePainted(int c1, int c2, int r1, int r2)
-
onSelectionDecreasePainted
void onSelectionDecreasePainted(int colEdgeIndex, int rowEdgeIndex)
-
onFinishedSelectingCellsWithDrag
void onFinishedSelectingCellsWithDrag(int col1, int col2, int row1, int row2)
-
onSelectingCellsWithDrag
void onSelectingCellsWithDrag(int parsedCol, int parsedRow)
-
onCellInputBlur
void onCellInputBlur(String value)
-
onCellInputFocus
void onCellInputFocus()
-
onCellInputCancel
void onCellInputCancel()
-
onCellInputEnter
void onCellInputEnter(String value, boolean shift)
-
onCellInputTab
void onCellInputTab(String value, boolean shift)
-
onCellInputValueChange
void onCellInputValueChange(String value)
-
onSheetKeyPress
void onSheetKeyPress(com.google.gwt.dom.client.NativeEvent nativeEvent, String enteredCharacter)
-
getRowBufferSize
int getRowBufferSize()
-
getColumnBufferSize
int getColumnBufferSize()
-
getDefaultRowHeight
float getDefaultRowHeight()
default row height in points (?)- Returns:
-
getDefinedRows
int getDefinedRows()
Number of defined rows in the spreadsheet
-
getColWidths
int[] getColWidths()
-
getRowHeight
float getRowHeight(int row)
Height of a row in points (pt) including bottom border. Rows are indexed from 1 to getRows(). Returns 0 for hidden rows.
-
getColWidth
int getColWidth(int col)
Width of a column in pixels including right border. Columns are indexed from 1 to getColumns(). Returns 0 for hidden columns.
-
getColWidthActual
int getColWidthActual(int col)
Returns 0 for hidden columns, otherwise same asgetColWidth(int).- Parameters:
col- 1-based- Returns:
- width (px)
-
getColHeader
String getColHeader(int col)
Get header of a column as HTML. Columns are indexed from 1 to getColumns().
-
getRowHeader
String getRowHeader(int row)
Get header of a row as HTML. Rows are indexed from 1 to getRows().
-
getMaxColumns
int getMaxColumns()
The maximum amount of columns that are visible- Returns:
-
getMaxRows
int getMaxRows()
The maximum amount of rows that are visible- Returns:
-
getRowHeightsPX
int[] getRowHeightsPX()
-
isColumnHidden
boolean isColumnHidden(int i)
- Parameters:
i- 1-based- Returns:
- true if the column is hidden
-
isRowHidden
boolean isRowHidden(int i)
- Parameters:
i- 1-based- Returns:
- true if the row is hidden
-
onCellRightClick
void onCellRightClick(com.google.gwt.dom.client.NativeEvent nativeEvent, int column, int row)Called on right mouse button click on top of some cell.- Parameters:
nativeEvent-column- 1-basedrow- 1-based
-
onRowHeaderRightClick
void onRowHeaderRightClick(com.google.gwt.dom.client.NativeEvent nativeEvent, int rowIndex)Called on right mouse button click on top of a row header- Parameters:
nativeEvent-rowIndex- 1-based
-
onColumnHeaderRightClick
void onColumnHeaderRightClick(com.google.gwt.dom.client.NativeEvent nativeEvent, int columnIndex)Called on right mouse button click on top of a column header- Parameters:
nativeEvent-columnIndex- 1-based
-
hasCustomContextMenu
boolean hasCustomContextMenu()
-
canResizeColumn
boolean canResizeColumn()
-
canResizeRow
boolean canResizeRow()
-
onRowsResized
void onRowsResized(Map<Integer,Float> newSizes)
Map containing 1-based row indexes and new sizes as pt
-
onColumnsResized
void onColumnsResized(Map<Integer,Integer> newSizes)
Map containing 1-based column indexes and new sizes as pt
-
onRowHeaderDoubleClick
void onRowHeaderDoubleClick(int rowIndex)
- Parameters:
rowIndex- 1-based
-
onColumnHeaderResizeDoubleClick
void onColumnHeaderResizeDoubleClick(int columnIndex)
- Parameters:
columnIndex- 1-based
-
getMergedRegion
MergedRegion getMergedRegion(int col, int row)
Returns the merged region that this cell belongs to.- Parameters:
col-row-- Returns:
-
getMergedRegionStartingFrom
MergedRegion getMergedRegionStartingFrom(int col, int row)
Params 1-based- Parameters:
col- starting column of merged cellrow- starting row of merged cell- Returns:
-
onRedoPress
void onRedoPress()
-
onUndoPress
void onUndoPress()
-
setCellStyleWidthRatios
void setCellStyleWidthRatios(HashMap<Integer,Float> cellStyleWidthRatioMap)
-
onSheetPaste
void onSheetPaste(String text)
Called when user pastes something inside the sheet.- Parameters:
text- the pasted content
-
clearSelectedCellsOnCut
void clearSelectedCellsOnCut()
Called after successful cut operation; currently selected cells should be cleared
-
getFormulaBarWidget
FormulaBarWidget getFormulaBarWidget()
-
updateCellComment
void updateCellComment(String text, int col, int row)
-
selectAll
void selectAll()
-
isSheetProtected
boolean isSheetProtected()
-
isColProtected
boolean isColProtected(int col)
-
isRowProtected
boolean isRowProtected(int row)
-
-