edu.upenn.gloDB.gui
Class QueryBuilder.ListTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by edu.upenn.gloDB.gui.QueryBuilder.ListTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Enclosing class:
QueryBuilder

private class QueryBuilder.ListTableModel
extends javax.swing.table.AbstractTableModel


Field Summary
private  java.lang.String[] columnNames
           
private  java.util.ArrayList items
          Stores the QueryElements that are in the table.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
private QueryBuilder.ListTableModel()
           
 
Method Summary
 void addRow(QueryElement qElement)
          Append a new row to the end of the table.
 void addRowAt(QueryElement qElement, int row)
          Add new row to table.
 int getColumnCount()
           
 java.lang.String getColumnName(int col)
           
 QueryElement getRow(int row)
          Returns the QueryElement that represents the specified row in the table.
 int getRowCount()
           
 java.lang.Object getValueAt(int row, int col)
          Operator, Negate, Track, Qualifiers
 void removeAllRows()
          Removes all rows from the table.
 void removeRow(int row)
          Removes the QueryElement that represents the specified row in the table.
 void removeRows(int[] rows)
          Removes the QueryElements that represent the rows specified.
 void removeRows(int minRow, int maxRow)
          Removes the QueryElements that represent the specified row in the table.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

items

private java.util.ArrayList items
Stores the QueryElements that are in the table.


columnNames

private java.lang.String[] columnNames
Constructor Detail

QueryBuilder.ListTableModel

private QueryBuilder.ListTableModel()
Method Detail

addRow

public void addRow(QueryElement qElement)
Append a new row to the end of the table.


addRowAt

public void addRowAt(QueryElement qElement,
                     int row)
Add new row to table. If row index is '-1' then add to end of table.


getRow

public QueryElement getRow(int row)
Returns the QueryElement that represents the specified row in the table.


removeRow

public void removeRow(int row)
Removes the QueryElement that represents the specified row in the table.


removeRows

public void removeRows(int[] rows)
Removes the QueryElements that represent the rows specified.


removeRows

public void removeRows(int minRow,
                       int maxRow)
Removes the QueryElements that represent the specified row in the table. If the row is -1 then will clear the entire table.


removeAllRows

public void removeAllRows()
Removes all rows from the table.


getColumnCount

public int getColumnCount()

getRowCount

public int getRowCount()

getColumnName

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

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)
Operator, Negate, Track, Qualifiers




Copyright 2012 Stephen Fisher and Junhyong Kim, University of Pennsylvania. All Rights Reserved.