|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.adapters.JTableClipboardAdapter
public class JTableClipboardAdapter
JTableClipboardAdapter enables Cut-Copy-Paste Clipboard functionality on JTables. The clipboard data format used by the adapter is compatible with the clipboard format used by Excel. This provides for clipboard interoperability between enabled JTables and Excel. Security access to the system clipboard must be available in order for this adapter to work.
Field Summary | |
---|---|
protected static java.awt.datatransfer.Clipboard |
clipboard
|
protected static java.text.DateFormat |
df
|
static java.lang.String |
RB_KEY
|
protected java.awt.datatransfer.StringSelection |
stringSelection
|
protected javax.swing.JTable |
table
|
static int |
UPDATE_MODE
|
static int |
VALIDATE_MODE
|
Constructor Summary | |
---|---|
JTableClipboardAdapter(javax.swing.JTable table)
The JTableClipboardAdapter is constructed with a JTable on which it enables Cut-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 void |
append(java.lang.StringBuffer sbf,
java.lang.Object value,
boolean appendFlag)
|
protected void |
copyCellsToClipboard(boolean replace,
java.lang.String replaceString)
|
void |
copySelectedCells()
|
void |
cutSelectedCells()
|
protected void |
displayCutError(java.lang.Object value,
int row,
int col)
|
protected void |
displayPasteError(java.lang.Object value,
int row,
int col)
|
protected static java.awt.datatransfer.Clipboard |
getClipboard()
|
javax.swing.JTable |
getTable()
Public Accessor methods for the Table on which this adapter acts. |
com.sas.util.transforms.TransformInterface |
getTransform()
Returns the TransformInterface that is used to convert the value from the model into text to be displayed. |
protected static java.util.List |
parseContents(java.lang.String textGrid)
|
void |
pasteSelectedCells()
|
protected java.lang.Object |
replaceNull(java.lang.Object value)
|
protected boolean |
setOrValidateValue(java.lang.Object value,
int row,
int col,
int validateUpdateMode)
|
void |
setTable(javax.swing.JTable table)
|
void |
setTransform(com.sas.util.transforms.TransformInterface newTransform)
Sets the new transform to use for converting values from the model into displayable text. |
protected java.lang.Object |
transform(java.lang.Object value)
|
Field Detail |
---|
protected static java.awt.datatransfer.Clipboard clipboard
protected java.awt.datatransfer.StringSelection stringSelection
protected javax.swing.JTable table
protected static java.text.DateFormat df
public static final int VALIDATE_MODE
public static final int UPDATE_MODE
public static final java.lang.String RB_KEY
Constructor Detail |
---|
public JTableClipboardAdapter(javax.swing.JTable table)
Method Detail |
---|
protected static java.awt.datatransfer.Clipboard getClipboard()
public javax.swing.JTable getTable()
public void setTable(javax.swing.JTable table)
public void setTransform(com.sas.util.transforms.TransformInterface newTransform)
newTransform
- the new transform to usepublic com.sas.util.transforms.TransformInterface getTransform()
public void copySelectedCells()
public void cutSelectedCells()
protected void copyCellsToClipboard(boolean replace, java.lang.String replaceString)
protected void append(java.lang.StringBuffer sbf, java.lang.Object value, boolean appendFlag)
protected boolean setOrValidateValue(java.lang.Object value, int row, int col, int validateUpdateMode)
protected java.lang.Object transform(java.lang.Object value)
protected java.lang.Object replaceNull(java.lang.Object value)
public void pasteSelectedCells()
protected static java.util.List parseContents(java.lang.String textGrid)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
protected void displayCutError(java.lang.Object value, int row, int col)
protected void displayPasteError(java.lang.Object value, int row, int col)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |