|
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.list.ListTransferHandler
public class ListTransferHandler
The default TransferHandler for JList.
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 | |
---|---|
ListTransferHandler()
The constructor. |
|
ListTransferHandler(String property)
The constructor. |
Method Summary | |
---|---|
boolean |
canImport(JComponent c,
DataFlavor[] flavors)
|
protected String |
convertElementToString(JList list,
int rowIndex,
Object value)
Converts the element to string. |
protected Object |
convertStringToElement(JList list,
int rowIndex,
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. |
boolean |
isAcceptImport()
Gets the flag indicating if importing data is accepted in this TransferHandler. |
void |
setAcceptImport(boolean acceptImport)
Sets the flag indicating if importing data is accepted in this TransferHandler. |
protected boolean |
updateRow(JList list,
int rowIndex,
Object content)
Deletes a row in the designated row index at the list. |
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 ListTransferHandler(String property)
property
- the propertypublic ListTransferHandler()
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 list
protected boolean updateRow(JList list, int rowIndex, Object content)
list
- the listrowIndex
- the row indexcontent
- the row content
protected String convertElementToString(JList list, int rowIndex, Object value)
list
- the listrowIndex
- the row indexvalue
- the value to convert
protected Object convertStringToElement(JList list, int rowIndex, String text)
list
- the listrowIndex
- the row 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 |