Java Code Examples for java.awt.datatransfer.Transferable

The following examples show how to use java.awt.datatransfer.Transferable. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: netbeans   Source File: ViewNodeTest.java    License: Apache License 2.0 6 votes vote down vote up
public void testClipboardCopy() throws Exception {
    String tablename = "testtable";
    String pkName = "id";
    createBasicTable(tablename, pkName);

    String viewname = "testview";
    createView(viewname, "select id from testtable");

    ViewNode viewNode = getViewNode(viewname);
    assertNotNull(viewNode);
    assertTrue(viewNode.canCopy());

    Transferable transferable = (Transferable)viewNode.clipboardCopy();
    Set mimeTypes = new HashSet();
    DataFlavor[] flavors = transferable.getTransferDataFlavors();
    for (int i = 0; i < flavors.length; i++) {
        mimeTypes.add(flavors[i].getMimeType());
    }

    assertTrue(mimeTypes.contains("application/x-java-netbeans-dbexplorer-view; class=org.netbeans.api.db.explorer.DatabaseMetaDataTransfer$View"));
    assertTrue(mimeTypes.contains("application/x-java-openide-nodednd; mask=1; class=org.openide.nodes.Node"));

    dropView(viewname);
    dropTable(tablename);
}
 
Example 2
Source Project: darklaf   Source File: TabFrameTransferHandler.java    License: MIT License 6 votes vote down vote up
protected Transferable createTransferable(final JComponent c, final DragGestureEvent dge) {
    JTabFrame tabFrame = (JTabFrame) c;
    if (tabFrame.isInTransfer()) {
        currentTransferable = new TabTransferable(tabFrame, tabFrame.getTransferInfo());
    } else {
        JTabFrame.TabFramePosition ind = getUI(tabFrame).getTabIndexAt(tabFrame, dge.getDragOrigin());
        tabFrame.initTransfer(ind.getAlignment(), ind.getIndex());
        currentTransferable = new TabTransferable(tabFrame, ind);
    }
    TabFrameUI ui = getUI(c);
    createDragImage(ui);
    Alignment a = currentTransferable.transferData.tabAlignment;
    int index = currentTransferable.transferData.tabIndex;
    ui.setSourceIndicator(a, index);
    startTimer.start();
    lastTabFrame = currentTransferable.transferData.sourceTabFrame;
    return currentTransferable;
}
 
Example 3
public void pasteImage(ActionEvent actionEvent) {
    try {
        Transferable transferable = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
        if (transferable != null) {
            if (transferable.isDataFlavorSupported(DataFlavor.imageFlavor)) {
                java.awt.Image image = (java.awt.Image) transferable.getTransferData(DataFlavor.imageFlavor);
                Image fimage = awtImageToFX(image);
                ConverterApplication.getContext().addPosterIfMissingWithDelay(new ArtWorkImage(fimage));
            } else if (transferable.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
                java.util.List<String> artFiles = (java.util.List<String>) transferable.getTransferData(DataFlavor.javaFileListFlavor);

                artFiles.stream().filter(s -> ArrayUtils.contains(ArtWork.IMAGE_EXTENSIONS, FilenameUtils.getExtension(s))).forEach(f -> {
                    ConverterApplication.getContext().addPosterIfMissingWithDelay(new ArtWorkBean(f));
                });
            }
        }
    } catch (Exception e) {
        logger.error("Failed to load from clipboard", e);
        e.printStackTrace();
    }
}
 
Example 4
Source Project: mylizzie   Source File: Lizzie.java    License: GNU General Public License v3.0 6 votes vote down vote up
public static void pasteGameFromClipboardInSgf() {
    try {
        String sgfContent = null;
        // Read from clipboard
        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        Transferable clipboardContents = clipboard.getContents(null);
        if (clipboardContents != null) {
            if (clipboardContents.isDataFlavorSupported(DataFlavor.stringFlavor)) {
                sgfContent = (String) clipboardContents.getTransferData(DataFlavor.stringFlavor);
            }
        }

        if (StringUtils.isNotEmpty(sgfContent)) {
            Game game = Sgf.createFromString(sgfContent);
            loadGameToBoard(game);
        }
    } catch (Exception e) {
        logger.error("Error in copying game from clipboard.");
    }
}
 
