Class CellSelection

java.lang.Object
com.smartgwt.client.core.BaseClass
com.smartgwt.client.widgets.grid.CellSelection
All Implemented Interfaces:
HasHandlers

public class CellSelection extends BaseClass
Maintains a representation of selection over a 2-dimensional grid of objects.
Automatically created to manage cell-selection on CubeGrid widgets.
  • Constructor Details

    • CellSelection

      public CellSelection()
    • CellSelection

      public CellSelection(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static CellSelection getOrCreateRef(JavaScriptObject jsObj)
    • setJavaScriptObject

      public void setJavaScriptObject(JavaScriptObject jsObj)
      Overrides:
      setJavaScriptObject in class BaseClass
    • create

      public JavaScriptObject create()
      Specified by:
      create in class BaseClass
    • isCreated

      public boolean isCreated()
      Overrides:
      isCreated in class BaseClass
    • getJsObj

      public JavaScriptObject getJsObj()
      Overrides:
      getJsObj in class BaseClass
    • getOrCreateJsObj

      public JavaScriptObject getOrCreateJsObj()
      Overrides:
      getOrCreateJsObj in class BaseClass
    • anySelected

      public Boolean anySelected()
      Is anything in the list selected?
      Returns:
      true == at least one item is selected false == nothing at all is selected
      See Also:
    • cellIsSelected

      public Boolean cellIsSelected(int rowNum, int colNum)
      Return true if a particular item is selected
      Parameters:
      rowNum - row index of the cell to check
      colNum - column index of the cell to check
      Returns:
      true == object is selected false == object is not selected
      See Also:
    • deselectCell

      public Boolean deselectCell(int rowNum, int colNum)
      Deselect a particular cell
      Parameters:
      rowNum - row index of the cell to select
      colNum - column index of the cell to select
      Returns:
      true == selection actually changed, false == no change
      See Also:
    • getSelectedRecord

      public ListGridRecord getSelectedRecord()
      Returns the first record that has any cells selected.
      Returns:
      first selected record, or null if nothing selected
      See Also:
    • selectCell

      public Boolean selectCell(int rowNum, int colNum)
      Select a particular cell
      Parameters:
      rowNum - row index of cell to select
      colNum - column index of cell to select
      Returns:
      true == selection actually changed, false == no change
      See Also:
    • selectionChanged

      public void selectionChanged()
      Method called whenever the cell selection is modified
      See Also:
    • selectSingleCell

      public Boolean selectSingleCell(int rowNum, int colNum)
      select a single cell and deselect everything else
      Parameters:
      rowNum - row index of cell to select
      colNum - column index of cell to select
      Returns:
      true == selection actually changed, false == no change
      See Also:
    • getSelectedCells

      public int[][] getSelectedCells()
      Returns an array of the currently selected cells. Each cell is returned as a 2 element array in the form [rowNum, colNum].
      Returns:
      an array of the selected cells, as 2 element arrays
      See Also:
    • deselectCellList

      public Boolean deselectCellList()
      deselect an array of cells
      Returns:
      true == selection actually changed, false == no change
      See Also:
    • deselectCellList

      public Boolean deselectCellList(int[][] cells)
    • selectCellList

      public Boolean selectCellList()
      select an array of cells
      Returns:
      true == selection actually changed, false == no change
      See Also:
    • selectCellList

      public Boolean selectCellList(int[][] cells)