Package uk.ac.starlink.vo
Class ResourceTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
uk.ac.starlink.util.gui.ArrayTableModel<RegResource>
uk.ac.starlink.vo.ResourceTableModel
- All Implemented Interfaces:
Serializable
,TableModel
TableModel in which each row represents a
RegResource
.- Since:
- 18 Dec 2008
- Author:
- Mark Taylor
- See Also:
-
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a ResourceTableModel with no AccessRef column.ResourceTableModel
(boolean includeAcref) Constructs a ResourceTableModel with an optional AccessRef column. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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
-
Constructor Details
-
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. IfincludeAcref
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 Details
-
setResources
Sets the data for this table.- Parameters:
resources
- resource array
-
getResources
Returns the data array for this table.- Returns:
- resource array
-