Example 5
Source Project: jdk1.8-source-analysis   Source File: DropTargetContext.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * get the Transferable (proxy) operand of this operation
 * <P>
 * @throws InvalidDnDOperationException if a drag is not outstanding/extant
 * <P>
 * @return the <code>Transferable</code>
 */

protected Transferable getTransferable() throws InvalidDnDOperationException {
    DropTargetContextPeer peer = getDropTargetContextPeer();
    if (peer == null) {
        throw new InvalidDnDOperationException();
    } else {
        if (transferable == null) {
            Transferable t = peer.getTransferable();
            boolean isLocal = peer.isTransferableJVMLocal();
            synchronized (this) {
                if (transferable == null) {
                    transferable = createTransferableProxy(t, isLocal);
                }
            }
        }

        return transferable;
    }
}
 
Example 6
Source Project: PDF4Teachers   Source File: FileDrop.java    License: Apache License 2.0 6 votes vote down vote up
@SuppressWarnings("rawtypes")
public void dragEnter(DropTargetDragEvent e){
	
	Transferable transferable = e.getTransferable();
	DataFlavor[] types = transferable.getTransferDataFlavors();
	
	
       for(DataFlavor type : types){
          try{
             if(type.equals(DataFlavor.javaFileListFlavor)){
           	 e.acceptDrag(DnDConstants.ACTION_COPY);
                Iterator iterator = ((List) transferable.getTransferData(type)).iterator();
                File file = (File) iterator.next();
                
                if(isFileAcceptable(file)){
               	 e.acceptDrag(1);
                }else{
               	 e.rejectDrag();
                }
             }
          }catch (Exception e1){ e1.printStackTrace(); }
       }
}
 
Example 7
Source Project: Bytecoder   Source File: SunClipboard.java    License: Apache License 2.0 6 votes vote down vote up
public synchronized void setContents(Transferable contents,
                                     ClipboardOwner owner) {
    // 4378007 : Toolkit.getSystemClipboard().setContents(null, null)
    // should throw NPE
    if (contents == null) {
        throw new NullPointerException("contents");
    }

    initContext();

    final ClipboardOwner oldOwner = this.owner;
    final Transferable oldContents = this.contents;

    try {
        this.owner = owner;
        this.contents = new TransferableProxy(contents, true);

        setContentsNative(contents);
    } finally {
        if (oldOwner != null && oldOwner != owner) {
            EventQueue.invokeLater(() -> oldOwner.lostOwnership(SunClipboard.this, oldContents));
        }
    }
}
 
Example 8
Source Project: netbeans   Source File: OutputOperatorTest.java    License: Apache License 2.0 6 votes vote down vote up
/** Wait until clipboard contains string data and returns the text. */
private String getClipboardText() throws Exception {
    Waiter waiter = new Waiter(new Waitable() {

        @Override
        public Object actionProduced(Object obj) {
            Transferable contents = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
            if (contents == null) {
                return null;
            } else {
                return contents.isDataFlavorSupported(DataFlavor.stringFlavor) ? Boolean.TRUE : null;
            }
        }

        @Override
        public String getDescription() {
            return ("Wait clipboard contains string data");
        }
    });
    waiter.waitAction(null);
    return Toolkit.getDefaultToolkit().getSystemClipboard().
            getContents(null).getTransferData(DataFlavor.stringFlavor).toString();
}
 
Example 9
Source Project: netbeans   Source File: OutputTabOperatorTest.java    License: Apache License 2.0 6 votes vote down vote up
/** Wait until clipboard contains string data and returns the text. */
private String getClipboardText() throws Exception {
    Waiter waiter = new Waiter(new Waitable() {

        @Override
        public Object actionProduced(Object obj) {
            Transferable contents = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(null);
            if (contents == null) {
                return null;
            } else {
                return contents.isDataFlavorSupported(DataFlavor.stringFlavor) ? Boolean.TRUE : null;
            }
        }

        @Override
        public String getDescription() {
            return ("Wait clipboard contains string data");
        }
    });
    waiter.waitAction(null);
    return Toolkit.getDefaultToolkit().getSystemClipboard().
            getContents(null).getTransferData(DataFlavor.stringFlavor).toString();
}
 
