edu.ucla.stat.SOCR.util
Class EnhancedExcelAdapter

java.lang.Object
  extended by edu.ucla.stat.SOCR.util.EnhancedExcelAdapter
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class EnhancedExcelAdapter
extends java.lang.Object
implements java.awt.event.ActionListener

Package: edu.ucla.stat.SOCR.util User: Khashim Date: Dec 23, 2008 Time: 9:13:42 PM

Author:
Jameel

Constructor Summary
EnhancedExcelAdapter(javax.swing.JTable myJTable)
          The Excel Adapter is constructed with a JTable on which it enables Copy-Paste and acts as a Clipboard listener.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          This method is activated on the Keystrokes we are listening to in this implementation.
protected  java.lang.StringBuffer copyFromModel()
           
protected  java.lang.StringBuffer copyFromTable()
           
protected  java.awt.Point getDialogLocation(javax.swing.JDialog dialog, java.awt.Component c)
           
protected  javax.swing.JPanel getDialogPanel(javax.swing.JDialog dialog)
           
 javax.swing.JTable getJTable()
          Public Accessor methods for the Table on which this adapter acts.
protected  void hideWaitDialog()
           
protected  void notifyDataChanged()
           
protected  void notifyStructureChanged()
           
protected  void pasteToModel(java.lang.String pasteString, int startRow, int startCol)
           
protected  void pasteToTable(java.lang.String pasteString, int startRow, int startCol)
           
 void setJTable(javax.swing.JTable jTable1)
           
protected  void setNotifications(boolean notify)
           
protected  void showWaitDialog()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnhancedExcelAdapter

public EnhancedExcelAdapter(javax.swing.JTable myJTable)
The Excel Adapter is constructed with a JTable on which it enables Copy-Paste and acts as a Clipboard listener.

Method Detail

getDialogLocation

protected java.awt.Point getDialogLocation(javax.swing.JDialog dialog,
                                           java.awt.Component c)

getDialogPanel

protected javax.swing.JPanel getDialogPanel(javax.swing.JDialog dialog)

showWaitDialog

protected void showWaitDialog()

hideWaitDialog

protected void hideWaitDialog()

getJTable

public javax.swing.JTable getJTable()
Public Accessor methods for the Table on which this adapter acts.


setJTable

public void setJTable(javax.swing.JTable jTable1)

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
This method is activated on the Keystrokes we are listening to in this implementation. Here it listens for Copy and Paste ActionCommands. Selections comprising non-adjacent cells result in invalid selection and then copy action cannot be performed. Paste is done by aligning the upper left corner of the selection with the 1st element in the current selection of the JTable.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

copyFromModel

protected java.lang.StringBuffer copyFromModel()

copyFromTable

protected java.lang.StringBuffer copyFromTable()

pasteToModel

protected void pasteToModel(java.lang.String pasteString,
                            int startRow,
                            int startCol)

pasteToTable

protected void pasteToTable(java.lang.String pasteString,
                            int startRow,
                            int startCol)

setNotifications

protected void setNotifications(boolean notify)

notifyStructureChanged

protected void notifyStructureChanged()

notifyDataChanged

protected void notifyDataChanged()