DESY ACOP Beans Home

com.cosylab.gui.util
Class DisplayerParametersTransferHandler

java.lang.Object
  extended by javax.swing.TransferHandler
      extended by com.cosylab.gui.components.util.CosyTransferHandler
          extended by com.cosylab.gui.util.DisplayerParametersTransferHandler
All Implemented Interfaces:
java.awt.datatransfer.Transferable, java.awt.event.MouseMotionListener, java.io.Serializable, java.util.EventListener

public class DisplayerParametersTransferHandler
extends CosyTransferHandler

DisplayerParametersTransferHandler is a TransferHandler for DisplayerParametersAcceptors and MultipleParametersAcceptors.

Author:
tkusterle
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.cosylab.gui.components.util.CosyTransferHandler
CosyTransferHandler.MouseFilter
 
Nested classes/interfaces inherited from class javax.swing.TransferHandler
javax.swing.TransferHandler.DropLocation, javax.swing.TransferHandler.TransferSupport
 
Field Summary
protected  DisplayerParametersSelectorDialog dialog
           
protected  Displayer displayer
           
protected  MultipleDisplayer mDisplayer
           
 
Fields inherited from class com.cosylab.gui.components.util.CosyTransferHandler
isDragging
 
Fields inherited from class javax.swing.TransferHandler
COPY, COPY_OR_MOVE, LINK, MOVE, NONE
 
Constructor Summary
DisplayerParametersTransferHandler(Displayer comp, boolean reciveEnabled, boolean exportEnabled)
           
DisplayerParametersTransferHandler(MultipleDisplayer comp, boolean reciveEnabled, boolean exportEnabled)
           
 
Method Summary
 boolean canImport(javax.swing.JComponent comp, java.awt.datatransfer.DataFlavor[] transferFlavors)
           
protected  DisplayerParameters[] castParameters(java.lang.Object... parameters)
           
 int displayerParametersDimension()
           
protected  DisplayerParameters exportDisplayerParameters()
           
protected  DisplayerParameters[] exportMultipleDisplayerParameters()
           
 Displayer getDisplayer()
          Returns the displayer.
 MultipleDisplayer getMultipleDisplayer()
          Returns the displayer.
protected  DisplayerParametersSelectorDialog getParameterSelectionDialog()
           
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
           
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
           
 boolean importData(javax.swing.JComponent comp, java.awt.datatransfer.Transferable t)
           
protected  boolean importDisplayerParameters(DisplayerParameters[] dp)
           
 boolean isMultiDisplayer()
           
protected  int selectParameters(java.awt.Component c, DisplayerParameters[] dp)
           
protected  int selectParameters(java.awt.Component c, java.lang.String[] dp)
           
 void setParametersToDisplayer(java.lang.Object disp, DisplayerParameters parameters)
           
 
Methods inherited from class com.cosylab.gui.components.util.CosyTransferHandler
addMouseFilter, canDrag, createTransferable, exportDone, getMouseFilters, getSourceActions, hookTransferHandler, hookTransferHandler, isDataFlavorSupported, isExportEnabled, isMouseDragGesture, isReceiveEnabled, mouseDragged, mouseMoved, registerTransferHandler, removeMouseFilter, setExportEnabled, setReceiveEnabled, unhookTransferHandler
 
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
 

Field Detail

dialog

protected DisplayerParametersSelectorDialog dialog

displayer

protected Displayer displayer

mDisplayer

protected MultipleDisplayer mDisplayer
Constructor Detail

DisplayerParametersTransferHandler

public DisplayerParametersTransferHandler(Displayer comp,
                                          boolean reciveEnabled,
                                          boolean exportEnabled)

DisplayerParametersTransferHandler

public DisplayerParametersTransferHandler(MultipleDisplayer comp,
                                          boolean reciveEnabled,
                                          boolean exportEnabled)
Method Detail

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor flavor)
                                 throws java.awt.datatransfer.UnsupportedFlavorException,
                                        java.io.IOException
Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Specified by:
getTransferData in class CosyTransferHandler
Throws:
java.awt.datatransfer.UnsupportedFlavorException
java.io.IOException

exportDisplayerParameters

protected DisplayerParameters exportDisplayerParameters()

exportMultipleDisplayerParameters

protected DisplayerParameters[] exportMultipleDisplayerParameters()

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable
Specified by:
getTransferDataFlavors in class CosyTransferHandler

importData

public boolean importData(javax.swing.JComponent comp,
                          java.awt.datatransfer.Transferable t)
Overrides:
importData in class javax.swing.TransferHandler

castParameters

protected DisplayerParameters[] castParameters(java.lang.Object... parameters)

importDisplayerParameters

protected boolean importDisplayerParameters(DisplayerParameters[] dp)
                                     throws java.beans.PropertyVetoException
Parameters:
dp -
Throws:
java.beans.PropertyVetoException

getParameterSelectionDialog

protected DisplayerParametersSelectorDialog getParameterSelectionDialog()

selectParameters

protected int selectParameters(java.awt.Component c,
                               DisplayerParameters[] dp)

selectParameters

protected int selectParameters(java.awt.Component c,
                               java.lang.String[] dp)

setParametersToDisplayer

public void setParametersToDisplayer(java.lang.Object disp,
                                     DisplayerParameters parameters)
                              throws java.beans.PropertyVetoException
Throws:
java.beans.PropertyVetoException

displayerParametersDimension

public int displayerParametersDimension()

isMultiDisplayer

public boolean isMultiDisplayer()

getDisplayer

public Displayer getDisplayer()
Returns the displayer.

Returns:
Returns the displayer.

getMultipleDisplayer

public MultipleDisplayer getMultipleDisplayer()
Returns the displayer.

Returns:
Returns the displayer.

canImport

public boolean canImport(javax.swing.JComponent comp,
                         java.awt.datatransfer.DataFlavor[] transferFlavors)
Overrides:
canImport in class CosyTransferHandler


Copyright © 2010. All Rights Reserved.