jigcell.compare.compare2
Class Compare2Model

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by jigcell.compare.ui.BasicTable.BasicTableModel
          extended by jigcell.compare.compare2.Compare2Model
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class Compare2Model
extends BasicTable.BasicTableModel

Table model for Compare^2.

This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.

Author:
Nicholas Allen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class jigcell.compare.ui.BasicTable.BasicTableModel
BasicTable.BasicTableModel.Marker
 
Field Summary
protected  boolean allowThresholdEdit
          Whether threholds can be edited
 BasicTable.BasicTableModel.Marker COLUMN_COMPARISONTYPE
          Comparison type column
 BasicTable.BasicTableModel.Marker COLUMN_NAME
          Name column
 BasicTable.BasicTableModel.Marker COLUMN_THRESHOLD
          Threshold column
protected  Compare compare
          Comparator for model users
protected  java.util.Map comparisonNames
          Map[IResultSetMap,String] of comparisons to the set name
protected  java.util.List comparisons
          List[IResultSetMap] of comparisons
protected  java.util.Map experimentComparisons
          Map[IDataGeneratorCollection.Key,String] of the keys of experiments to the comparison type
protected  java.util.List experimentNames
          List[IDataGeneratorCollection.Key] of the keys of results used in comparisons
protected  java.util.Map experimentThresholds
          Map[IDataGeneratorCollection.Key,String] of the keys of experiments to the threshold
protected  InterfaceBuilder manager
          Provides interface help for the view
static java.lang.String PROPERTY_EXPERIMENTTHRESHOLDS_EDIT
          Property key for changing an existing experiment threshold
static java.lang.String RESOURCE_EXPERIMENTCOMPARISONS
          Resource key for the list of available experiment comparison types
static java.lang.String RESOURCE_EXPERIMENTTHRESHOLDS
          Resource key for the list of available experiment thresholds
protected static java.lang.String THRESHOLD_EQUIVALENT
          Threshold display for equivalent values
static java.lang.String VALUE_NOVALUE
          Display value for a non-existent value
 
Fields inherited from class jigcell.compare.ui.BasicTable.BasicTableModel
columnWeights, markers
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
Compare2Model(Compare compare, java.util.List experimentNames, java.util.Map experimentComparisons, java.util.Map experimentThresholds, java.util.List comparisons, java.util.Map comparisonNames)
          Creates a new table model.
 
Method Summary
 void editCellAt(int row, int column)
          Starts editing a cell in the table.
 boolean getAllowThresholdEdit()
          Whether thresholds can be edited.
 int getColumnCount()
          The number of columns in the table.
 java.lang.String getColumnName(int column)
          The name of a column.
 ObjectiveSeriesView.Comparison getComparisonType(int row)
          Comparison type for a particular row.
 int getFixedColumnCount()
          The number of fixed columns in the table.
 int getRowCount()
          The number of generators.
 java.lang.String getThresholdValue(int row)
          Threshold value for a particular row.
 java.lang.Object getValueAt(int row, int column)
          A value in the table.
 boolean isCellEditable(int row, int column)
          Whether a value in the table is editable.
 boolean isDataColumn(int column)
          Whether a particular column contains a result set or a special value.
 void setAllowThresholdEdit(boolean allowThresholdEdit)
          Sets whether thresholds can be edited.
 void setValueAt(java.lang.Object value, int row, int column)
          Sets a value in the table.
 void updateColumnWeights()
          Adjusts the column weights for the current number of columns.
 void viewCellAt(int row, int column)
          Starts viewing a cell in the table but does not allow editing.
 
Methods inherited from class jigcell.compare.ui.BasicTable.BasicTableModel
fillRange, fillRangeAt, fillSelected, findColumn, getColumnClass, getColumnWeights, setColumnMarkers, setColumnWeights
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_EXPERIMENTTHRESHOLDS_EDIT

public static final java.lang.String PROPERTY_EXPERIMENTTHRESHOLDS_EDIT
Property key for changing an existing experiment threshold

See Also:
Constant Field Values

RESOURCE_EXPERIMENTCOMPARISONS