Example 10
Source Project: netbeans   Source File: NodeTransfer.java    License: Apache License 2.0 6 votes vote down vote up
/** Find an intelligent source of paste types in a transferable.
* Note that {@link AbstractNode#createPasteTypes} looks for this
* by default, so cut/copied nodes may specify how they may be pasted
* to some external node target.
* @param t the transferable to test
* @return the intelligent source or <code>null</code> if none is in the transferable
*/
public static Paste findPaste(Transferable t) {
    try {
        if (t.isDataFlavorSupported(nodePasteFlavor)) {
            return (Paste) t.getTransferData(nodePasteFlavor);
        }
    } catch (ClassCastException cce) {
        maybeReportException(cce);
    } catch (IOException ioe) {
        maybeReportException(ioe);
    } catch (UnsupportedFlavorException ufe) {
        maybeReportException(ufe);
    }

    return null;
}
 
Example 11
Source Project: netbeans   Source File: ConnectionNodeTest.java    License: Apache License 2.0 6 votes vote down vote up
public void testClipboardCopy() throws Exception {
    JDBCDriver driver = JDBCDriver.create("foo", "Foo", "org.example.Foo", new URL[0]);
    JDBCDriverManager.getDefault().addDriver(driver);
    DatabaseConnection dbconn = DatabaseConnection.create(driver, "url", "user", "schema", "pwd", false);
    ConnectionManager.getDefault().addConnection(dbconn);

    ConnectionNode connectionNode = getConnectionNode();
    assertTrue(connectionNode != null);

    assertTrue(connectionNode.canCopy());

    Transferable transferable = (Transferable)connectionNode.clipboardCopy();
    Set mimeTypes = new HashSet();
    DataFlavor[] flavors = transferable.getTransferDataFlavors();
    for (int i = 0; i < flavors.length; i++) {
        mimeTypes.add(flavors[i].getMimeType());
    }
    assertTrue(mimeTypes.contains("application/x-java-netbeans-dbexplorer-connection; class=org.netbeans.api.db.explorer.DatabaseMetaDataTransfer$Connection"));
    assertTrue(mimeTypes.contains("application/x-java-openide-nodednd; mask=1; class=org.openide.nodes.Node"));
}
 
Example 12
Source Project: TencentKona-8   Source File: SunClipboard.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized void setContents(Transferable contents,
                                     ClipboardOwner owner) {
    // 4378007 : Toolkit.getSystemClipboard().setContents(null, null)
    // should throw NPE
    if (contents == null) {
        throw new NullPointerException("contents");
    }

    initContext();

    final ClipboardOwner oldOwner = this.owner;
    final Transferable oldContents = this.contents;

    try {
        this.owner = owner;
        this.contents = new TransferableProxy(contents, true);

        setContentsNative(contents);
    } finally {
        if (oldOwner != null && oldOwner != owner) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    oldOwner.lostOwnership(SunClipboard.this, oldContents);
                }
            });
        }
    }
}
 
Example 13
Source Project: netbeans   Source File: Models.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public int getAllowedDropActions(Transferable t) {
    if (dndNodeModel != null) {
        return dndNodeModel.getAllowedDropActions(t);
    } else {
        return DEFAULT_DRAG_DROP_ALLOWED_ACTIONS;
    }
}
 
Example 14
Source Project: jdk8u60   Source File: SunClipboard.java    License: GNU General Public License v2.0 5 votes vote down vote up
protected void lostOwnershipNow(final AppContext disposedContext) {
    final SunClipboard sunClipboard = SunClipboard.this;
    ClipboardOwner owner = null;
    Transferable contents = null;

    synchronized (sunClipboard) {
        final AppContext context = sunClipboard.contentsContext;

        if (context == null) {
            return;
        }

        if (disposedContext == null || context == disposedContext) {
            owner = sunClipboard.owner;
            contents = sunClipboard.contents;
            sunClipboard.contentsContext = null;
            sunClipboard.owner = null;
            sunClipboard.contents = null;
            sunClipboard.clearNativeContext();
            context.removePropertyChangeListener
                    (AppContext.DISPOSED_PROPERTY_NAME, sunClipboard);
        } else {
            return;
        }
    }
    if (owner != null) {
        owner.lostOwnership(sunClipboard, contents);
    }
}
 
