com.smartgwt.client.widgets.grid

## Class CellSelection

- java.lang.Object
- - com.smartgwt.client.core.BaseClass
  - - com.smartgwt.client.widgets.grid.CellSelection

- All Implemented Interfaces:
    com.google.gwt.event.shared.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.

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.BaseClass

      `config, configOnly, factoryCreated, factoryProperties, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CellSelection()`
    `CellSelection(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Boolean` | `anySelected()` Is anything in the list selected?
    `java.lang.Boolean` | `cellIsSelected(int rowNum, int colNum)` Return true if a particular item is selected
    `com.google.gwt.core.client.JavaScriptObject` | `create()`
    `java.lang.Boolean` | `deselectCell(int rowNum, int colNum)` Deselect a particular cell
    `java.lang.Boolean` | `deselectCellList()` deselect an array of cells
    `java.lang.Boolean` | `deselectCellList(int[][] cells)`
    `com.google.gwt.core.client.JavaScriptObject` | `getJsObj()`
    `com.google.gwt.core.client.JavaScriptObject` | `getOrCreateJsObj()`
    `static CellSelection` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `int[][]` | `getSelectedCells()` Returns an array of the currently selected cells.
    `ListGridRecord` | `getSelectedRecord()` Returns the first record that has any cells selected.
    `boolean` | `isCreated()`
    `java.lang.Boolean` | `selectCell(int rowNum, int colNum)` Select a particular cell
    `java.lang.Boolean` | `selectCellList()` select an array of cells
    `java.lang.Boolean` | `selectCellList(int[][] cells)`
    `void` | `selectionChanged()` Method called whenever the cell selection is modified
    `java.lang.Boolean` | `selectSingleCell(int rowNum, int colNum)` select a single cell and deselect everything else
    `void` | `setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)`

    - ### Methods inherited from class com.smartgwt.client.core.BaseClass

      `addDynamicProperty, addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CellSelection

          public CellSelection()

    - #### CellSelection

          public CellSelection(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static CellSelection getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setJavaScriptObject

          public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)

      Overrides:
        `setJavaScriptObject` in class `BaseClass`

    - #### create

          public com.google.gwt.core.client.JavaScriptObject create()

      Specified by:
        `create` in class `BaseClass`

    - #### isCreated

          public boolean isCreated()

      Overrides:
        `isCreated` in class `BaseClass`

    - #### getJsObj

          public com.google.gwt.core.client.JavaScriptObject getJsObj()

      Overrides:
        `getJsObj` in class `BaseClass`

    - #### getOrCreateJsObj

          public com.google.gwt.core.client.JavaScriptObject getOrCreateJsObj()

      Overrides:
        `getOrCreateJsObj` in class `BaseClass`

    - #### anySelected

          public java.lang.Boolean anySelected()

      Is anything in the list selected?
      Returns:
        true == at least one item is selected false == nothing at all is selected
      See Also:
        `Selection overview and related methods`

    - #### cellIsSelected

          public java.lang.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:
        `Selection overview and related methods`

    - #### deselectCell

          public java.lang.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:
        `Selection overview and related methods`

    - #### getSelectedRecord

          public ListGridRecord getSelectedRecord()

      Returns the first record that has any cells selected.
      Returns:
        first selected record, or null if nothing selected
      See Also:
        `Selection overview and related methods`

    - #### selectCell

          public java.lang.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:
        `Selection overview and related methods`

    - #### selectionChanged

          public void selectionChanged()

      Method called whenever the cell selection is modified
      See Also:
        `Selection overview and related methods`

    - #### selectSingleCell

          public java.lang.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:
        `Selection overview and related methods`

    - #### 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:
        `Selection overview and related methods`

    - #### deselectCellList

          public java.lang.Boolean deselectCellList()

      deselect an array of cells
      Returns:
        true == selection actually changed, false == no change
      See Also:
        `Selection overview and related methods`

    - #### deselectCellList

          public java.lang.Boolean deselectCellList(int[][] cells)

    - #### selectCellList

          public java.lang.Boolean selectCellList()

      select an array of cells
      Returns:
        true == selection actually changed, false == no change
      See Also:
        `Selection overview and related methods`

    - #### selectCellList

          public java.lang.Boolean selectCellList(int[][] cells)