Class SelectionWidget

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.SelectionWidget
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 SelectionWidget extends com.google.gwt.user.client.ui.Composite
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject

    com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
  • Field Summary

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
    SelectionWidget(SheetHandler actionHandler, SheetWidget sheetWidget)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    closestCellEdgeIndexToCursor(int[] cellSizes, int startIndex, int cursorPosition, boolean forSelection)
    Returns index of the cell that has the left edge closest to the given cursor position.
    int
    countSum(int[] sizes, int beginIndex, int endIndex)
     
    int
     
    int
     
    int
     
    int
     
    boolean
     
    protected void
    setFillMode(boolean fillMode)
     
    void
    setHeight(String height)
     
    void
    setHorizontalSplitPosition(int horizontalSplitPosition)
     
    void
    setPaintPosition(int col1, int col2, int row1, int row2)
     
    void
    setPaintVisible(boolean visible)
     
    void
    setPosition(int col1, int col2, int row1, int row2)
     
    void
    setVerticalSplitPosition(int verticalSplitPosition)
     
    void
    setVisible(boolean visible)
     
    void
     

    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, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, sinkBitlessEvent, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • setHorizontalSplitPosition

      public void setHorizontalSplitPosition(int horizontalSplitPosition)
    • setVerticalSplitPosition

      public void setVerticalSplitPosition(int verticalSplitPosition)
    • getRow1

      public int getRow1()
    • getRow2

      public int getRow2()
    • getCol1

      public int getCol1()
    • getCol2

      public int getCol2()
    • setPosition

      public void setPosition(int col1, int col2, int row1, int row2)
    • setPaintPosition

      public void setPaintPosition(int col1, int col2, int row1, int row2)
    • setWidth

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

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

      public void setVisible(boolean visible)
      Specified by:
      setVisible in interface com.google.gwt.user.client.ui.HasVisibility
      Overrides:
      setVisible in class com.google.gwt.user.client.ui.UIObject
    • setPaintVisible

      public void setPaintVisible(boolean visible)
    • isVisible

      public boolean isVisible()
      Specified by:
      isVisible in interface com.google.gwt.user.client.ui.HasVisibility
      Overrides:
      isVisible in class com.google.gwt.user.client.ui.UIObject
    • countSum

      public int countSum(int[] sizes, int beginIndex, int endIndex)
      Parameters:
      sizes -
      beginIndex - 1-based inclusive
      endIndex - 1-based exclusive
      Returns:
    • closestCellEdgeIndexToCursor

      public int closestCellEdgeIndexToCursor(int[] cellSizes, int startIndex, int cursorPosition, boolean forSelection)
      Returns index of the cell that has the left edge closest to the given cursor position. Used for determining how many rows/columns should be painted when the mouse cursor is dragged somewhere.
      Parameters:
      cellSizes - the sizes used to calculate
      startIndex - 1-based index where the cursorPosition refers to
      cursorPosition - the position of the cursor relative to startIndex. Can be negative
      forSelection - true if the result is used for touch selection, false if it's used for painting cells
      Returns:
    • setFillMode

      protected void setFillMode(boolean fillMode)