All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.table
Class CellVectorSelection

    com.sas.table.CellVectorSelection

All Implemented Interfaces:
  com.sas.beans.PropertyChangeSource, com.sas.collection.ContentsChangedSource, StaticCollectionInterface, SelectionInterface, StaticSelectionInterface, com.sas.PublicClonable, TableElementInterface, com.sas.util.Countable, com.sas.util.Enumerable, java.lang.Cloneable

Direct Known Subclasses:
  ColumnSelection, RowSelection

    public abstract class CellVectorSelection

Defines an abstract base class for representing TableView column and row selections.

See Also:
  `Selection`, `CellSelection`, `ColumnSelection`, `RowSelection`

Field Summary

Fields inherited from interface com.sas.table.TableElementInterface
`REFRESH_ALL, REFRESH_DATA, REFRESH_DATA_STYLE, REFRESH_LABEL, REFRESH_LABEL_STYLE, REFRESH_STYLE`

Constructor Summary
`CellVectorSelection(CellVector anchor)` Alias for `CellVectorSelection(anchor, anchor)`.
`CellVectorSelection(CellVector anchor, CellVector end)` Constructs a new selection with the given extent.

Method Summary
`boolean` | `contains(java.lang.Object item)` Test for the presence of an item in the selection.
`int` | `count()` Returns the number of items in the selection.
`CellSelection` | `getCells()` Returns the set of cells associated with this selection; only data cells, not labels, are included.
`java.util.Enumeration` | `getItems()` Returns an enumeration of all the items in the selection.
`protected void` | `onEndChanged(TableElement oldValue, TableElement newValue)` Called by `setEnd()` to notify subclasses of a change to the end.

Methods inherited from class com.sas.table.Selection
`addContentsChangedListener, addPropertyChangeListener, apply, clone, fireContentsChanged, firePropertyChange, firePropertyChange, getAnchor, getDisplayedBounds, getEnd, getTableView, isDisplayed, isModified, isSelected, newSelection, refresh, removeContentsChangedListener, removePropertyChangeListener, repaint, setEnd`

Constructor Detail

### CellVectorSelection

    public CellVectorSelection(CellVector anchor)

  Alias for `CellVectorSelection(anchor, anchor)`.

  Parameters:
    `anchor` - The value to assign the anchor property.

### CellVectorSelection

    public CellVectorSelection(CellVector anchor,
                               CellVector end)

  Constructs a new selection with the given extent.

  Parameters:
    `anchor` - The value to assign the anchor property.
    `end` - The value to assign the end property.
  See Also:
    `Selection.getAnchor()`, `Selection.getEnd()`

Method Detail

### contains

    public boolean contains(java.lang.Object item)

  Test for the presence of an item in the selection.

  Specified by:
    `contains` in interface `StaticCollectionInterface`
  Specified by:
    `contains` in interface `StaticSelectionInterface`
  Specified by:
    `contains` in class `Selection`
  Parameters:
    `item` - The item to search for.
  Returns:
    `true` if the selection contains the item and `false` otherwise.
  Throws:
    `java.lang.ClassCastException` - If item is not a CellVector.

### count

    public int count()

  Returns the number of items in the selection.

  Specified by:
    `count` in interface `com.sas.util.Countable`
  Specified by:
    `count` in class `Selection`
  Returns:
    The number of items in the selection.

### getCells

    public CellSelection getCells()

  Returns the set of cells associated with this selection; only data cells, not labels, are included.

  Returns:
    A CellSelection representing the set of cells, if any; otherwise `null` will be returned.

### getItems

    public java.util.Enumeration getItems()

  Returns an enumeration of all the items in the selection.

  Specified by:
    `getItems` in interface `com.sas.util.Enumerable`
  Specified by:
    `getItems` in class `Selection`
  Returns:
    An enumeration of the selection's items.

### onEndChanged

    protected void onEndChanged(TableElement oldValue,
                                TableElement newValue)

  Called by `setEnd()` to notify subclasses of a change to the end. Overrides super to fire a SelectionChangedEvent.

  Overrides:
    `onEndChanged` in class `Selection`
  Parameters:
    `oldValue` - The previous value of end.
    `newValue` - The current value of end.
  See Also:
    `Selection.setEnd(java.lang.Object)`, `Selection.fireContentsChanged(com.sas.collection.ContentsChangedEvent)`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.