uk.ac.ic.doc.automed.p2p.gui
Class ASGResultTable

java.lang.Object
  extended by uk.ac.ic.doc.automed.p2p.gui.ASGResultTable

public class ASGResultTable
extends java.lang.Object


Field Summary
private  java.util.Vector colIds
           
private  java.util.Vector data
           
private  boolean displayQueryBox
           
private  java.util.Vector header
           
private  javax.swing.table.TableCellRenderer headerRender
           
private  java.util.List listeners
           
private  javax.swing.JPanel mainPanel
           
private  java.lang.String name
           
private  javax.swing.JTextArea queryBox
           
private  RecordScroller recSet
           
private  javax.swing.JTable resultTable
           
private  javax.swing.JScrollPane tblPane
           
private  javax.swing.table.DefaultTableModel tm
           
 
Constructor Summary
ASGResultTable()
           
ASGResultTable(boolean displayQueryBox)
           
 
Method Summary
 void addActionListener(java.awt.event.ActionListener l)
           
 void clear()
           
 java.lang.String getName()
           
 java.lang.String getQueryText()
           
protected  void getTablePanel()
           
 javax.swing.JComponent getUI()
           
 boolean hasFocus()
           
private  void init()
           
static void main(java.lang.String[] args)
           
private  void notifyListeners(java.awt.event.ActionEvent e)
          Invoked when query execution button is pressed
 void setData(ASG q, ASG res)
          Set the query and its result to be display on the result table.
The query is used to extract the query head whilst the result set contains
value tuples that are to be displayed.
 void setData(ASG q, java.util.Map headVarMap, ASG res)
          This method takes an additional argument, which is a map of the head variables.
 void setQueryText(java.lang.String query)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resultTable

private javax.swing.JTable resultTable

tblPane

private javax.swing.JScrollPane tblPane

tm

private javax.swing.table.DefaultTableModel tm

headerRender

private javax.swing.table.TableCellRenderer headerRender

header

private java.util.Vector header

colIds

private java.util.Vector colIds

data

private java.util.Vector data

name

private java.lang.String name

mainPanel

private javax.swing.JPanel mainPanel

queryBox

private javax.swing.JTextArea queryBox

recSet

private RecordScroller recSet

listeners

private java.util.List listeners

displayQueryBox

private boolean displayQueryBox
Constructor Detail

ASGResultTable

public ASGResultTable()

ASGResultTable

public ASGResultTable(boolean displayQueryBox)
Method Detail

addActionListener

public void addActionListener(java.awt.event.ActionListener l)

init

private void init()

notifyListeners

private void notifyListeners(java.awt.event.ActionEvent e)
Invoked when query execution button is pressed


getName

public java.lang.String getName()

getUI

public javax.swing.JComponent getUI()

getQueryText

public java.lang.String getQueryText()

setQueryText

public void setQueryText(java.lang.String query)

hasFocus

public boolean hasFocus()

setData

public void setData(ASG q,
                    java.util.Map headVarMap,
                    ASG res)
This method takes an additional argument, which is a map of the head variables.
In addition to the header variables that are in the query, this map provides another mapping to these head variables.

Parameters:
q -
headVarMap -
res -

setData

public void setData(ASG q,
                    ASG res)
Set the query and its result to be display on the result table.
The query is used to extract the query head whilst the result set contains
value tuples that are to be displayed.

Parameters:
q -
res -

getTablePanel

protected void getTablePanel()

clear

public void clear()

main

public static void main(java.lang.String[] args)