public class ExcelAdapter
extends java.lang.Object
implements java.awt.event.ActionListener
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
appendColumnNames |
(package private) int |
cellSelection |
(package private) int |
columnSelection |
(package private) boolean |
debug |
(package private) boolean |
insertRowsWhenPasting |
private javax.swing.JTable |
jTable1 |
(package private) int |
rowSelection |
private java.lang.String |
rowstring |
(package private) int |
selectionType |
private java.awt.datatransfer.StringSelection |
stsel |
private java.awt.datatransfer.Clipboard |
system |
private java.lang.String |
value |
Constructor and Description |
---|
ExcelAdapter()
Creates a new ExcelAdapter-object
|
ExcelAdapter(javax.swing.JTable myJTable)
The Excel Adapter is constructed with a
JTable on which it enables Copy-Paste and acts
as a Clipboard listener.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
This method is activated on the Keystrokes we are listening to
in this implementation.
|
void |
copySelected()
Copies the selected cells
|
javax.swing.JTable |
getJTable()
Returns the Table on which this adapter acts.
|
int |
getSelectionType()
Returns the selectiontype
0 = rowselection
1 = columnselection
2 = cellselection
|
void |
setInsertRowsWhenPasting(boolean insertRowsWhenPasting)
Set if rows should be inserted when pasting.
|
void |
setJTable(javax.swing.JTable jTable1)
Set the Table on which this adapter acts.
|
void |
setSelectionType(int type)
Sets the selectiontype
0 = rowselection
1 = columnselection
2 = cellselection
|
private java.lang.String rowstring
private java.lang.String value
private java.awt.datatransfer.Clipboard system
private java.awt.datatransfer.StringSelection stsel
private javax.swing.JTable jTable1
int rowSelection
int columnSelection
int cellSelection
int selectionType
boolean debug
boolean appendColumnNames
boolean insertRowsWhenPasting
public ExcelAdapter()
public ExcelAdapter(javax.swing.JTable myJTable)
myJTable
- public void setSelectionType(int type)
type
- public int getSelectionType()
public void setInsertRowsWhenPasting(boolean insertRowsWhenPasting)
insertRowsWhenPasting
- public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- public javax.swing.JTable getJTable()
public void setJTable(javax.swing.JTable jTable1)
jTable1
- public void copySelected()