|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.TransferHandler
de.uni_tuebingen.sfb.lichtenstein.UI.FormulaTransferHandler
public class FormulaTransferHandler
A transfer handler for formulas. Based on Sun’s Swing DnD tutorial.
| 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 | |
|---|---|
FormulaTransferHandler()
Initialize the formula transfer handler. |
|
| Method Summary | |
|---|---|
boolean |
canImport(TransferHandler.TransferSupport info)
|
protected Transferable |
createTransferable(JComponent c)
Puts the selected formulas from the list (c has to be a JList) into a DataHandler as a local JVM object. |
protected void |
exportDone(JComponent c,
Transferable data,
int action)
Remove the formulas moved. |
int |
getSourceActions(JComponent c)
|
boolean |
importData(TransferHandler.TransferSupport info)
Put the formulas at the drop location in the order of 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 FormulaTransferHandler()
| Method Detail |
|---|
protected Transferable createTransferable(JComponent c)
Puts the selected formulas from the list (c has to be a JList) into a DataHandler as a local JVM object.
createTransferable in class TransferHandlerc - Has to be a JList.public boolean canImport(TransferHandler.TransferSupport info)
canImport in class TransferHandlerpublic int getSourceActions(JComponent c)
getSourceActions in class TransferHandlerpublic boolean importData(TransferHandler.TransferSupport info)
Put the formulas at the drop location in the order of the list. If the location is invalid, put them at the beginning.
importData in class TransferHandler
protected void exportDone(JComponent c,
Transferable data,
int action)
Remove the formulas moved. Due to a bug in Swing, this method is complex. Simplify it if the bug is fixed.
exportDone in class TransferHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||