DESY ACOP Beans Home
com.cosylab.gui.util
Class AbstractDisplayerParametersTransferHandler
java.lang.Object
javax.swing.TransferHandler
com.cosylab.gui.components.util.CosyTransferHandler
com.cosylab.gui.util.AbstractDisplayerParametersTransferHandler
- All Implemented Interfaces:
- java.awt.datatransfer.Transferable, java.awt.event.MouseMotionListener, java.io.Serializable, java.util.EventListener
- Direct Known Subclasses:
- AbstractMDPTransferHandler, AcopVideoTransferHandler, DefaultDisplayerParametersTransferHandler, MultipleDisplayerParametersTransferHandler
public abstract class AbstractDisplayerParametersTransferHandler
- extends CosyTransferHandler
AbstractDisplayerParametersTransferHandler
is a TransferHandler
for all DisplayerParameters-type-displayer.
- Author:
- tkusterle
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class javax.swing.TransferHandler |
javax.swing.TransferHandler.DropLocation, javax.swing.TransferHandler.TransferSupport |
Fields inherited from class javax.swing.TransferHandler |
COPY, COPY_OR_MOVE, LINK, MOVE, NONE |
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 |
dialog
protected DisplayerParametersSelectorDialog dialog
displayer
protected javax.swing.JComponent displayer
flavors
protected java.awt.datatransfer.DataFlavor[] flavors
AbstractDisplayerParametersTransferHandler
public AbstractDisplayerParametersTransferHandler(javax.swing.JComponent comp,
boolean reciveEnabled,
boolean exportEnabled)
AbstractDisplayerParametersTransferHandler
public AbstractDisplayerParametersTransferHandler(javax.swing.JComponent comp,
boolean reciveEnabled,
boolean exportEnabled,
java.awt.datatransfer.DataFlavor[] f,
boolean resetFlavors)
- Creates new DnD transfer handler with modified flavors.
- Parameters:
comp
- the component for which this handler si createdreciveEnabled
- flag for recifving DnD gesturesexportEnabled
- flag for exporting DnD gesturesf
- the array of flavors, whih are inseted to this handler at beginning of default
flavors. If null or 0 length then ignored.resetFlavors
- if true
, then provided flavors replaces default
flavors, otherwise provided flavors are inserted ad beginning of
default flavor list.
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 abstract DisplayerParameters exportDisplayerParameters()
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
importString
protected boolean importString(java.lang.String string)
throws java.beans.PropertyVetoException
- Throws:
java.beans.PropertyVetoException
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 boolean setParametersToDisplayer(java.lang.Object disp,
DisplayerParameters parameters)
throws java.beans.PropertyVetoException
- Sets the supplied parameters to the displayer.
- Parameters:
disp
- destination displayerparameters
- parameters to be set
- Returns:
- true if successful
- Throws:
java.beans.PropertyVetoException
- when setting of parameters failed
getComponent
public javax.swing.JComponent getComponent()
- 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.