jcreek.gui.representation
Class FrameTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byjcreek.gui.representation.FrameTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
Direct Known Subclasses:
CaseTableModel

public class FrameTableModel
extends javax.swing.table.AbstractTableModel

Title: FrameTableModelionsTable

Description: A combineded TableModel, TableCellRenderer and TableCellEditor for tables containg a set of relations.

Version:
1.0
Author:
Frode Sørmo
See Also:
Serialized Form

Field Summary
protected  java.awt.event.MouseAdapter actionListen
           
protected  java.util.Vector actionListeners
           
protected  boolean editable
           
protected  javax.swing.ImageIcon followIcon
           
protected  boolean includeAction
           
protected  java.awt.Color inheritedColor
           
protected  javax.swing.JTable myTable
           
protected  java.awt.Color negatedColor
           
protected static javax.swing.border.Border noFocusBorder
           
protected  java.util.Vector relations
           
protected  javax.swing.ImageIcon removeIcon
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
FrameTableModel(Relation[] rels)
           
 
Method Summary
 void addLinkListener(LinkListener listener)
           
 void addRelation(Relation rel)
           
protected  void fireLinkAction(LinkEvent e)
           
protected  void fireLinkEvent(LinkEvent e)
           
 void formatTable(javax.swing.JTable table, KnowledgeModel knowledgeModel)
           
 java.lang.Class getColumnClass(int column)
           
 int getColumnCount()
          Returns the number of rows in the table
 java.lang.String getColumnName(int columnIndex)
          Returns the column names.
 Relation[] getRelations()
           
 int getRowCount()
          Returns the number of rows in the table
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Returns the value at the given position.
 boolean isCellEditable(int row, int cell)
           
 boolean isEditable()
           
 Relation relationAt(int row)
           
 void removeLinkListener(LinkListener listener)
           
 void removeRelation(Relation rel)
           
 void setEditable(boolean editable)
           
 void setRelations(Relation[] rels)
           
 void setTable(javax.swing.JTable table)
           
 void setValueAt(java.lang.Object value, int row, int column)
           
 void updateRelation(Relation rel)
           
 
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

inheritedColor

protected java.awt.Color inheritedColor

negatedColor

protected java.awt.Color negatedColor

noFocusBorder

protected static javax.swing.border.Border noFocusBorder

includeAction

protected boolean includeAction

relations

protected java.util.Vector relations

actionListeners

protected java.util.Vector actionListeners

myTable

protected javax.swing.JTable myTable

editable

protected boolean editable

removeIcon

protected javax.swing.ImageIcon removeIcon

followIcon

protected javax.swing.ImageIcon followIcon

actionListen

protected java.awt.event.MouseAdapter actionListen
Constructor Detail

FrameTableModel

public FrameTableModel(Relation[] rels)
Method Detail

formatTable

public void formatTable(javax.swing.JTable table,
                        KnowledgeModel knowledgeModel)

setTable

public void setTable(javax.swing.JTable table)

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Returns the value at the given position.


setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int column)

getRowCount

public int getRowCount()
Returns the number of rows in the table


getColumnCount

public int getColumnCount()
Returns the number of rows in the table


isCellEditable

public boolean isCellEditable(int row,
                              int cell)

setEditable

public void setEditable(boolean editable)

isEditable

public boolean isEditable()

getColumnName

public java.lang.String getColumnName(int columnIndex)
Returns the column names.


getColumnClass

public java.lang.Class getColumnClass(int column)

removeRelation

public void removeRelation(Relation rel)

addRelation

public void addRelation(Relation rel)

relationAt

public Relation relationAt(int row)

setRelations

public void setRelations(Relation[] rels)

getRelations

public Relation[] getRelations()

updateRelation

public void updateRelation(Relation rel)

addLinkListener

public void addLinkListener(LinkListener listener)

removeLinkListener

public void removeLinkListener(LinkListener listener)

fireLinkEvent

protected void fireLinkEvent(LinkEvent e)

fireLinkAction

protected void fireLinkAction(LinkEvent e)


Created at IDI, NTNU by the Artificial Intelligence and Learning group