uk.ac.starlink.vo
Class ResourceTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by uk.ac.starlink.util.gui.ArrayTableModel
          extended by uk.ac.starlink.vo.ResourceTableModel
All Implemented Interfaces:
Serializable, TableModel

public class ResourceTableModel
extends ArrayTableModel

TableModel in which each row represents a RegResource.

Since:
18 Dec 2008
Author:
Mark Taylor
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ResourceTableModel()
          Constructs a ResourceTableModel with no AccessRef column.
ResourceTableModel(boolean includeAcref)
          Constructs a ResourceTableModel with an optional AccessRef column.
 
Method Summary
 RegResource[] getResources()
          Returns the data array for this table.
 void setResources(RegResource[] resources)
          Sets the data for this table.
 
Methods inherited from class uk.ac.starlink.util.gui.ArrayTableModel
getColumnClass, getColumnCount, getColumnName, getColumns, getItems, getRowCount, getValueAt, setColumns, setItems, sortByColumn
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceTableModel

public ResourceTableModel()
Constructs a ResourceTableModel with no AccessRef column.


ResourceTableModel

public ResourceTableModel(boolean includeAcref)
Constructs a ResourceTableModel with an optional AccessRef column. This is a bit problematic - there is not a formal 1:1 relationship between RegResources, which is what are displayed per-row in this table, and RegCapabilityInterfaces, which are what host AccessRefs (a.k.a. Service URLs). In many cases however, the relationship is in fact 1:1. If includeAcref is set true, a column is added for this information, and it's populated only in the cases where a 1:1 relationship does actually hold.

Parameters:
includeAcref - true if the access ref column is to be included
Method Detail

setResources

public void setResources(RegResource[] resources)
Sets the data for this table.

Parameters:
resources - resource array

getResources

public RegResource[] getResources()
Returns the data array for this table.

Returns:
resource array


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.