org.opensha.commons.param.editor.impl
Class ArbitrarilyDiscretizedFuncTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.opensha.commons.param.editor.impl.ArbitrarilyDiscretizedFuncTableModel
All Implemented Interfaces:
Serializable, TableModel

public class ArbitrarilyDiscretizedFuncTableModel
extends AbstractTableModel

See Also:
Serialized Form

Field Summary
protected  boolean D
           
static Color disabledColor
           
static DecimalFormat format
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ArbitrarilyDiscretizedFuncTableModel(ArbitrarilyDiscretizedFunc func)
           
 
Method Summary
 void addPoint(double x, double y)
           
static boolean areFunctionPointsEqual(ArbitrarilyDiscretizedFunc func1, ArbitrarilyDiscretizedFunc func2)
           
 Class<?> getColumnClass(int c)
           
 int getColumnCount()
           
 String getColumnName(int column)
           
 ArbitrarilyDiscretizedFunc getFunction()
           
 org.opensha.commons.param.editor.impl.ArbitrarilyDiscretizedFuncTableModel.ArbitrarilyDiscretizedFuncTableCellRenderer getRenderer()
           
 int getRowCount()
           
 Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int row, int col)
           
 void removePoint(int index)
           
 void removePoints(int[] indexes)
           
 void setEnabled(boolean isEnabled)
           
 void setValueAt(Object aValue, int rowIndex, int columnIndex)
          This empty implementation is provided so users don't have to implement this method if their data model is not editable.
 void setXEditable(boolean xEditable)
           
 void updateData(ArbitrarilyDiscretizedFunc newFunc)
           
 
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

D

protected boolean D

format

public static DecimalFormat format

disabledColor

public static final Color disabledColor
Constructor Detail

ArbitrarilyDiscretizedFuncTableModel

public ArbitrarilyDiscretizedFuncTableModel(ArbitrarilyDiscretizedFunc func)
Method Detail

updateData

public void updateData(ArbitrarilyDiscretizedFunc newFunc)

areFunctionPointsEqual

public static boolean areFunctionPointsEqual(ArbitrarilyDiscretizedFunc func1,
                                             ArbitrarilyDiscretizedFunc func2)

getFunction

public ArbitrarilyDiscretizedFunc getFunction()

getColumnCount

public int getColumnCount()

setXEditable

public void setXEditable(boolean xEditable)

getRowCount

public int getRowCount()

getColumnName

public String getColumnName(int column)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

removePoint

public void removePoint(int index)

removePoints

public void removePoints(int[] indexes)

addPoint

public void addPoint(double x,
                     double y)

getColumnClass

public Class<?> getColumnClass(int c)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

setEnabled

public void setEnabled(boolean isEnabled)

setValueAt

public void setValueAt(Object aValue,
                       int rowIndex,
                       int columnIndex)
This empty implementation is provided so users don't have to implement this method if their data model is not editable.

Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class AbstractTableModel
Parameters:
aValue - value to assign to cell
rowIndex - row of cell
columnIndex - column of cell

getRenderer

public org.opensha.commons.param.editor.impl.ArbitrarilyDiscretizedFuncTableModel.ArbitrarilyDiscretizedFuncTableCellRenderer getRenderer()