|
UNICORE Resource Broker Client Plugin 1.5α1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.table.AbstractTableModel | +--org.eurogrid.broker.client.OfferTableModel
Table Model class for the Offers returned by the Broker
BrokerOffer
,
Serialized FormNested Class Summary | |
static class |
OfferTableModel.Comparison
Used in constructing broker-offer comparison policies. |
Field Summary | |
static int |
COLUMN_COUNT
Number of columns in the table |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
OfferTableModel()
|
|
OfferTableModel(Map vsiteToUsiteMap)
|
|
OfferTableModel(OfferTableModel.Comparison[] policy)
|
|
OfferTableModel(OfferTableModel.Comparison[] policy,
Map vsiteToUsiteMap,
String currency)
Create the empty list of offers. |
Method Summary | |
void |
addCurrencyMap(Element currencyDOM)
|
void |
addCurrencyMap(String currencyXML)
|
void |
addCurrencyMap(String from,
String to,
double factor)
Add a currency conversion factor to this class's internal map. |
void |
addOffer(BrokerOffer offer)
Add a new offer to the table |
double |
convert(double cost,
String currency)
Convert the given cost in the given currency into the user's preferred currency. |
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 |
boolean |
getRowValidity(int rowIndex)
Fetch the validty of the offer stored in a particular row |
BrokerOffer |
getSelectedOffer()
Return the selected offer |
String |
getTargetCurrency()
Get the user's preferred currency for displaying costs. |
Object |
getValueAt(int rowIndex,
int columnIndex)
Fetch the value stored in a particular cell |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Test the editability of a given cell |
void |
setComparisonPolicy(OfferTableModel.Comparison[] policy)
Set the offer comparison policy for this table model. |
void |
setSelectedRow(int row)
Set the row that is selected |
void |
setTargetCurrency(String targetCurrency)
Set the user's preferred currency for displaying costs. |
void |
sortByColumn(int column)
Called when the user clicks on a column header to perform simple sorting by that column. |
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 |
public static final int COLUMN_COUNT
Constructor Detail |
public OfferTableModel()
public OfferTableModel(Map vsiteToUsiteMap)
public OfferTableModel(OfferTableModel.Comparison[] policy)
public OfferTableModel(OfferTableModel.Comparison[] policy, Map vsiteToUsiteMap, String currency)
Method Detail |
public void addCurrencyMap(Element currencyDOM)
public void addCurrencyMap(String currencyXML)
public void addCurrencyMap(String from, String to, double factor)
from
- Which currency are we going from.to
- Which currency are we going to.factor
- Multiplication factor to apply when going from one to the other.public void addOffer(BrokerOffer offer)
offer
- The new offerpublic double convert(double cost, String currency)
cost
- Numeric cost.currency
- Units of the numeric cost.public Class getColumnClass(int columnIndex)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
columnIndex
- The column of interest
public int getColumnCount()
public String getColumnName(int column)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
column
- The column of interest
public int getRowCount()
public boolean getRowValidity(int rowIndex)
rowIndex
- The row of interest
public BrokerOffer getSelectedOffer()
public String getTargetCurrency()
public Object getValueAt(int rowIndex, int columnIndex)
rowIndex
- The row of interestcolumnIndex
- The column of interest
public boolean isCellEditable(int rowIndex, int columnIndex)
isCellEditable
in interface TableModel
isCellEditable
in class AbstractTableModel
rowIndex
- The row of interestcolumnIndex
- The column of interest
public void setComparisonPolicy(OfferTableModel.Comparison[] policy)
policy
- Array of policies to install, with comparisons being done by
the policy of the first array element, and if that two
elements are equal by that, comparing by the second element,
and if equal by that, comparing by the third, etc.public void setSelectedRow(int row)
row
- The selected rowpublic void setTargetCurrency(String targetCurrency)
targetCurrency
- Currency string, or null if the raw costings are to be
used instead.public void sortByColumn(int column)
|
UNICORE Resource Broker Client Plugin 1.5α1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |