Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kr.ac.kaist.swrc.jhannanum.demo
Class GUIDemo.PluginTransferHandler

    java.lang.Object
      javax.swing.TransferHandler
          kr.ac.kaist.swrc.jhannanum.demo.GUIDemo.PluginTransferHandler

All Implemented Interfaces:
  java.io.Serializable

Enclosing class:
  GUIDemo

    private class GUIDemo.PluginTransferHandler

extends javax.swing.TransferHandler

Handler for the drag-and-drop functionality of plug-in from the plug-in pool to the work flow.

Author:
  Sangwon Park (hudoni@world.kaist.ac.kr), CILab, SWRC, KAIST

Nested Class Summary

Nested classes/interfaces inherited from class javax.swing.TransferHandler
`javax.swing.TransferHandler.DropLocation, javax.swing.TransferHandler.TransferSupport`

Field Summary
`private int` | `phase` The phase of the plug-in on the work flow.
`private static long` | `serialVersionUID` serialVersionUID
`private int` | `type` The type of the plug-in.

Fields inherited from class javax.swing.TransferHandler
`COPY, COPY_OR_MOVE, LINK, MOVE, NONE`

Constructor Summary
`GUIDemo.PluginTransferHandler(int phase, int type)` Constructor.

Method Summary
`boolean` | `canImport(javax.swing.TransferHandler.TransferSupport info)` Returns true when it is possible to drag and drop the plug-in.
`protected java.awt.datatransfer.Transferable` | `createTransferable(javax.swing.JComponent c)` Make it possible to transfer the selected plug-in.
`int` | `getSourceActions(javax.swing.JComponent c)` Returns the type of action at the source component.
`boolean` | `importData(javax.swing.TransferHandler.TransferSupport info)` It transfers the meta data of the plug-in from the plug-in pool to the work flow list.

Methods inherited from class javax.swing.TransferHandler
`canImport, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getVisualRepresentation, importData`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### serialVersionUID

    private static final long serialVersionUID

  serialVersionUID

  See Also:
    Constant Field Values

### phase

    private int phase

  The phase of the plug-in on the work flow. PluginInfo.PHASE1 or PluginInfo.PHASE2 or PluginInfo.PHASE3.

### type

    private int type

  The type of the plug-in. PluginInfo.MAJOR or PluginInfo.SUPPLEMENT.

Constructor Detail

### GUIDemo.PluginTransferHandler

    public GUIDemo.PluginTransferHandler(int phase,
                                         int type)

  Constructor.

  Parameters:
    `phase` - - the phase of the plug-in. PluginInfo.PHASE1 or PluginInfo.PHASE2 or PluginInfo.PHASE3.
    `type` - - the type of the plug-in. PluginInfo.MAJOR or PluginInfo.SUPPLEMENT.

Method Detail

### canImport

    public boolean canImport(javax.swing.TransferHandler.TransferSupport info)

  Returns true when it is possible to drag and drop the plug-in.

  Overrides:
    `canImport` in class `javax.swing.TransferHandler`

### importData

    public boolean importData(javax.swing.TransferHandler.TransferSupport info)

  It transfers the meta data of the plug-in from the plug-in pool to the work flow list.

  Overrides:
    `importData` in class `javax.swing.TransferHandler`
  Returns:
    true: transference was done correctly, otherwise false

### getSourceActions

    public int getSourceActions(javax.swing.JComponent c)

  Returns the type of action at the source component.

  Overrides:
    `getSourceActions` in class `javax.swing.TransferHandler`

### createTransferable

    protected java.awt.datatransfer.Transferable createTransferable(javax.swing.JComponent c)

  Make it possible to transfer the selected plug-in. Just one plug-in can be transfered, but it can be improved.

  Overrides:
    `createTransferable` in class `javax.swing.TransferHandler`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD