¡@

Home 

java Programming Glossary: transferable

Swing application -> Drag & drop to the desktop / folder

http://stackoverflow.com/questions/1204580/swing-application-drag-drop-to-the-desktop-folder

int action evt.getDropAction evt.acceptDrop action try Transferable data evt.getTransferable DataFlavor flavors data.getTransferDataFlavors.. evt.acceptDrop action try Transferable data evt.getTransferable DataFlavor flavors data.getTransferDataFlavors if data.isDataFlavorSupported.. import java.awt.datatransfer.Transferable import java.awt.datatransfer.UnsupportedFlavorException import..

java drag and drop

http://stackoverflow.com/questions/15520610/java-drag-and-drop

JLabel implements DragSourceListener DragGestureListener Transferable private DragSource ds private PublicUser user public PublicUserLabel.. this @Override public void drop DropTargetDropEvent e Transferable transferable e.getTransferable if transferable.isDataFlavorSupported.. drop DropTargetDropEvent e Transferable transferable e.getTransferable if transferable.isDataFlavorSupported PublicUserFlavor.publicUserFlavor..

Communication between two separate Java desktop applications

http://stackoverflow.com/questions/1680898/communication-between-two-separate-java-desktop-applications

@Override public boolean importData JComponent comp Transferable t DataFlavor transferDataFlavors t.getTransferDataFlavors for..

Enable stringFlavor of Transfersupport in Java Swing

http://stackoverflow.com/questions/17297481/enable-stringflavor-of-transfersupport-in-java-swing

TransferSupport support if canImport support return false Transferable tansferable support.getTransferable String line try line String.. support return false Transferable tansferable support.getTransferable String line try line String tansferable .getTransferData DataFlavor.stringFlavor.. import java.awt.datatransfer.Transferable import java.awt.datatransfer.UnsupportedFlavorException import..

Copy BufferedImage to clipboard

http://stackoverflow.com/questions/4552045/copy-bufferedimage-to-clipboard

BufferedImage i robot.createScreenCapture screen TransferableImage trans new TransferableImage i Clipboard c Toolkit.getDefaultToolkit.. screen TransferableImage trans new TransferableImage i Clipboard c Toolkit.getDefaultToolkit .getSystemClipboard.. public void lostOwnership Clipboard clip Transferable trans System.out.println Lost Clipboard Ownership private class..

listen to clipboard changes, check ownership?

http://stackoverflow.com/questions/5484927/listen-to-clipboard-changes-check-ownership

import java.awt.datatransfer.Transferable import java.awt.datatransfer.UnsupportedFlavorException import.. Clipboard cb gets the content of clipboard Transferable trans cb.getContents null if trans.isDataFlavorSupported DataFlavor.stringFlavor..

How can I use Drag-and-Drop in Swing to get file path?

http://stackoverflow.com/questions/811248/how-can-i-use-drag-and-drop-in-swing-to-get-file-path

this callback you'll want to check the DataFlavor of the Transferable. For Windows you can just check the DataFlavor.isFlavorJavaFileListType.. trickier. You'll need to make your own DataFlavor and the Transferable type will be different nixFileDataFlavor new DataFlavor text..

Drag and drop differences between JDK1.6 and JDK1.7

http://stackoverflow.com/questions/8700073/drag-and-drop-differences-between-jdk1-6-and-jdk1-7

and drag the URL onto the Java application. On JDK1.6 the Transferable does not support the DataFlavor.javaFileListFlavor and on JDK1.7.. import java.awt.datatransfer.Transferable import java.awt.datatransfer.UnsupportedFlavorException import.. @Override public boolean importData JComponent comp Transferable aTransferable try if aTransferable.isDataFlavorSupported DataFlavor.javaFileListFlavor..

Java - How to drag and drop JPanel with its components

http://stackoverflow.com/questions/11201734/java-how-to-drag-and-drop-jpanel-with-its-components

the display parent.invalidate parent.repaint Create our transferable wrapper Transferable transferable new PanelTransferable getPanel.. Create our transferable wrapper Transferable transferable new PanelTransferable getPanel Start the drag process... DragSource.. dge Cursor.getPredefinedCursor Cursor.MOVE_CURSOR transferable this @Override public void dragEnter DragSourceDragEvent dsde..

how to drag and drop files from a directory in java

http://stackoverflow.com/questions/13597233/how-to-drag-and-drop-files-from-a-directory-in-java

new DragUpdate false null Transferable transferable dtde.getTransferable if dtde.isDataFlavorSupported DataFlavor.javaFileListFlavor.. dtde.getDropAction try List transferData List transferable.getTransferData DataFlavor.javaFileListFlavor if transferData..

java drag and drop

http://stackoverflow.com/questions/15520610/java-drag-and-drop

public void drop DropTargetDropEvent e Transferable transferable e.getTransferable if transferable.isDataFlavorSupported PublicUserFlavor.publicUserFlavor.. e Transferable transferable e.getTransferable if transferable.isDataFlavorSupported PublicUserFlavor.publicUserFlavor e.acceptDrop.. DnDConstants.ACTION_COPY_OR_MOVE try Object o transferable.getTransferData PublicUserFlavor.publicUserFlavor System.out.println..

Enable stringFlavor of Transfersupport in Java Swing

http://stackoverflow.com/questions/17297481/enable-stringflavor-of-transfersupport-in-java-swing

final String text label.getText Transferable transferable new Transferable @Override public DataFlavor getTransferDataFlavors..

Drag and drop differences between JDK1.6 and JDK1.7

http://stackoverflow.com/questions/8700073/drag-and-drop-differences-between-jdk1-6-and-jdk1-7

URI and filelist data flavor and offering them both in the transferable. The filelist then only contains the URI's which represent a.. I cannot find this in the JDK source code as it seems the transferable transferdata is created in native code or at least code for..