org.eclipse.nebula.widgets.nattable.selection
Class RowSelectionModel<R>
java.lang.Object
org.eclipse.nebula.widgets.nattable.selection.RowSelectionModel<R>
- All Implemented Interfaces:
- IRowSelectionModel<R>, ISelectionModel
public class RowSelectionModel<R>
- extends Object
- implements IRowSelectionModel<R>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
selectionLayer
protected final SelectionLayer selectionLayer
rowDataProvider
protected final IRowDataProvider<R> rowDataProvider
rowIdAccessor
protected final IRowIdAccessor<R> rowIdAccessor
selectedRows
protected Map<Serializable,R> selectedRows
lastSelectedRange
protected org.eclipse.swt.graphics.Rectangle lastSelectedRange
lastSelectedRowIds
protected Set<Serializable> lastSelectedRowIds
selectionsLock
protected final ReadWriteLock selectionsLock
RowSelectionModel
public RowSelectionModel(SelectionLayer selectionLayer,
IRowDataProvider<R> rowDataProvider,
IRowIdAccessor<R> rowIdAccessor)
RowSelectionModel
public RowSelectionModel(SelectionLayer selectionLayer,
IRowDataProvider<R> rowDataProvider,
IRowIdAccessor<R> rowIdAccessor,
boolean multipleSelectionAllowed)
isMultipleSelectionAllowed
public boolean isMultipleSelectionAllowed()
- Specified by:
isMultipleSelectionAllowed in interface ISelectionModel
setMultipleSelectionAllowed
public void setMultipleSelectionAllowed(boolean multipleSelectionAllowed)
- Specified by:
setMultipleSelectionAllowed in interface ISelectionModel
addSelection
public void addSelection(int columnPosition,
int rowPosition)
- Specified by:
addSelection in interface ISelectionModel
addSelection
public void addSelection(org.eclipse.swt.graphics.Rectangle range)
- Specified by:
addSelection in interface ISelectionModel
clearSelection
public void clearSelection()
- Specified by:
clearSelection in interface ISelectionModel
clearSelection
public void clearSelection(int columnPosition,
int rowPosition)
- Specified by:
clearSelection in interface ISelectionModel
clearSelection
public void clearSelection(org.eclipse.swt.graphics.Rectangle removedSelection)
- Specified by:
clearSelection in interface ISelectionModel
clearSelection
public void clearSelection(R rowObject)
- Description copied from interface:
IRowSelectionModel
- Removes the selected row object from the selection
- Specified by:
clearSelection in interface IRowSelectionModel<R>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface ISelectionModel
getSelections
public List<org.eclipse.swt.graphics.Rectangle> getSelections()
- Specified by:
getSelections in interface ISelectionModel
isCellPositionSelected
public boolean isCellPositionSelected(int columnPosition,
int rowPosition)
- Specified by:
isCellPositionSelected in interface ISelectionModel
getSelectedColumnPositions
public int[] getSelectedColumnPositions()
- Specified by:
getSelectedColumnPositions in interface ISelectionModel
isColumnPositionSelected
public boolean isColumnPositionSelected(int columnPosition)
- Specified by:
isColumnPositionSelected in interface ISelectionModel
getFullySelectedColumnPositions
public int[] getFullySelectedColumnPositions(int fullySelectedColumnRowCount)
- Specified by:
getFullySelectedColumnPositions in interface ISelectionModel
- Parameters:
fullySelectedColumnRowCount - the number of rows in a fully selected column
isColumnPositionFullySelected
public boolean isColumnPositionFullySelected(int columnPosition,
int fullySelectedColumnRowCount)
- Specified by:
isColumnPositionFullySelected in interface ISelectionModel
fullySelectedColumnRowCount - the number of rows in a fully selected column
getSelectedRowObjects
public List<R> getSelectedRowObjects()
- Description copied from interface:
IRowSelectionModel
- Expose the underlying row objects
- Specified by:
getSelectedRowObjects in interface IRowSelectionModel<R>
- Returns:
- The selected row objects.
getSelectedRowCount
public int getSelectedRowCount()
- Specified by:
getSelectedRowCount in interface ISelectionModel
getSelectedRowPositions
public Set<Range> getSelectedRowPositions()
- Specified by:
getSelectedRowPositions in interface ISelectionModel
isRowPositionSelected
public boolean isRowPositionSelected(int rowPosition)
- Specified by:
isRowPositionSelected in interface ISelectionModel
getFullySelectedRowPositions
public int[] getFullySelectedRowPositions(int rowWidth)
- Specified by:
getFullySelectedRowPositions in interface ISelectionModel
- Parameters:
rowWidth - the number of columns in a fully selected row
isRowPositionFullySelected
public boolean isRowPositionFullySelected(int rowPosition,
int rowWidth)
- Specified by:
isRowPositionFullySelected in interface ISelectionModel
Copyright © 2014. All rights reserved.