medusa.graphedit
Class EdgeTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- medusa.graphedit.EdgeTableModel
-
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.table.TableModel
- Direct Known Subclasses:
- NodeTableModel
public class EdgeTableModel extends javax.swing.table.AbstractTableModel- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description java.lang.String[]columnNames
-
Constructor Summary
Constructors Constructor and Description EdgeTableModel()EdgeTableModel(Graph g)Creates a new instance of EdgeTableModel
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.ClassgetColumnClass(int columnIndex)ReturnsObject.classregardless ofcolumnIndex.intgetColumnCount()Returns the number of columns in the model.java.lang.StringgetColumnName(int column)Returns a default name for the column using spreadsheet conventions: A, B, C, ...GraphgetG()GraphgetGraph()intgetRowCount()Returns the number of rows in the model.java.lang.ObjectgetValueAt(int rowIndex, int columnIndex)Returns the value for the cell atcolumnIndexandrowIndex.voidinit()booleanisCellEditable(int row, int col)voidremoveEdges()voidsetG(Graph g)voidsetValueAt(java.lang.Object value, int row, int col)-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Constructor Detail
-
EdgeTableModel
public EdgeTableModel(Graph g)
Creates a new instance of EdgeTableModel
-
EdgeTableModel
public EdgeTableModel()
-
-
Method Detail
-
init
public void init()
-
getValueAt
public java.lang.Object getValueAt(int rowIndex, int columnIndex)Returns the value for the cell atcolumnIndexandrowIndex.- Parameters:
rowIndex- the row whose value is to be queriedcolumnIndex- the column whose value is to be queried- Returns:
- the value Object at the specified cell
-
getColumnCount
public int getColumnCount()
Returns the number of columns in the model. AJTableuses this method to determine how many columns it should create and display by default.- Returns:
- the number of columns in the model
- See Also:
getRowCount()
-
getRowCount
public int getRowCount()
Returns the number of rows in the model. AJTableuses this method to determine how many rows it should display. This method should be quick, as it is called frequently during rendering.- Returns:
- the number of rows in the model
- See Also:
getColumnCount()
-
getColumnName
public java.lang.String getColumnName(int column)
Returns a default name for the column using spreadsheet conventions: A, B, C, ... Z, AA, AB, etc. Ifcolumncannot be found, returns an empty string.- Specified by:
getColumnNamein interfacejavax.swing.table.TableModel- Overrides:
getColumnNamein classjavax.swing.table.AbstractTableModel- Parameters:
column- the column being queried- Returns:
- a string containing the default name of
column
-
isCellEditable
public boolean isCellEditable(int row, int col)- Specified by:
isCellEditablein interfacejavax.swing.table.TableModel- Overrides:
isCellEditablein classjavax.swing.table.AbstractTableModel
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int col)- Specified by:
setValueAtin interfacejavax.swing.table.TableModel- Overrides:
setValueAtin classjavax.swing.table.AbstractTableModel
-
removeEdges
public void removeEdges()
-
getG
public Graph getG()
-
setG
public void setG(Graph g)
-
getColumnClass
public java.lang.Class getColumnClass(int columnIndex)
ReturnsObject.classregardless ofcolumnIndex.- Specified by:
getColumnClassin interfacejavax.swing.table.TableModel- Overrides:
getColumnClassin classjavax.swing.table.AbstractTableModel- Parameters:
columnIndex- the column being queried- Returns:
- the Object.class
-
getGraph
public Graph getGraph()
-
-
DMelt 3.0 © DataMelt by jWork.ORG