GraphLab Project

graphlab.ui.components.gpropertyeditor
Class GPropertyTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by graphlab.ui.components.gpropertyeditor.GPropertyTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class GPropertyTableModel
extends javax.swing.table.AbstractTableModel

it is the Table Model which is used to create a property editor. it has t columns and multiple rows, each row is a property, first column is the name of property and second column is the value. the names are stored as Object.

Author:
Azin Azadi Email :
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
GPropertyTableModel()
          constructor
 
Method Summary
 void addData(java.lang.Object name, java.lang.Object value)
          adds a row to the table
 void clear()
          clears all values ans names of the table
 java.lang.Class<?> getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int column)
           
 int getRowCount()
          the number of properties, stored
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
          the second column cells(values) are editable, and the first are not
 boolean setValue(java.lang.Object name, java.lang.Object value)
          sets the value of the given row(name).
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
           
 
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
 

Constructor Detail

GPropertyTableModel

public GPropertyTableModel()
constructor

Method Detail

getRowCount

public int getRowCount()
the number of properties, stored


getColumnName

public java.lang.String getColumnName(int column)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getColumnCount

public int getColumnCount()

clear

public void clear()
clears all values ans names of the table


addData

public void addData(java.lang.Object name,
                    java.lang.Object value)
adds a row to the table


setValue

public boolean setValue(java.lang.Object name,
                        java.lang.Object value)
sets the value of the given row(name). returns false if the given name does not exist in the properties


setValueAt

public void setValueAt(java.lang.Object aValue,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
the second column cells(values) are editable, and the first are not

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

getColumnClass

public java.lang.Class<?> getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)

GraphLab Project