|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.TransferHandler com.jidesoft.grid.JideTableTransferHandler
public class JideTableTransferHandler
Default TransferHandler for JideTable which supports import data by default.
This transfer handler does not support drag to insert column feature, i.e., DropMode.INSERT_COLS and DropMode.ON_OR_INSERT_COLS.
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 | |
---|---|
JideTableTransferHandler()
|
|
JideTableTransferHandler(String property)
|
Method Summary | |
---|---|
boolean |
canImport(JComponent c,
DataFlavor[] flavors)
|
protected String |
convertElementToString(JTable table,
int rowIndex,
int columnIndex,
Object value)
Converts the element to string. |
protected Object |
convertStringToElement(JTable table,
int rowIndex,
int columnIndex,
String text)
Converts the string to element. |
protected Transferable |
createTransferable(JComponent c)
Create a Transferable to use as the source for a data transfer. |
protected void |
exportDone(JComponent c,
Transferable data,
int action)
|
int |
getSourceActions(JComponent c)
|
boolean |
importData(JComponent comp,
Transferable t)
|
protected boolean |
importString(JComponent c,
String str,
boolean isLocal)
Imports from the string. |
protected boolean |
insertRow(JTable table,
int rowIndex,
Vector<Object> rowData)
Deprecated. no longer get invoked. |
boolean |
isAcceptImport()
Gets the flag indicating if importing data is accepted in this TransferHandler. |
protected boolean |
removeRow(JTable table,
int rowIndex)
Deprecated. no longer get invoked |
void |
setAcceptImport(boolean acceptImport)
Sets the flag indicating if importing data is accepted in this TransferHandler. |
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 |
---|
public JideTableTransferHandler(String property)
public JideTableTransferHandler()
Method Detail |
---|
protected Transferable createTransferable(JComponent c)
createTransferable
in class TransferHandler
c
- The component holding the data to be transferred. This argument is provided to enable sharing of
TransferHandlers by multiple components.
public boolean importData(JComponent comp, Transferable t)
importData
in class TransferHandler
public boolean canImport(JComponent c, DataFlavor[] flavors)
canImport
in class TransferHandler
protected boolean importString(JComponent c, String str, boolean isLocal)
c
- the componentstr
- the stringisLocal
- the flag indicating if it's imported from inside or outside of the same window/frame/dialog of the table
@Deprecated protected boolean insertRow(JTable table, int rowIndex, Vector<Object> rowData)
importString(javax.swing.JComponent, String, boolean)
relies on this method to insert a new row if
necessary.
To implement DnD behavior for a non-DefaultTableModel, please implement this method to insert a row.
table
- the tablerowIndex
- the row indexrowData
- the row data
@Deprecated protected boolean removeRow(JTable table, int rowIndex)
table
- the tablerowIndex
- the row index
protected String convertElementToString(JTable table, int rowIndex, int columnIndex, Object value)
table
- the tablerowIndex
- the row indexcolumnIndex
- the column indexvalue
- the value to convert
protected Object convertStringToElement(JTable table, int rowIndex, int columnIndex, String text)
table
- the tablerowIndex
- the row indexcolumnIndex
- the column indextext
- the string to convert
public int getSourceActions(JComponent c)
getSourceActions
in class TransferHandler
protected void exportDone(JComponent c, Transferable data, int action)
exportDone
in class TransferHandler
public boolean isAcceptImport()
setAcceptImport(boolean)
public void setAcceptImport(boolean acceptImport)
acceptImport
- the flag
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |