JIDE 3.5.15

com.jidesoft.grid
Class ContextSensitiveTableTransferHandler

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by com.jidesoft.grid.JideTableTransferHandler
          extended by com.jidesoft.grid.ContextSensitiveTableTransferHandler
All Implemented Interfaces:
Serializable

public class ContextSensitiveTableTransferHandler
extends JideTableTransferHandler

TransferHandler for ContextSensitiveTable. It will use the converter context information and use ObjectConverterManager to convert the value to String.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.TransferHandler
TransferHandler.DropLocation, TransferHandler.TransferSupport
 
Field Summary
 
Fields inherited from class javax.swing.TransferHandler
COPY, COPY_OR_MOVE, LINK, MOVE, NONE
 
Constructor Summary
ContextSensitiveTableTransferHandler()
           
ContextSensitiveTableTransferHandler(String property)
           
 
Method Summary
protected  String convertElementToString(JTable table, int rowIndex, int columnIndex, Object value)
          Converts the value at the specified cell to String.
protected  Object convertStringToElement(JTable table, int rowIndex, int columnIndex, String text)
          Converts the string to element.
 
Methods inherited from class com.jidesoft.grid.JideTableTransferHandler
canImport, createTransferable, exportDone, getSourceActions, importData, importString, insertRow, isAcceptImport, removeRow, setAcceptImport
 
Methods inherited from class javax.swing.TransferHandler
canImport, exportAsDrag, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation, importData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextSensitiveTableTransferHandler

public ContextSensitiveTableTransferHandler(String property)

ContextSensitiveTableTransferHandler

public ContextSensitiveTableTransferHandler()
Method Detail

convertElementToString

protected String convertElementToString(JTable table,
                                        int rowIndex,
                                        int columnIndex,
                                        Object value)
Converts the value at the specified cell to String.

Overrides:
convertElementToString in class JideTableTransferHandler
Parameters:
table - the table.
rowIndex - the row index.
columnIndex - the column index.
value - the value
Returns:
the converted String from the value. By default, if the table is an instance of ContextSensitiveTable and table.getModel() is an instance of ContextSensitiveTableModel, we will use ObjectConverterManager to do do the conversion. Otherwise, we will use value.toString() to do it.

convertStringToElement

protected Object convertStringToElement(JTable table,
                                        int rowIndex,
                                        int columnIndex,
                                        String text)
Description copied from class: JideTableTransferHandler
Converts the string to element.

Overrides:
convertStringToElement in class JideTableTransferHandler
Parameters:
table - the table
rowIndex - the row index
columnIndex - the column index
text - the string to convert
Returns:
the converted element.

JIDE 3.5.15