com.nqadmin.swingSet
Class SSTableKeyAdapter

java.lang.Object
  extended by java.awt.event.KeyAdapter
      extended by com.nqadmin.swingSet.SSTableKeyAdapter
All Implemented Interfaces:
java.awt.event.KeyListener, java.io.Serializable, java.util.EventListener

public class SSTableKeyAdapter
extends java.awt.event.KeyAdapter
implements java.io.Serializable

SSTableKeyAdapter.java

SwingSet - Open Toolkit For Making Swing Controls Database-Aware

 Key adapter for JTable & SSDataGrid that manages cut & paste functionality
 between a table and either another table or a spreadsheet.

Version:
$Revision: 1.6 $
See Also:
Serialized Form

Constructor Summary
SSTableKeyAdapter(javax.swing.JTable _jTable)
          Constructs a KeyAdapter for the JTable.
 
Method Summary
 void keyReleased(java.awt.event.KeyEvent ke)
          Invoked when a key is released.
 void setAllowInsertion(boolean _allowInsertion)
          Sets allowInsertion indicator.
 void setForSSDataGrid(boolean _forSSDataGrid)
          Sets forSSDataGrid indicator.
 
Methods inherited from class java.awt.event.KeyAdapter
keyPressed, keyTyped
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSTableKeyAdapter

public SSTableKeyAdapter(javax.swing.JTable _jTable)
Constructs a KeyAdapter for the JTable.

Parameters:
_jTable - JTable for which copy and paste support should be added.
Method Detail

setAllowInsertion

public void setAllowInsertion(boolean _allowInsertion)
Sets allowInsertion indicator. Set true if new rows can be added to JTable via cut/copy & paste - otherwise false. False by default.

Parameters:
_allowInsertion - true if new rows can be added when pasting data from clipboard, else false.

setForSSDataGrid

public void setForSSDataGrid(boolean _forSSDataGrid)
Sets forSSDataGrid indicator. True if the key adapter is used for SSDataGrid -- otherwise false. False by default.

Parameters:
_forSSDataGrid - - true if this key adapter is used for SSDataGrid, else false.

keyReleased

public void keyReleased(java.awt.event.KeyEvent ke)
Invoked when a key is released.

Specified by:
keyReleased in interface java.awt.event.KeyListener
Overrides:
keyReleased in class java.awt.event.KeyAdapter