de.jaret.util.ui.table.model
Class JaretTableSelectionImpl

java.lang.Object
  extended by de.jaret.util.ui.table.model.JaretTableSelectionImpl
All Implemented Interfaces:
IJaretTableSelection

public class JaretTableSelectionImpl
extends java.lang.Object
implements IJaretTableSelection

Implementation of the JaretTableSelection.

Version:
$Id: JaretTableSelectionImpl.java 179 2007-01-07 17:37:50Z olk $
Author:
Peter Kliem

Field Summary
protected  java.util.List<IJaretTableCell> _cells
          selected cells.
protected  java.util.List<IColumn> _columns
          selected columns.
protected  java.util.List<IRow> _rows
          selected rows.
 
Constructor Summary
JaretTableSelectionImpl()
           
 
Method Summary
 void addCell(IJaretTableCell cell)
          Add a cell to the selection.
 void addColumn(IColumn column)
          Add a acolumn to the selection.
 void addRow(IRow row)
          Add a row to the selection.
 void clear()
          Clear the selection.
 java.util.Set<IJaretTableCell> getAllSelectedCells(IJaretTableModel model)
          Retrieve a set of all selected cells (union of all cells in selected rows and columns plus. the cells selected seperately)
 java.util.List<IJaretTableCell> getSelectedCells()
          Retrieve cells that have been selected seperately.
 java.util.List<IColumn> getSelectedColumns()
          Retrieve selected Columns.
 java.util.List<IRow> getSelectedRows()
          Retrieve selected rows.
 boolean isEmpty()
          Check if something is selected.
 void remCell(IJaretTableCell cell)
          Remove a cell from the selection.
 void remColumn(IColumn column)
          Remove column from the selection.
 void remRow(IRow row)
          Remove row from selection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rows

protected java.util.List<IRow> _rows
selected rows.


_columns

protected java.util.List<IColumn> _columns
selected columns.


_cells

protected java.util.List<IJaretTableCell> _cells
selected cells.

Constructor Detail

JaretTableSelectionImpl

public JaretTableSelectionImpl()
Method Detail

clear

public void clear()
Clear the selection.

Specified by:
clear in interface IJaretTableSelection

getSelectedRows

public java.util.List<IRow> getSelectedRows()
Retrieve selected rows.

Specified by:
getSelectedRows in interface IJaretTableSelection
Returns:
selected rows.

getSelectedColumns

public java.util.List<IColumn> getSelectedColumns()
Retrieve selected Columns.

Specified by:
getSelectedColumns in interface IJaretTableSelection
Returns:
selecetd columns

getSelectedCells

public java.util.List<IJaretTableCell> getSelectedCells()
Retrieve cells that have been selected seperately.

Specified by:
getSelectedCells in interface IJaretTableSelection
Returns:
List of JaretTableCells selected seperately

addRow

public void addRow(IRow row)
Add a row to the selection.

Specified by:
addRow in interface IJaretTableSelection
Parameters:
row - the row to add

remRow

public void remRow(IRow row)
Remove row from selection.

Specified by:
remRow in interface IJaretTableSelection
Parameters:
row - row to remove

addColumn

public void addColumn(IColumn column)
Add a acolumn to the selection.

Specified by:
addColumn in interface IJaretTableSelection
Parameters:
column - column to add

remColumn

public void remColumn(IColumn column)
Remove column from the selection.

Specified by:
remColumn in interface IJaretTableSelection
Parameters:
column - col to remove

addCell

public void addCell(IJaretTableCell cell)
Add a cell to the selection.

Specified by:
addCell in interface IJaretTableSelection
Parameters:
cell - cell to add

remCell

public void remCell(IJaretTableCell cell)
Remove a cell from the selection.

Specified by:
remCell in interface IJaretTableSelection
Parameters:
cell - cell to remove

isEmpty

public boolean isEmpty()
Check if something is selected.

Specified by:
isEmpty in interface IJaretTableSelection
Returns:
true if the selection is empty

getAllSelectedCells

public java.util.Set<IJaretTableCell> getAllSelectedCells(IJaretTableModel model)
Retrieve a set of all selected cells (union of all cells in selected rows and columns plus. the cells selected seperately)

Specified by:
getAllSelectedCells in interface IJaretTableSelection
Parameters:
model - is needed to determine all cells.
Returns:
Set of all selected cells.


Copyright © 2012. All Rights Reserved.