Example 15
Source Project: jdk8u-jdk   Source File: SunClipboard.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized void setContents(Transferable contents,
                                     ClipboardOwner owner) {
    // 4378007 : Toolkit.getSystemClipboard().setContents(null, null)
    // should throw NPE
    if (contents == null) {
        throw new NullPointerException("contents");
    }

    initContext();

    final ClipboardOwner oldOwner = this.owner;
    final Transferable oldContents = this.contents;

    try {
        this.owner = owner;
        this.contents = new TransferableProxy(contents, true);

        setContentsNative(contents);
    } finally {
        if (oldOwner != null && oldOwner != owner) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    oldOwner.lostOwnership(SunClipboard.this, oldContents);
                }
            });
        }
    }
}
 
Example 16
public static void setCurrentJVMLocalSourceTransferable(Transferable t) throws InvalidDnDOperationException {
    synchronized(_globalLock) {
        if (t != null && currentJVMLocalSourceTransferable != null) {
                throw new InvalidDnDOperationException();
        } else {
            currentJVMLocalSourceTransferable = t;
        }
    }
}
 
Example 17
/**
 * @return current DataFlavors available
 */
// NOTE: This method may be called by privileged threads.
//       DO NOT INVOKE CLIENT CODE ON THIS THREAD!

public DataFlavor[] getTransferDataFlavors() {
    final Transferable    localTransferable = local;

    if (localTransferable != null) {
        return localTransferable.getTransferDataFlavors();
    } else {
        return DataTransferer.getInstance().getFlavorsForFormatsAsArray
            (currentT, DataTransferer.adaptFlavorMap
                (currentDT.getFlavorMap()));
    }
}
 
Example 18
Source Project: netbeans   Source File: DataTransferSupport.java    License: Apache License 2.0 5 votes vote down vote up
/** Paste.
*/
public final Transferable paste () throws IOException {
    try {
        Class<?> clazz = cookie.instanceClass ();
        
        // create the instance
        InstanceDataObject.create(getTargetFolder(), null, clazz);
    } catch (ClassNotFoundException ex) {
        throw new IOException (ex.getMessage ());
    }

    // preserve clipboard
    return null;
}
 
Example 19
Source Project: marathonv5   Source File: ListTransferHandler.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public boolean importData(TransferHandler.TransferSupport info) {
    if (!info.isDrop()) {
        return false;
    }

    JList list = (JList) info.getComponent();
    DefaultListModel listModel = (DefaultListModel) list.getModel();
    JList.DropLocation dl = (JList.DropLocation) info.getDropLocation();
    int index = dl.getIndex();
    boolean insert = dl.isInsert();

    // Get the string that is being dropped.
    Transferable t = info.getTransferable();
    String data;
    try {
        data = (String) t.getTransferData(DataFlavor.stringFlavor);
    } catch (Exception e) {
        return false;
    }

    // Perform the actual import.
    if (insert) {
        listModel.add(index, data);
    } else {
        listModel.set(index, data);
    }
    return true;
}
 
