Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/grid/enhanced/plugins/Selector.js

  • Provides:

    • dojox.grid.enhanced.plugins.Selector
  • Requires:

    • dojox.grid.enhanced._Plugin in common
    • dojox.grid.enhanced.plugins.AutoScroll in common
    • dojox.grid.cells._base in common
  • __SelectItem

    • type
      Function
    • summary
      An abstract representation of an item.
  • __SelectCellItem

    • type
      Function
    • chains:
      • __SelectItem: (prototype)
      • __SelectItem: (call)
    • summary
      An abstract representation of a cell.
  • __SelectCellItem.row

    • type
      Integer
    • summary
      Row index of this cell
  • __SelectCellItem.col

    • type
      Integer
    • summary
      Column index of this cell
  • __SelectRowItem

    • type
      Function
    • chains:
      • __SelectItem: (prototype)
      • __SelectItem: (call)
    • summary
      An abstract representation of a row.
  • __SelectRowItem.row

    • type
      Integer
    • summary
      Row index of this row
  • __SelectRowItem.except

    • type
      Integer[]
    • summary
      An array of column indexes of all the unselected cells in this row.
  • __SelectColItem

    • type
      Function
    • chains:
      • __SelectItem: (prototype)
      • __SelectItem: (call)
    • summary
      An abstract representation of a column.
  • __SelectColItem.col

    • type
      Integer
    • summary
      Column index of this column
  • __SelectColItem.except

    • type
      Integer[]
    • summary
      An array of row indexes of all the unselected cells in this column.
  • dojox.grid.enhanced.plugins.Selector

    • type
      Function
    • chains:
      • dojox.grid.enhanced._Plugin: (prototype)
      • dojox.grid.enhanced._Plugin: (call)
    • parameters:
      • grid
      • args
    • summary
      Provides standard extended selection for grid.
      Supports mouse/keyboard selection, multi-selection, and de-selection.
      Acceptable plugin parameters:
      The whole plugin parameter object is a config object passed to the setupConfig function.
      
      Acceptable cell parameters defined in layout:
      1. notselectable: boolean
      Whether this column is (and all the cells in it are) selectable.
  • dojox.grid.enhanced.plugins.Selector.name

    • type
      String
    • summary
      plugin name
      
      
      //	_config: null,
      //	_enabled: true,
      //	_selecting: {
      //		row: false,
      //		col: false,
      //		cell: false
      //	},
      //	_selected: {
      //		row: [],
      //		col: [],
      //		cell: []
      //	},
      //	_startPoint: {},
      //	_currentPoint: {},
      //	_lastAnchorPoint: {},
      //	_lastEndPoint: {},
      //	_lastSelectedAnchorPoint: {},
      //	_lastSelectedEndPoint: {},
      //	_keyboardSelect: {
      //		row: 0,
      //		col: 0,
      //		cell: 0
      //	},
      //	_curType: null,
      //	_lastType: null,
      //	_usingKeyboard: false,
      //	_toSelect: true,
  • dojox.grid.enhanced.plugins.Selector.constructor

    • constructor - constructor
    • type
      Function
    • parameters:
      • grid
      • args
  • dojox.grid.enhanced.plugins.Selector.destroy

    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.setupConfig

    • parameters:
      • config: (typeof Object)
        An object with the following structure (all properties are optional):
        {
        //Default is "multi", all other values are same as "multi".
        row: false|"disabled"|"single",
        col: false|"disabled"|"single",
        cell: false|"disabled"|"single"
        }
    • summary
      Set selection mode for row/col/cell.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.isSelected

    • parameters:
      • type: (typeof String)
        "row" or "col" or "cell"
      • rowIndex: (typeof Integer)
        If type is "row" or "cell", this is the row index.
        If type if "col", this is the column index.
      • colIndex: (typeof Integer)
        Only valid when type is "cell"
        return: Boolean
        true if selected, false if not. If cell is covered by a selected column, it's selected.
    • summary
      Check whether a location (a cell, a column or a row) is selected.
      tag:
      public
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.toggleSelect

    • parameters:
      • type
      • rowIndex
      • colIndex
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.select

    • parameters:
      • type: (typeof String)
        "row" or "col" or "cell"
      • rowIndex: (typeof Integer)
        If type is "row" or "cell", this is the row index.
        If type if "col", this is the column index.
      • colIndex: (typeof Integer)
        Only valid when type is "cell"
    • summary
      Select a location (a cell, a column or a row).
      tag:
      public
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.deselect

    • parameters:
      • type
      • rowIndex
      • colIndex
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.selectRange

    • parameters:
      • type: (typeof String)
        "row" or "col" or "cell"
      • start: (typeof Integer)
        | Object
        If type is "row" or "col", this is the index of the starting row or column.
        If type if "cell", this is the left-top cell of the range.
      • end: (typeof Integer)
        | Object
        If type is "row" or "col", this is the index of the ending row or column.
        If type if "cell", this is the right-bottom cell of the range.
      • toSelect
    • summary
      Select a continuous range (a block of cells, a set of continuous columns or rows)
      tag:
      public
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid._selectingRange

    • type
      bool
  • dojox.grid.enhanced.plugins.Selector.clear

    • parameters:
      • type: (typeof String)
        "row" or "col" or "cell". If omitted, clear all.
    • summary
      Clear all selections.
      tag:
      public
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.isSelecting

    • parameters:
      • type: (typeof String)
        "row" or "col" or "cell"
        return: Boolean
        true if is selection, false otherwise.
    • summary
      Check whether the user is currently selecting something.
      tag:
      public
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.selectEnabled

    • parameters:
      • toEnable: (typeof Boolean)
        To enable or not. Optional.
        return: Boolean | undefined
        Enabled or not.
    • summary
      Turn on/off this selection functionality if *toEnable* is provided.
      Check whether this selection functionality is enabled if nothing is passed in.
      tag:
      public
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._enabled

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector.getSelected

    • parameters:
      • type: (typeof String)
        "row" or "col" or "cell"
      • includeExceptions: (typeof Boolean)
        Only meaningful for rows/columns. If true, all selected rows/cols, even they are partly selected, are all returned.
        return: __SelectItem[]
    • summary
      Get an array of selected locations.
      tag:
      public
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.getSelectedCount

    • parameters:
      • type: (typeof String)
        "row" or "col" or "cell"
      • includeExceptions: (typeof Boolean)
        Only meaningful for rows/columns. If true, all selected rows/cols, even they are partly selected, are all returned.
        return: Integer
        The number of selected items.
    • summary
      Get the number of selected items.
      tag:
      public
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.getSelectedType

    • summary
      Get the type of selected items.
      tag:
      public
      return: String
      "row" or "col" or "cell", or any mix of these (separator is | ).
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._selected

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector.getLastSelectedRange

    • parameters:
      • type
    • summary
      Get last selected range of the given type.
      tag:
      public
      return: Object
      {start: __SelectItem, end: __SelectItem}
      return null if nothing is selected.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._hacks

    • summary
      Complete the event system of grid, hack some grid functions to prevent default behavior.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid

  • dojox.grid.enhanced.plugins.Selector.grid.selection.clickSelect

    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._oldDeselectAll

  • dojox.grid.enhanced.plugins.Selector.grid.selection.selectRange

    • parameters:
      • from
      • to
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid.selection.deselectRange

    • parameters:
      • from
      • to
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid.selection.deselectAll

    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid.views.views.0

  • dojox.grid.enhanced.plugins.Selector.grid.views.views.0.doStyleRowNode

    • parameters:
      • inRowIndex
      • inRowNode
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._mixinGrid

    • summary
      Expose events to grid.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid.setupSelectorConfig

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector.grid.onStartSelect

    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid.onEndSelect

    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid.onStartDeselect

    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid.onEndDeselect

    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid.onSelectCleared

    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._initEvents

    • summary
      Connect events, create event handlers.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._onSelectedById

    • parameters:
      • id
      • newIndex
      • isSelected
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.onSetStore

    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._onInternalRearrange

    • parameters:
      • type
      • mapping
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid.layout.cells

  • dojox.grid.enhanced.plugins.Selector._onExternalChange

    • parameters:
      • type
      • target
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._refresh

    • parameters:
      • type
      • toHighlight
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._refreshSelected

    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._initAreas

    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid.focus

  • dojox.grid.enhanced.plugins.Selector._lastFocusedRowBarIdx

    • type
      Number
  • dojox.grid.enhanced.plugins.Selector._clearSelection

    • parameters:
      • type: (typeof String)
        "row", "col", or "cell
      • reservedItem: (typeof __SelectItem)
        The item to retain highlight.
    • summary
      Clear selection for given type and fire events, but retain the highlight for *reservedItem*,
      thus avoid "flashing".
      tag:
      private
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._isUsingRowSelector

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector.grid.selection._selectedById

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector._startSelect

    • parameters:
      • type: (typeof String)
        "row", "col", or "cell"
      • start: (typeof __SelectItem)
        The start point
      • extending: (typeof Boolean)
        Whether this is a multi selection
      • isRange: (typeof Boolean)
        Whether this is a range selection (i.e. select from the last end point to this point)
      • mandatarySelect: (typeof Boolean)
        If true, toSelect will be same as the original selection status.
      • toSelect
    • summary
      Start selection, setup start point and current point, fire events.
      tag:
      private
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._toSelect

  • dojox.grid.enhanced.plugins.Selector._curType

  • dojox.grid.enhanced.plugins.Selector._isStartFocus

    • type
      bool
  • dojox.grid.enhanced.plugins.Selector._endSelect

    • parameters:
      • type: (typeof String)
        "row", "col", or "cell"
    • summary
      End selection. Keep records, fire events and cleanup status.
      tag:
      private
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._lastType

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector._fireEvent

    • parameters:
      • evtName
      • type
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._calcToHighlight

    • parameters:
      • type
      • target
      • toHighlight
      • toSelect
    • summary
      Calculate what status should *target* have.
      If *toSelect* is not provided, this is a no op.
      This function is time-critical!!
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._highlightNode

    • parameters:
      • node
      • toHighlight
    • summary
      Do the actual highlight work.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._highlightHeader

    • parameters:
      • colIdx
      • toHighlight
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._highlightRowSelector

    • parameters:
      • rowIdx
      • toHighlight
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._highlightSingle

    • parameters:
      • type
      • toHighlight
      • target
      • toSelect
      • isRefresh
    • summary
      Highlight a single item.
      This function is time critical!!
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._selectedRowModified

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector._highlight

    • parameters:
      • type
      • target
      • toSelect: (typeof Boolean)
        Whether we are selecting or deselecting.
        This function is time critical!!
    • summary
      Highlight from start point to target.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._focusPoint

    • parameters:
      • type
      • point
    • summary
      Focus the current point, so when you move mouse, the focus indicator follows you.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector.grid.focus._colHeadFocusIdx

  • dojox.grid.enhanced.plugins.Selector._blurPoint

    • parameters:
      • type
      • point
    • summary
      Blur the current point.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._addToSelected

    • parameters:
      • type
    • summary
      Record the selected items.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._forEach

    • parameters:
      • type
      • start
      • end
      • func
      • halfClose
    • summary
      Go through items from *start* point to *end* point.
      This function is time critical!!
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._makeupForExceptions

    • parameters:
      • type
      • newCellItems
    • summary
      When new cells is selected, maybe they will fill in the "holes" in selected rows and columns.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._makeupForCells

    • parameters:
      • type
      • newItems
    • summary
      When some rows/cols are selected, maybe they can cover some of the selected cells,
      and fill some of the "holes" in the selected cols/rows.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._addException

    • parameters:
      • type
      • items
    • summary
      If some rows/cols are deselected, maybe they have created "holes" in selected cols/rows.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._addCellException

    • parameters:
      • type
      • items
    • summary
      If some cells are deselected, maybe they have created "holes" in selected rows/cols.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._add

    • parameters:
      • type
      • items
    • summary
      Add to the selection record.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._remove

    • parameters:
      • type
      • items
    • summary
      Remove from the selection record.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._isCellNotInExcept

    • parameters:
      • type
      • item
    • summary
      Return true only when a cell is covered by selected row/col, and its not a "hole".
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._isSelected

    • parameters:
      • type
      • item
    • summary
      Return true when the item is selected. (or logically selected, i.e, covered by a row/col).
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._isInLastRange

    • parameters:
      • type
      • item
      • isSelected
    • summary
      Return true only when the item is in the last seletion/deseletion range.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._isValid

    • parameters:
      • type
      • item
      • allowNotSelectable
    • summary
      Check whether the item is a valid __SelectItem for the given type.
    • type
      Function
  • dojox.grid.enhanced.plugins.Selector._config

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector._config.row

  • dojox.grid.enhanced.plugins.Selector._selecting

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector._startPoint

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector._currentPoint

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector._lastAnchorPoint

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector._lastEndPoint

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector._lastSelectedAnchorPoint

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector._lastSelectedEndPoint

    • type
      Object
  • dojox.grid.enhanced.plugins.Selector._keyboardSelect

    • type
      Object
  • dojox.grid.enhanced.plugins

    • type
      Object
  • dojox.grid.enhanced

    • type
      Object
  • dojox.grid

    • type
      Object
  • dojox

    • type
      Object