org.rosuda.deducer.data
Class CopyPasteAdapter

java.lang.Object
  extended by org.rosuda.deducer.data.CopyPasteAdapter
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

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

Adapter copies and pastes from the clipboard in tab delimited format. Compatible with Excel


Constructor Summary
CopyPasteAdapter(ExTable myJTable)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          This method is activated on the Keystrokes we are listening to in this implementation.
 void copy()
           
 void copyCut(boolean isCut)
           
 void cut()
           
 java.lang.String getClipBoard()
           
 ExTable getJTable()
           
 void paste()
           
 void setJTable(ExTable jTable1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyPasteAdapter

public CopyPasteAdapter(ExTable myJTable)
Method Detail

getJTable

public ExTable getJTable()

setJTable

public void setJTable(ExTable jTable1)

copyCut

public void copyCut(boolean isCut)

cut

public void cut()

copy

public void copy()

getClipBoard

public java.lang.String getClipBoard()

paste

public void paste()

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