Example 20
@SuppressWarnings("unchecked")
private void createMenuBar() {
	JMenuItem copy = new JMenuItem("Copy");
	copy.addActionListener(ae -> TransferableUtils.copyObject(Keyframe.deepCopy(keyframes)));
	copy.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, ActionEvent.META_MASK));
	
	JMenuItem paste = new JMenuItem("Paste");
	paste.addActionListener(ae -> {
		Transferable t = Toolkit.getDefaultToolkit().getSystemClipboard().getContents(this);
		try {
			
			ArrayList<Keyframe<Serializable>> data = (ArrayList<Keyframe<Serializable>>) t.getTransferData(TransferableUtils.objectDataFlavor);
			if(data.isEmpty())
				return;
			//Yes this is ugly. There is really no better way of doing it though. Forgive me
			if(data.get(0).getValue() instanceof Double)
				keyframes = (ArrayList<Keyframe<Double>>) (Object) data;
			if(data.get(0).getValue() instanceof Float)
				keyframes = Keyframe.floatToDouble((ArrayList<Keyframe<Float>>) (Object) data);
			if(data.get(0).getValue() instanceof Integer)
				keyframes = Keyframe.intToDouble((ArrayList<Keyframe<Integer>>) (Object) data);
			
			refresh(false);
		} catch (UnsupportedFlavorException | IOException e1) {
			System.err.println("Invalid data copied");
		}
	});
	paste.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, ActionEvent.META_MASK));
	
	JMenuBar bar = new JMenuBar();
	JMenu edit = new JMenu("Edit");
	edit.add(copy);
	edit.add(paste);
	bar.add(edit);
	setJMenuBar(bar);
}
 
Example 21
Source Project: netbeans   Source File: NodeTransfer.java    License: Apache License 2.0 5 votes vote down vote up
/** Obtain a node from a transferable.
* Probes the transferable in case it includes a flavor corresponding
* to a node operation (which you must specify a mask for).
*
* @param t transferable
* @param action one of the <code>DND_*</code> or <code>CLIPBOARD_*</code> constants
* @return the node or <code>null</code>
*/
public static Node node(Transferable t, int action) {
    DataFlavor[] flavors = t.getTransferDataFlavors();

    if (flavors == null) {
        return null;
    }

    int len = flavors.length;

    String subtype = "x-java-openide-nodednd"; // NOI18N
    String primary = "application"; // NOI18N
    String mask = "mask"; // NOI18N

    for (int i = 0; i < len; i++) {
        DataFlavor df = flavors[i];

        if (df.getSubType().equals(subtype) && df.getPrimaryType().equals(primary)) {
            try {
                int m = Integer.valueOf(df.getParameter(mask)).intValue();

                if ((m & action) != 0) {
                    // found the node
                    return (Node) t.getTransferData(df);
                }
            } catch (NumberFormatException nfe) {
                maybeReportException(nfe);
            } catch (ClassCastException cce) {
                maybeReportException(cce);
            } catch (IOException ioe) {
                maybeReportException(ioe);
            } catch (UnsupportedFlavorException ufe) {
                maybeReportException(ufe);
            }
        }
    }

    return null;
}
 
Example 22
Source Project: Bytecoder   Source File: DataTransferer.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Returns a Map whose keys are all of the possible formats into which the
 * Transferable's transfer data flavors can be translated. The value of
 * each key is the DataFlavor in which the Transferable's data should be
 * requested when converting to the format.
 * <p>
 * The map keys are sorted according to the native formats preference
 * order.
 */
public SortedMap<Long,DataFlavor> getFormatsForTransferable(Transferable contents,
                                                            FlavorTable map)
{
    DataFlavor[] flavors = contents.getTransferDataFlavors();
    if (flavors == null) {
        return Collections.emptySortedMap();
    }
    return getFormatsForFlavors(flavors, map);
}
 
Example 23
Source Project: netbeans   Source File: DragAndDropHandler.java    License: Apache License 2.0 5 votes vote down vote up
private String extractText( Transferable t, DataFlavor flavor ) 
        throws IOException, UnsupportedFlavorException {
    
    Reader reader = flavor.getReaderForText(t);
    if( null == reader )
        return null;
    StringBuffer res = new StringBuffer();
    char[] buffer = new char[4*1024];
    int len;
    while( (len=reader.read( buffer )) > 0 ) {
        res.append(buffer, 0, len);
    }
    
    return res.toString();
}
 
Example 24
Source Project: freecol   Source File: TradeRouteInputPanel.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected Transferable createTransferable(JComponent c) {
    JList list = (JList)c;
    final DefaultListModel model = (DefaultListModel)list.getModel();
    int[] indicies = list.getSelectedIndices();
    List<TradeRouteStop> stops = new ArrayList<>(indicies.length);
    for (int i : indicies) stops.add(i, (TradeRouteStop)model.get(i));
    return new StopListTransferable(stops);
}
 
