Class FormulaBarWidget
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Composite
-
- com.vaadin.addon.spreadsheet.client.FormulaBarWidget
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.IsRenderable,com.google.gwt.user.client.ui.IsWidget
public class FormulaBarWidget extends com.google.gwt.user.client.ui.Composite
-
-
Constructor Summary
Constructors Constructor Description FormulaBarWidget(FormulaBarHandler selectionManager, SheetWidget widget)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFormulaCellRange(int col1, int row1, int col2, int row2)Adds a selection range to the current formulavoidcacheFormulaFieldValue()voidcheckEmptyValue()voidcheckKeyboardNavigation()Checks the char before the current caret pos, and enables or disables keyboard selection of cells accordingly.voidclear()voidclearFormulaSelection()Removes all keyboard selection variables, clears paintvoidensureSelectionStylesAfterScroll()Sheet has scrolled, and cell elements are not in the same position they were.StringgetFormulaFieldValue()booleanhasLightFocus()booleanisEditingFormula()If the user has focused an editor field, and the editor field contains a formula.booleanisInFullFocus()booleanisInlineEdit()booleanisKeyboardNavigationEnabled()If arrow key events should be processed normally, or as cell selection for the formula.voidmoveFormulaCellSelection(boolean shiftPressed, boolean up, boolean right, boolean down)voidrevertCellAddressValue()voidrevertCellValue()voidsetCellFormulaValue(String formula)voidsetCellPlainValue(String plainValue)voidsetFormulaCellRange(int col1, int row1, int col2, int row2)Set a cell range in the formula.voidsetFormulaFieldEnabled(boolean enabled)voidsetInFullFocus(boolean inFullFocus)voidsetInlineEdit(boolean inlineEdit)voidsetNamedRanges(List<String> namedRanges)voidsetSelectedCellAddress(String selection)voidstartInlineEdit(boolean inputFullFocus)voidstopInlineEdit()voidupdateEditorCaretPos(boolean doAsDeferred)Stores the current position if the editor caret (e.g.voidupdateFormulaSelectionStyles()Re-parses and paints the cell references in the current formula.-
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
-
-
-
Constructor Detail
-
FormulaBarWidget
public FormulaBarWidget(FormulaBarHandler selectionManager, SheetWidget widget)
-
-
Method Detail
-
clearFormulaSelection
public void clearFormulaSelection()
Removes all keyboard selection variables, clears paint
-
moveFormulaCellSelection
public void moveFormulaCellSelection(boolean shiftPressed, boolean up, boolean right, boolean down)
-
checkKeyboardNavigation
public void checkKeyboardNavigation()
Checks the char before the current caret pos, and enables or disables keyboard selection of cells accordingly.
-
addFormulaCellRange
public void addFormulaCellRange(int col1, int row1, int col2, int row2)Adds a selection range to the current formula
-
setFormulaCellRange
public void setFormulaCellRange(int col1, int row1, int col2, int row2)Set a cell range in the formula. If the user hasn't moved the caret after last call, replace the value instead.
-
checkEmptyValue
public void checkEmptyValue()
-
revertCellAddressValue
public void revertCellAddressValue()
-
revertCellValue
public void revertCellValue()
-
setSelectedCellAddress
public void setSelectedCellAddress(String selection)
-
setCellPlainValue
public void setCellPlainValue(String plainValue)
-
setCellFormulaValue
public void setCellFormulaValue(String formula)
-
clear
public void clear()
-
getFormulaFieldValue
public String getFormulaFieldValue()
-
setFormulaFieldEnabled
public void setFormulaFieldEnabled(boolean enabled)
-
cacheFormulaFieldValue
public void cacheFormulaFieldValue()
-
isEditingFormula
public boolean isEditingFormula()
If the user has focused an editor field, and the editor field contains a formula.
-
isKeyboardNavigationEnabled
public boolean isKeyboardNavigationEnabled()
If arrow key events should be processed normally, or as cell selection for the formula.
-
startInlineEdit
public void startInlineEdit(boolean inputFullFocus)
-
stopInlineEdit
public void stopInlineEdit()
-
updateEditorCaretPos
public void updateEditorCaretPos(boolean doAsDeferred)
Stores the current position if the editor caret (e.g. when focus is temporarily moved somewhere else)
-
ensureSelectionStylesAfterScroll
public void ensureSelectionStylesAfterScroll()
Sheet has scrolled, and cell elements are not in the same position they were. Re-paint background colors.
-
updateFormulaSelectionStyles
public void updateFormulaSelectionStyles()
Re-parses and paints the cell references in the current formula.
-
isInFullFocus
public boolean isInFullFocus()
-
setInFullFocus
public void setInFullFocus(boolean inFullFocus)
-
isInlineEdit
public boolean isInlineEdit()
-
setInlineEdit
public void setInlineEdit(boolean inlineEdit)
-
hasLightFocus
public boolean hasLightFocus()
-
-