UNICORE Resource Broker Client Plugin
1.5α1

org.eurogrid.broker.client
Class SettingsTableModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--org.eurogrid.broker.client.SettingsTableModel
All Implemented Interfaces:
Serializable, TableModel

public class SettingsTableModel
extends AbstractTableModel

Table Model used to represent the User's preset brokering Vsites

Version:
$Revision: 1.6 $, $Date: 2004/02/17 11:32:40 $
Author:
Jon MacLaren
See Also:
Serialized Form

Field Summary
static int COLUMN_COUNT
          Number of columns in the table.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
SettingsTableModel()
          Make a new table.
 
Method Summary
 void addUsitesAndVsites(List usites, List vsites, Map vsiteToUsiteMap)
          Add the Usites and Vsites to the current lists
 Class getColumnClass(int columnIndex)
          Fetch the class of a particular column
 int getColumnCount()
          Get the number of columns in the table
 String getColumnName(int column)
          Fetch the name of a particular column
 int getRowCount()
          Get the number of rows in the table
 void getUsitesAndVsites(List usites, List vsites, Map vsiteToUsiteMap)
          Get the Usites and Vsites
 Object getValueAt(int rowIndex, int columnIndex)
          Fetch the value stored in a particular cell
 boolean isCellEditable(int rowIndex, int columnIndex)
          Test editability of a given cell
 void removeSelectedItems()
          Remove the selected rows
 void setSelectedRow(int row)
          Set the row that is selected
 void setTable(JTable table)
          Set the table
 void setUsitesAndVsites(List usites, List vsites, Map vsiteToUsiteMap)
          Set the Usites and Vsites
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMN_COUNT

public static final int COLUMN_COUNT
Number of columns in the table.

See Also:
Constant Field Values
Constructor Detail

SettingsTableModel

public SettingsTableModel()
Make a new table. Initialises the list of Usites and Vsites.

Method Detail

addUsitesAndVsites

public void addUsitesAndVsites(List usites,
                               List vsites,
                               Map vsiteToUsiteMap)
Add the Usites and Vsites to the current lists

Parameters:
usites - The Usites
vsites - The Vsites
vsiteToUsiteMap - Map containing the Usites owning the Vsites

getColumnClass

public Class getColumnClass(int columnIndex)
Fetch the class of a particular column

Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel
Parameters:
columnIndex - The column of interest
Returns:
The Class object for the given column

getColumnCount

public int getColumnCount()
Get the number of columns in the table

Returns:
The number of columns

getColumnName

public String getColumnName(int column)
Fetch the name of a particular column

Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel
Parameters:
column - The column of interest
Returns:
The name of the column

getRowCount

public int getRowCount()
Get the number of rows in the table

Returns:
The number of rows

getUsitesAndVsites

public void getUsitesAndVsites(List usites,
                               List vsites,
                               Map vsiteToUsiteMap)
Get the Usites and Vsites

Parameters:
usites - List into which the Usites will be added
vsites - List into which the Vsites will be added
vsiteToUsiteMap - Map containing the Usites owning the Vsites

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Fetch the value stored in a particular cell

Parameters:
rowIndex - The row of interest
columnIndex - The column of interest
Returns:
The value of the cell

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Test editability of a given cell

Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel
Parameters:
rowIndex - Row of interest
columnIndex - Column of interest
Returns:
Is the cell editable? Always false.

removeSelectedItems

public void removeSelectedItems()
Remove the selected rows


setSelectedRow

public void setSelectedRow(int row)
Set the row that is selected

Parameters:
row - The selected row

setTable

public void setTable(JTable table)
Set the table

Parameters:
table - The table

setUsitesAndVsites

public void setUsitesAndVsites(List usites,
                               List vsites,
                               Map vsiteToUsiteMap)
Set the Usites and Vsites

Parameters:
usites - The Usites
vsites - The Vsites
vsiteToUsiteMap - Map containing the Usites owning the Vsites

UNICORE Resource Broker Client Plugin
1.5α1

Submit a bug or feature
Copyright © 2002-2004 University of Manchester, U.K. See license.terms for details.