public static final java.lang.String RESOURCE_EXPERIMENTCOMPARISONS
Resource key for the list of available experiment comparison types

See Also:
Constant Field Values

RESOURCE_EXPERIMENTTHRESHOLDS

public static final java.lang.String RESOURCE_EXPERIMENTTHRESHOLDS
Resource key for the list of available experiment thresholds

See Also:
Constant Field Values

VALUE_NOVALUE

public static final java.lang.String VALUE_NOVALUE
Display value for a non-existent value

See Also:
Constant Field Values

THRESHOLD_EQUIVALENT

protected static final java.lang.String THRESHOLD_EQUIVALENT
Threshold display for equivalent values

See Also:
Constant Field Values

COLUMN_COMPARISONTYPE

public final BasicTable.BasicTableModel.Marker COLUMN_COMPARISONTYPE
Comparison type column


COLUMN_NAME

public final BasicTable.BasicTableModel.Marker COLUMN_NAME
Name column


COLUMN_THRESHOLD

public final BasicTable.BasicTableModel.Marker COLUMN_THRESHOLD
Threshold column


allowThresholdEdit

protected boolean allowThresholdEdit
Whether threholds can be edited


compare

protected Compare compare
Comparator for model users


manager

protected InterfaceBuilder manager
Provides interface help for the view


comparisons

protected java.util.List comparisons
List[IResultSetMap] of comparisons


experimentNames

protected java.util.List experimentNames
List[IDataGeneratorCollection.Key] of the keys of results used in comparisons


comparisonNames

protected java.util.Map comparisonNames
Map[IResultSetMap,String] of comparisons to the set name


experimentComparisons

protected java.util.Map experimentComparisons
Map[IDataGeneratorCollection.Key,String] of the keys of experiments to the comparison type


experimentThresholds

protected java.util.Map experimentThresholds
Map[IDataGeneratorCollection.Key,String] of the keys of experiments to the threshold

Constructor Detail

Compare2Model

public Compare2Model(Compare compare,
                     java.util.List experimentNames,
                     java.util.Map experimentComparisons,
                     java.util.Map experimentThresholds,
                     java.util.List comparisons,
                     java.util.Map comparisonNames)
Creates a new table model.

Method Detail

editCellAt

public void editCellAt(int row,
                       int column)
Starts editing a cell in the table.

Parameters:
row - Row
column - Column

getAllowThresholdEdit

public boolean getAllowThresholdEdit()
Whether thresholds can be edited.


getColumnCount

public int getColumnCount()
The number of columns in the table.

Specified by:
getColumnCount in interface javax.swing.table.TableModel
Overrides:
getColumnCount in class BasicTable.BasicTableModel

getColumnName

public java.lang.String getColumnName(int column)
The name of a column.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class BasicTable.BasicTableModel
Parameters:
column - Index of column

getComparisonType

public ObjectiveSeriesView.Comparison getComparisonType(int row)
Comparison type for a particular row.

Parameters:
row - Row

getFixedColumnCount

public int getFixedColumnCount()
The number of fixed columns in the table.


getRowCount

public int getRowCount()
The number of generators.


getThresholdValue

public java.lang.String getThresholdValue(int row)
Threshold value for a particular row.

Parameters:
row - Row

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
A value in the table.

Specified by:
getValueAt in interface javax.swing.table.TableModel
Overrides:
getValueAt in class BasicTable.BasicTableModel
Parameters:
row - Row
column - Column

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Whether a value in the table is editable.

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel
Parameters:
row - Row
column - Column

isDataColumn

public boolean isDataColumn(int column)
Whether a particular column contains a result set or a special value.

Parameters:
column - Column

setAllowThresholdEdit

public void setAllowThresholdEdit(boolean allowThresholdEdit)
Sets whether thresholds can be edited.

Parameters:
allowThresholdEdit - Can edit

setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int column)
Sets a value in the table.

Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel
Parameters:
value - Value
row - Row
column - Column

updateColumnWeights

public void updateColumnWeights()
Adjusts the column weights for the current number of columns.


viewCellAt

public void viewCellAt(int row,
                       int column)
Starts viewing a cell in the table but does not allow editing.

Parameters:
row - Row
column - Column