Example 25
Source Project: markdown-image-kit   Source File: PasteImageActionTest.java    License: MIT License 5 votes vote down vote up
@Test
public void test() throws IOException, UnsupportedFlavorException {
    Clipboard clipboard = java.awt.Toolkit.getDefaultToolkit().getSystemClipboard();
    Transferable cc = clipboard.getContents(null);
    if (cc != null && cc.isDataFlavorSupported(DataFlavor.imageFlavor)) {
        Image image = (Image) cc.getTransferData(DataFlavor.imageFlavor);
        // 保存图片
        BufferedImage bufferedImage = ImageUtils.toBufferedImage(image);
        File imageFile = new File("/Users/dong4j/Develop/",  "test.png");
        ImageIO.write(bufferedImage, "png", imageFile);
    }
}
 
Example 26
Source Project: netbeans   Source File: Models.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public Transferable clipboardCopy(Object node) throws IOException,
                                                      UnknownTypeException {
    if (filter instanceof ExtendedNodeModelFilter) {
        return ((ExtendedNodeModelFilter) filter).clipboardCopy(model, node);
    } else {
        return model.clipboardCopy(node);
    }
}
 
Example 27
Source Project: TencentKona-8   Source File: SunClipboard.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * @see java.awt.Clipboard#isDataFlavorAvailable
 * @since 1.5
 */
public boolean isDataFlavorAvailable(DataFlavor flavor) {
    if (flavor == null) {
        throw new NullPointerException("flavor");
    }

    Transferable cntnts = getContextContents();
    if (cntnts != null) {
        return cntnts.isDataFlavorSupported(flavor);
    }

    long[] formats = getClipboardFormatsOpenClose();

    return formatArrayAsDataFlavorSet(formats).contains(flavor);
}
 
Example 28
Source Project: netbeans   Source File: ItemNode.java    License: Apache License 2.0 5 votes vote down vote up
public Transferable clipboardCopy() throws IOException {
    ExTransferable t = ExTransferable.create( super.clipboardCopy() );
    
    customizeTransferable( t );
    t.put( createTransferable() );
    
    return t;
}
 
Example 29
@Override
public byte[] translateTransferable(Transferable contents,
                                    DataFlavor flavor,
                                    long format) throws IOException
{
    byte[] bytes = null;
    if (format == CF_HTML) {
        if (contents.isDataFlavorSupported(DataFlavor.selectionHtmlFlavor)) {
            // if a user provides data represented by
            // DataFlavor.selectionHtmlFlavor format, we use this
            // type to store the data in the native clipboard
            bytes = super.translateTransferable(contents,
                    DataFlavor.selectionHtmlFlavor,
                    format);
        } else if (contents.isDataFlavorSupported(DataFlavor.allHtmlFlavor)) {
            // if we cannot get data represented by the
            // DataFlavor.selectionHtmlFlavor format
            // but the DataFlavor.allHtmlFlavor format is avialable
            // we belive that the user knows how to represent
            // the data and how to mark up selection in a
            // system specific manner. Therefor, we use this data
            bytes = super.translateTransferable(contents,
                    DataFlavor.allHtmlFlavor,
                    format);
        } else {
            // handle other html flavor types, including custom and
            // fragment ones
            bytes = HTMLCodec.convertToHTMLFormat(super.translateTransferable(contents, flavor, format));
        }
    } else {
        // we handle non-html types basing on  their
        // flavors
        bytes = super.translateTransferable(contents, flavor, format);
    }
    return bytes;
}
 
Example 30
Source Project: openjdk-jdk9   Source File: DataTransferer.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Decodes URIs from either a byte array or a stream.
 */
protected URI[] dragQueryURIs(InputStream stream,
                              long format,
                              Transferable localeTransferable)
  throws IOException
{
    throw new IOException(
        new UnsupportedOperationException("not implemented on this platform"));
}