AIR Drag and Drop between Windows

I can’t seem to get a simple use case to work:
I have an AIR app that has two <mx:Window> built as separate MXML components, one is called “DragSourceWindow” the other “DragTargetWindow”.  Inside the “DragSourceWindow” is a canvas that can be dragged out of the window and dropped into the “DragTargetWindow”.
Code:
“Main AIR App”: http://pastie.caboo.se/private/wxcsvvxglm7aabf3xqta
“DragTargetWindow”: http://pastie.caboo.se/private/ysgv3kpr6suiakutnvt4g
“DragSourceWindow”: http://pastie.caboo.se/private/yybaslwsfz12znygyjvva
SVN Repo: http://zclguialvgrid.googlecode.com/svn/trunk/examples/DragManagerIssue/
Inside each <mx:Window> are some trace messages to see what is going on:
   1. When a DragManager.isDragging is true
   2. When you drag into a drop target
   3. When you drop an item into a drop target
However, once you drop the canvas into a window and mouseover it again the DragManager still thinks a drag is active.
I am using the release versions of FB and AIR.
What am I doing wrong?

Nevermind, you can't use DragManager at all in AIR it seems if you leave a window.  You have to directly use the NativeDragManager.
Strange because it seems like the DragManager singleton manages that for you -- but it doesn't.

Similar Messages

  • Drag and Drop between two windows

    I would like to implement Drag and Drop between two windows for example in Windows I can take URL Address form browser and drag it and drop it in to any control that excepts String like TextField.
    I would like to have the same behavior with my Java Text Controls.
    What can I do to achieve this?

    There is no configuration for it. It should work.
    Can you try it in a different user account. If it works in a different account, then it is likely something in your current user account that is messed up. If it doesn't work in another user account, then it is likely something with Mail, itself. 
    You could try downloading and installing the 10.6.7 combo update. That may repair what is wrong.

  • Drag and drop between two different browser

    Hi All,
    Is drag and drop in flex possible behind boundaries of
    browser context?.
    Currently i have a vdividebox which contains two datagrid
    with drag and drop functionality.
    Now I want to display this datagrid in two different browsers
    and provide the drag and drop functionality between them.
    Is their any way to achieve this?
    Thanks.

    Hey
    due to Security restrictions (Sandbox) I don't believe that
    you can Drag and Drop between two Browsers with Flex, maybe this
    can be done with AIR.
    Cheers
    Dietmar

  • Drag and drop between computers

    Can you drag and drop between computers on the same network? I am using leopard and can move files via the finder; when using screen sharing it would be good to drag and drop between screens.
    GH

    GH wrote:
    Can you drag and drop between computers on the same network? I am using leopard and can move files via the finder; when using screen sharing it would be good to drag and drop between screens.
    Well, the obvious question is... did you try just dragging them between screens, and what happened? My guess is that it works - but if it doesn't, there's the nifty Get Clipboard Contents/Paste Clipboard contents commands that work between screens, and they work to copy and paste files cross-computer (which is actually much more convenient than drag-n-drop, since you don't have to worry about positioning two windows juuusst right...)
    s.

  • Still no drag and drop between tabbed documents

    Working with multiple documents opened at the same time is my everyday workflow and I'm sure I am not alone.
    When Adobe introduced tabbed view it was finally a solution to messy multiple opened documents but they omited the biggest advantage in this workflow which is drag and drop of object from one to doc to the other.
    In order to do so you have to go to Arrange button (CS5) or Window>Arrange (CS6) and choose to tile or float all documents. That is stupid and inefficient.
    What we need is to grab a layer and drag it onto a another doc tab and Photoshop should switch to that tab immediately. You can drag and drop between separate Illustrator and PS files but you can't drag and drop within PS which doesn't make any sense.
    Copy and paste is just as not as quick solution as drag and drop.
    And while you at it why not make empty space after tabs double clickable to get open document window, kind of like when you have no file opened you can double click the gray area.

    I keep tagging my agreement to this everytime I see it requested - from multiple users, including myself.
    Dragging from the layers panel seems a much more logical method to me. What's really frustrating was that we had this in CS4, and it was removed in CS5 and is still absent in CS6.

  • Drag and drop between splitpanes JAVAFX2

    Hello All,
    I have a problem wit drag and drop between splitpanes. When my circle reaches the end of the left splipane (anchorpaneLeft) it goes under the right splitpane (anchorpaneRight) and visa versa. I try with circle.ToFront(). but this only works on objects in the same anchorPane. not between anchorPanes. When the mouse pointer reaches the left anchorPane the circle is comming back.
    It try to make it as the native drag and drop from windows, when you drag an icon/shortcut into your JAVAFX application the picture is always visible also on the borders of the pane.
    @FXML
        private void dragStartAction(MouseEvent event) {
            System.out.println("Drag Start");
            Dragboard db = circle.startDragAndDrop(TransferMode.COPY);
            ClipboardContent content = new ClipboardContent();
            content.putImage(circle.getImage());
            db.setContent(content);
            event.consume();
        @FXML
        private void mouseDraggedAction(MouseEvent event) {
            System.out.println("Mouse dragged " + event.getSceneX() + " " + event.getSceneY());
            double dragX = event.getSceneX() - dragAnchor.getX();
            double dragY = event.getSceneY() - dragAnchor.getY();
            circle.setTranslateX(initX + dragX);
            circle.setTranslateY(initY + dragY);
        @FXML
        private void mousePressedAction(MouseEvent event) {
            offset = 0;
            initX = circle.getTranslateX();
            initY = circle.getTranslateY();
            dragAnchor = new Point2D(event.getSceneX(), event.getSceneY());
            System.out.println(event.getSource().toString() + " initX " + initX + "initY " + initY + "dragAnchor " + dragAnchor.getX() + "," +
                    dragAnchor.getY());
        @FXML
        private void mouseDragOverAction(DragEvent event) {
            double dragX = event.getSceneX() - dragAnchor.getX();
            //double dragX = event.getSceneX() - 110;
            double dragY = event.getSceneY() - dragAnchor.getY();
            circle.setTranslateX(initX + dragX);
            circle.setTranslateY(initY + dragY);
            event.acceptTransferModes(TransferMode.COPY);
            circle.toFront();
            event.consume();
            if (event.getTarget().equals(anchorPaneRight))
                if (!anchorPaneRight.getChildren().contains(circle))
                    //offset = -180;
                    circle.setLayoutX(-circle.getTranslateX());
                    anchorPaneRight.getChildren().add(circle);
            else if(event.getTarget().equals(anchorPaneLeft)) {
                if (!anchorPaneLeft.getChildren().contains(circle))
                    circle.setLayoutX(-circle.getTranslateX());
                    anchorPaneLeft.getChildren().add(circle);
            System.out.println("drag over " + event.getTarget().toString() + "initX " + initX +
                    " circleTranslateX " + circle.getTranslateX() + " sceneX " + event.getSceneX() +
                    " getANchorX " + dragAnchor.getX() + " dragX " + dragX );
        @FXML
        private void mouseDragEnteredAction(MouseEvent event) {
            event.consume();
            System.out.println("drag entered " + event.getTarget().toString());
        }

    GH wrote:
    Can you drag and drop between computers on the same network? I am using leopard and can move files via the finder; when using screen sharing it would be good to drag and drop between screens.
    Well, the obvious question is... did you try just dragging them between screens, and what happened? My guess is that it works - but if it doesn't, there's the nifty Get Clipboard Contents/Paste Clipboard contents commands that work between screens, and they work to copy and paste files cross-computer (which is actually much more convenient than drag-n-drop, since you don't have to worry about positioning two windows juuusst right...)
    s.

  • Drag and drop to Windows desktop

    Hi
    I've been struggling with this for a while, I've got a TransferHandler class that allows drag and drop from Windows desktop to application, now I'd like to do the reverse, but can't seem to provide the suitable DataFlavor to the OS, I'm using javaFileListFlavor obviously. I am currently creating a Transferable with createTransferable, but this is a StringSelection, and I can't remove this because I need it for internal drag and drop in the application. Please advise.
    public class CDrag extends TransferHandler {
        public CDrag(TreeTableView ttv) {
            this.ttv = ttv;
            dndData = new ArrayList();
            relPath = "/";
            try {
                uriFlavor = new DataFlavor("text/uri-list;class=java.lang.String");
            } catch (ClassNotFoundException e) {
        @Override
        public int getSourceActions(JComponent c) {
            return MOVE;
        @Override
        protected Transferable createTransferable(JComponent c) {
            String nodes = "";
            int j = 0;
            TreePath[] sel = ttv.treeTable.getTreeSelectionModel().getSelectionPaths();
            for (TreePath i : sel) {
                FileNode fNode = (FileNode) i.getLastPathComponent();
                if (j > 0) {
                    nodes = nodes + "\n";
                nodes = nodes + fNode.toString();
                j++;
            return new StringSelection(nodes);
        @Override
        protected void exportDone(JComponent c, Transferable t, int action) {
            if (!dndData.isEmpty()) {
                File[] sg = (File[]) dndData.toArray();
             // delete files that are dropped
                dndData.clear();
        @Override
        public boolean canImport(TransferSupport supp) {
            if (supp.isDataFlavorSupported(DataFlavor.stringFlavor)) {
                return true;
            if (supp.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
                return true;
            if (supp.isDataFlavorSupported(uriFlavor)) {
                return true;
            return false;
        private boolean importFiles(TransferSupport supp, File[] files) {
         // function that recursively processes all files and folders
        @Override
        public boolean importData(TransferSupport supp) {
            if (!canImport(supp)) {
                return false;
            String fns = "";
            Transferable t = supp.getTransferable();
            try {
                if (supp.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
                    File[] fnsl = (File[]) ((List) t.getTransferData(DataFlavor.javaFileListFlavor)).toArray();
                    return importFiles(supp, fnsl);
                } else if (supp.isDataFlavorSupported(uriFlavor)) {
                    String s = (String)t.getTransferData(uriFlavor);
              StringTokenizer st = new StringTokenizer(s, System.getProperty("line.separator"));
              ArrayList files = new ArrayList<File>();
              while (st.hasMoreTokens()) {
                   String file = st.nextToken();
                   try {
                           URL url = new URL(file);
                        files.add(new File(URLDecoder.decode(url.getPath())));
                   } catch (MalformedURLException mue) {
                    return importFiles(supp, (File []) files.toArray());
                } else {
                    fns = (String) t.getTransferData(DataFlavor.stringFlavor);
            } catch (UnsupportedFlavorException ex) {
                Logger.getLogger(CDrag.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(CDrag.class.getName()).log(Level.SEVERE, null, ex);
         // the rest of the code here process a StringSelection
            return true;
        private List<File> dndData;
        private String relPath;
        private DataFlavor uriFlavor;
    }I have the following information available in the FileNode class - the name of the file, the path inside the application, date modified, size, whether it is a file or folder. How do I get these values into a javaFileListFlavor that Windows will understand? Also, I would need a way of returning the actual file data (which will be read from a remote server). The basic File class doesn't allow many of these things to be set.
    Regards
    Lionel

    I have the following information available in the FileNode class - the name of the file, the path inside the application, date modified, size, whether it is a file or folder. How do I get these values into a javaFileListFlavor that Windows will understand? Also, I would need a way of returning the actual file data (which will be read from a remote server). The basic File class doesn't allow many of these things to be set.I know I tried the same thing - I'm not sure this can be done at all, it could be that this can't be done if the file doesn't already exist somewhere on the local file system.
    Edited by: tjacobs01 on Feb 11, 2009 12:41 AM

  • Drag and Drop between two JTables

    I tried to implement drag and drop between two JTables using data transfer, but i did not get it to work, that dnd works in both directions. i have my own transferhandler, but if is use setTransferHandler(handler), i'm no longer able to start a drag from that table. i also tried to use a mouse listener to call exportAsDrag, but i only works in one direction. any ideas or examples?

    That is a rather large request, and indicates that you have likely not spent much time researching the subject before posting. Read up on Swing drag & drop here (http://java.sun.com/docs/books/tutorial/dnd/), then ask specific questions about something you don't understand, problems with your implementation, etc.
    Mike

  • Drag and Drop Between two Panels

    Hi,
    I am working with Swings,i created two Panels A and B. I kept some GIF or Image in Panel A,i would like to drag the gif object in to Panel B.
    when i try like this,my mouse could not communicate with two panels A and B.mouse events working Individualey,i mean mouse events working in same panel.
    Plz let me know how to communicate with two different panels with mouse. Drag and Drop between Panel A and Panel B.
    Thanking you
    MyProblems

    You might check out the Drag and Drop tutorial, especially the section Data Transfer with a Custom Component.
    Here's another approach using an overlayed non&#8211;opaque JPanel as a transfer device. The image label is transfered to the (fake) glass pane and dragged. On mouse release it is added to the JPanel below. Although I didn't build in any boundry&#8211;checking it would be a useful thing. Mostly to ensure a suitable drop target and component location in it.
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DraggingTest
        public static void main(String[] args)
            LeftPanel left = new LeftPanel();
            JPanel right = new JPanel();
            right.setBackground(new Color(200,240,220));
            right.setLayout(null);
            JPanel panel = new JPanel(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.weightx = 1.0;
            gbc.weighty = 1.0;
            gbc.fill = gbc.BOTH;
            panel.add(left, gbc);
            panel.add(right, gbc);
            JPanel glassPanel = new JPanel();
            glassPanel.setOpaque(false);
            JPanel overlay = new JPanel();
            OverlayLayout layout = new OverlayLayout(overlay);
            overlay.setLayout(layout);
            overlay.add(glassPanel);
            overlay.add(panel);
            ImageMover mover = new ImageMover(left, right, glassPanel);
            glassPanel.addMouseListener(mover);
            glassPanel.addMouseMotionListener(mover);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(overlay);
            f.setSize(400,400);
            f.setLocation(600,325);
            f.setVisible(true);
    class LeftPanel extends JPanel
        Image image;
        JLabel label;
        public LeftPanel()
            loadImage();
            setBackground(Color.white);
            setLayout(null);
            label = new JLabel(new ImageIcon(image));
            label.setName("imageLabel");
            Dimension d = label.getPreferredSize();
            label.setBounds(40, 40, d.width, d.height);
            add(label);
        private void loadImage()
            String fileName = "images/dukeWaveRed.gif";
            try
                URL url = getClass().getResource(fileName);
                image = ImageIO.read(url);
            catch(MalformedURLException mue)
                System.out.println(mue.getMessage());
            catch(IOException ioe)
                System.out.println(ioe.getMessage());
    class ImageMover extends MouseInputAdapter
        LeftPanel left;
        JPanel right, glassPanel;
        JPanel activePanel;
        Component selectedComponent;  // imageLabel
        Point offset;
        boolean dragging, selected;
        public ImageMover(LeftPanel lp, JPanel p, JPanel gp)
            left = lp;
            right = p;
            glassPanel = gp;
            offset = new Point();
            dragging = false;
            selected = false;
        public void mousePressed(MouseEvent e)
            Point p = e.getPoint();
            // which panel is the mouse over
            if(!setActivePanel(p));
                return;
            // get reference to imageLabel or return
            selectedComponent = getImageLabel();
            if(selectedComponent == null)
                return;
            Rectangle labelR = selectedComponent.getBounds();
            Rectangle panelR = activePanel.getBounds();
            if(labelR.contains(p.x - panelR.x, p.y))
                activePanel.remove(selectedComponent);
                selected = true;
                glassPanel.add(selectedComponent);
                offset.x = p.x - labelR.x - panelR.x;
                offset.y = p.y - labelR.y - panelR.y;
                dragging = true;
        public void mouseReleased(MouseEvent e)
            Point p = e.getPoint();
            if(!contains(glassPanel, selectedComponent))
                return;
            glassPanel.remove(selectedComponent);
            setActivePanel(p);
            activePanel.add(selectedComponent);
            Rectangle r = activePanel.getBounds();
            int x = p.x - offset.x - r.x;
            int y = p.y - offset.y;
            Dimension d = selectedComponent.getSize();
            selectedComponent.setBounds(x, y, d.width, d.height);
            glassPanel.repaint();
            activePanel.repaint();
            dragging = false;
        public void mouseDragged(MouseEvent e)
            if(dragging)
                Point p = e.getPoint();
                int x = p.x - offset.x;
                int y = p.y - offset.y;
                Dimension d = selectedComponent.getSize();
                selectedComponent.setBounds(x, y, d.width, d.height);
                if(!selected)
                    activePanel.repaint();
                    selected = false;
                glassPanel.repaint();
        private boolean contains(JPanel p, Component comp)
            Component[] c = p.getComponents();
            for(int j = 0; j < c.length; j++)
                if(c[j] == comp)
                    return true;
            return false;
        private boolean setActivePanel(Point p)
            activePanel = null;
            Rectangle r = left.getBounds();
            if(r.contains(p))
                activePanel = left;
            r = right.getBounds();
            if(r.contains(p))
               activePanel = right;
            if(activePanel != null)
                return true;
            return false;
        private Component getImageLabel()
            Component[] c = activePanel.getComponents();
            for(int j = 0; j < c.length; j++)
                if(c[j].getName().equals("imageLabel"))
                    return c[j];
            return null;
    }

  • Drag and Drop between two list boxes

    Hi all
    I am working over Drag and Drop .. i have to implement Drag and Drop between two list boxes .. both list box exist in same page ..each list box have number of rows.. please give me some idea ... as i am new for JSP and Servlet...
    Thanks in advance
    Regards
    Vaibhav

    Hi all
    I am working over Drag and Drop .. i have to
    implement Drag and Drop between two list boxes ..
    both list box exist in same page ..each list box have
    number of rows.. please give me some idea ... as i am
    new for JSP and Servlet...
    Something close to what you are looking for is Select Mover in Coldtags suite:
    http://www.servletsuite.com/jsp.htm

  • Drag and Drop between two java applications

    Hi,
    I am trying to implement drag and drop between two instances of our java application. When i drop the content on the target, the data flavors are transmitted properly, but i get the exception :
    java.awt.dnd.InvalidDnDOperationException: No drop current
         at sun.awt.dnd.SunDropTargetContextPeer.getTransferData(SunDropTargetContextPeer.java:201)
         at sun.awt.datatransfer.TransferableProxy.getTransferData(TransferableProxy.java:45)
         at java.awt.dnd.DropTargetContext$TransferableProxy.getTransferData(DropTargetContext.java:359)
         at com.ditechcom.consulbeans.TDNDTree.drop(TDNDTree.java:163)
         at java.awt.dnd.DropTarget.drop(DropTarget.java:404)
         at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:547)
    How can i fix this ?
    Thanks a lot,
    Karthik

    Play with this;-import java.awt.*;
    import java.awt.datatransfer.*;
    import java.awt.dnd.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    // Credit to bbritna who I stole it from in the 'New To ..' Forum
    public class DragComps implements DragGestureListener, DragSourceListener,
                                         DropTargetListener, Transferable{
        static final DataFlavor[] supportedFlavors = { null };
        static{
              try {
                  supportedFlavors[0] = new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType);
              catch (Exception ex) { ex.printStackTrace(); }
        Object object;
        // Transferable methods.
        public Object getTransferData(DataFlavor flavor) {
               if (flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType))
             return object;
               else return null;
        public DataFlavor[] getTransferDataFlavors() {
               return supportedFlavors;
        public boolean isDataFlavorSupported(DataFlavor flavor) {
               return flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType);
        // DragGestureListener method.
        public void dragGestureRecognized(DragGestureEvent ev)    {
               ev.startDrag(null, this, this);
        // DragSourceListener methods.
        public void dragDropEnd(DragSourceDropEvent ev) { }
        public void dragEnter(DragSourceDragEvent ev)   { }
        public void dragExit(DragSourceEvent ev)        { }
        public void dragOver(DragSourceDragEvent ev) {
               object = ev.getSource(); }
        public void dropActionChanged(DragSourceDragEvent ev) { }
        // DropTargetListener methods.
        public void dragEnter(DropTargetDragEvent ev) { }
        public void dragExit(DropTargetEvent ev)      { }
        public void dragOver(DropTargetDragEvent ev)  {
               dropTargetDrag(ev); }
        public void dropActionChanged(DropTargetDragEvent ev) {
           dropTargetDrag(ev); }
        void dropTargetDrag(DropTargetDragEvent ev) {
               ev.acceptDrag(ev.getDropAction()); }
        public void drop(DropTargetDropEvent ev)    {
               ev.acceptDrop(ev.getDropAction());
                   try {
                       Object target = ev.getSource();
                      Object source = ev.getTransferable().getTransferData(supportedFlavors[0]);
                       Component component = ((DragSourceContext) source).getComponent();
                       Container oldContainer = component.getParent();
                       Container container = (Container) ((DropTarget) target).getComponent();
                       container.add(component);
                       oldContainer.validate();
                       oldContainer.repaint();
                       container.validate();
                       container.repaint();
                   catch (Exception ex) { ex.printStackTrace(); }
                   ev.dropComplete(true);
        public static void main(String[] arg)    {
              JButton button = new JButton("Drag this button");
              JLabel label = new JLabel("Drag this label");
              JCheckBox checkbox = new JCheckBox("Drag this check box");
              JFrame source = new JFrame("Source Frame");
              Container source_content = source.getContentPane();
              source.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              source_content.setLayout(new FlowLayout());
              source_content.add(button);
              source_content.add(label);
              JFrame target = new JFrame("Target Frame");
              Container target_content = target.getContentPane();
              target.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              target_content.setLayout(new FlowLayout());
              target_content.add(checkbox);
              DragComps dndListener = new DragComps();
              DragSource dragSource = new DragSource();
              DropTarget dropTarget1 = new DropTarget(source_content,
              DnDConstants.ACTION_MOVE, dndListener);
              DropTarget dropTarget2 = new DropTarget(target_content,
              DnDConstants.ACTION_MOVE, dndListener);
              DragGestureRecognizer dragRecognizer1 =
              dragSource.createDefaultDragGestureRecognizer(button,
              DnDConstants.ACTION_MOVE, dndListener);
              DragGestureRecognizer dragRecognizer2 =
              dragSource.createDefaultDragGestureRecognizer(label,
              DnDConstants.ACTION_MOVE, dndListener);
              DragGestureRecognizer dragRecognizer3 =
              dragSource.createDefaultDragGestureRecognizer(checkbox,
              DnDConstants.ACTION_MOVE, dndListener);
              source.setBounds(0, 200, 200, 200);
              target.setBounds(220, 200, 200, 200);
              source.show();
              target.show();
    }[/code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Drag and drop of Windows icons inside Java......possible ?

    Hi all !
    does anybody know if it's possible to do drag and drop of windows icons (like folders) into Java Frames or other containers ?
    I'd like to write an application where the user can drag Windows folders inside a Frame/Container and collect Folder information (the path to the folder)
    Is it possible to do it ?
    Thanks a lot
    Francesco

    Hi,
    It is possible.
    You can drag platform independent objects like folders, icons etc. from the native platform to your java app.
    The Java-Object you need in this case is a
    DataFlavour like
    DataFlavor.stringFlavor // for text
    DataFlavor.javaFileListFlavor // for folders
    in the tutorial jacob has linked you find more about this.
    Olek

  • Drag And drop between 2 UITableViewCells

    Hi i am new to this objective -c and cocoa touch's world.
    Can anyone tell me or share some code/link how to drag and drop between 2 UITable View cells.
    I googled found some code snippets but that doesn't worked effectively.
    http://tuts9.com/questions/65890/tutorial-on-how-to-drag-and-drop-item-from-uita bleview-to-uitableview.
    Cheers

    check this link, it has a very similar example: (with list
    component and removes the item from the old list)
    http://livedocs.adobe.com/flex/3/html/help.html?content=dragdrop_7.html
    check the dragOver event of the destination component. You
    can reject the drag and add a copy to your list or accept the drag
    and add a copy to the source's list.

  • Activating Drag and Drop As window in jdevstudio1013

    Dear All,
    I'm using jdevstudio1013.I don't see Drag And Drop As Window below Component window.Instead I see Property Inspecter Window .
    How to activate Drop And Drag As window?
    With rgds,
    Shrinaw

    Hi,
    The project is set as a JSF project.
    And yes, there are the following error messages in the console when trying to drop a method into the page. The create command button / link dialog appears, and after choosing an option, nothing happens.
    2007.07.30. 9:34:39 oracle.javatools.logging.LogUtils log
    WARNING: Exception in task oracle.bali.xml.model.XmlModel$4@ebad43 on model orac
    le.jdevimpl.webapp.jsp.JspXmlModel@eefa28; txn name=internal txn
    oracle.jdevimpl.webapp.model.content.dom.util.ModelDomUtil$InvalidArgumentXmlException: Body node is not valid location for inserting Messages element. Try inserting at another location in the document.
    at oracle.jdevimpl.webapp.model.content.dom.util.ModelDomUtil._doInsertNodes(ModelDomUtil.java:1716)
    at oracle.jdevimpl.webapp.model.content.dom.util.ModelDomUtil.doInsertNodes(ModelDomUtil.java:1599)
    at oracle.jdevimpl.webapp.common.WebAppXmlModel.insertNodesImpl(WebAppXmlModel.java:124)
    at oracle.bali.xml.model.XmlModel$4.performTask(XmlModel.java:1414)
    at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
    at oracle.bali.xml.model.XmlModel.insertNodes(XmlModel.java:1384)
    at oracle.jdevimpl.webapp.editor.LayoutXmlView$1.performTask(LayoutXmlView.java:194)
    at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
    at oracle.jdevimpl.webapp.editor.LayoutXmlView.insertNodes(LayoutXmlView.java:181)
    at oracle.bali.xml.model.AbstractModel$1.performTask(AbstractModel.java:466)
    at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:190)
    at oracle.bali.xml.model.AbstractModel.insertXmlKey(AbstractModel.java:447)
    at oracle.adfdtinternal.view.faces.addin.ADFBindingXmlContextListener$AddMessagesPostInsertionTask.performTask(ADFBindingXmlContextListener.java:227)
    at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
    at oracle.adfdtinternal.view.common.binding.operation.CreateOperation$1.
    performTask(CreateOperation.java:170)
    at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(Sta
    ndardTransactionTask.java:167)
    at oracle.adfdtinternal.view.common.binding.operation.CreateOperation.apply(CreateOperation.java:147)
    at oracle.bali.xml.model.datatransfer.operation.PerformOperationAction.actionPerformed(PerformOperationAction.java:39)
    at oracle.bali.xml.share.ActionProxy.actionPerformed(ActionProxy.java:47)
    at oracle.bali.xml.gui.swing.dnd.DropMenuInvoker$CleanupProxy.actionPerformed(DropMenuInvoker.java:235)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    2007.07.30. 9:34:39 oracle.javatools.logging.LogUtils log
    WARNING: Exception in task oracle.jdevimpl.webapp.editor.LayoutXmlView$1@bc1eb2
    on model oracle.jdevimpl.webapp.editor.LayoutXmlView@18587fe; txn name=internal
    txn (exception previously logged)
    2007.07.30. 9:34:39 oracle.javatools.logging.LogUtils log
    WARNING: Exception in task oracle.bali.xml.model.AbstractModel$1@833c98 on model
    oracle.jdevimpl.webapp.editor.LayoutXmlView@18587fe; txn name=Insert Messages (exception previously logged)
    2007.07.30. 9:34:39 oracle.javatools.logging.LogUtils log
    WARNING: Exception in task oracle.adfdtinternal.view.faces.addin.ADFBindingXmlContextListener$AddMessagesPostInsertionTask@1ff5bf1 on model oracle.jdevimpl.webapp.editor.LayoutXmlView@18587fe; txn name=Add faces messages task (exception previously logged)
    2007.07.30. 9:34:39 oracle.javatools.logging.LogUtils log
    WARNING: Exception in task oracle.adfdtinternal.view.common.binding.operation.CreateOperation$1@1ed3ca7 on model oracle.jdevimpl.webapp.editor.LayoutXmlView@18587fe; txn name=Create ADF Command Button (exception previously logged)
    oracle.jdevimpl.webapp.model.content.dom.util.ModelDomUtil$InvalidArgumentXmlException: Body node is not valid location for inserting Messages element. Try inserting at another location in the document.
    at oracle.jdevimpl.webapp.model.content.dom.util.ModelDomUtil._doInsertNodes(ModelDomUtil.java:1716)
    at oracle.jdevimpl.webapp.model.content.dom.util.ModelDomUtil.doInsertNodes(ModelDomUtil.java:1599)
    at oracle.jdevimpl.webapp.common.WebAppXmlModel.insertNodesImpl(WebAppXm
    lModel.java:124)
    at oracle.bali.xml.model.XmlModel$4.performTask(XmlModel.java:1414)
    at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
    at oracle.bali.xml.model.XmlModel.insertNodes(XmlModel.java:1384)
    at oracle.jdevimpl.webapp.editor.LayoutXmlView$1.performTask(LayoutXmlView.java:194)
    at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
    at oracle.jdevimpl.webapp.editor.LayoutXmlView.insertNodes(LayoutXmlView.java:181)
    at oracle.bali.xml.model.AbstractModel$1.performTask(AbstractModel.java:466)
    at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:190)
    at oracle.bali.xml.model.AbstractModel.insertXmlKey(AbstractModel.java:447)
    at oracle.adfdtinternal.view.faces.addin.ADFBindingXmlContextListener$AddMessagesPostInsertionTask.performTask(ADFBindingXmlContextListener.java:227)
    at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
    at oracle.adfdtinternal.view.common.binding.operation.CreateOperation$1.performTask(CreateOperation.java:170)
    at oracle.bali.xml.model.task.StandardTransactionTask.runThrowingXCE(StandardTransactionTask.java:167)
    at oracle.adfdtinternal.view.common.binding.operation.CreateOperation.apply(CreateOperation.java:147)
    at oracle.bali.xml.model.datatransfer.operation.PerformOperationAction.a
    ctionPerformed(PerformOperationAction.java:39)
    at oracle.bali.xml.share.ActionProxy.actionPerformed(ActionProxy.java:47)
    at oracle.bali.xml.gui.swing.dnd.DropMenuInvoker$CleanupProxy.actionPerformed(DropMenuInvoker.java:235)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
    at java.awt.Component.processMouseEvent(Component.java:5488)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
    at java.awt.Component.processEvent(Component.java:5253)
    at java.awt.Container.processEvent(Container.java:1966)
    at java.awt.Component.dispatchEventImpl(Component.java:3955)
    at java.awt.Container.dispatchEventImpl(Container.java:2024)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
    at java.awt.Container.dispatchEventImpl(Container.java:2010)
    at java.awt.Window.dispatchEventImpl(Window.java:1774)
    at java.awt.Component.dispatchEvent(Component.java:3803)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Thanks,
    Patrik
    (PS.: Is it the right thread or should I start another one?)

  • Cant drag and drop in windows 7

    cant drag and drop in windows 7 with itunes

    Same exact problem.  Drag and drop is not working in any fashion.  I cant drag files to the library or to the ipod.
    Itunes 10.4 Windows 7 64
    Any Help??!?

Maybe you are looking for

  • I get a download error when I try to update to 10.5 for Windows 64 bit.

    I had to revert back to previous version but library file is the new version.  It starts downloading like normal and then begins to back up.  I tried to do it manual with same results.  Any ideas?

  • Often no connection to my mac mini

    the connection between my mac mini and my apple tv  2 is no ok. often ther is an interrupted connection. between iphone 4 and ipad the connection is ok. why?? thank you for your help cnwug

  • 8.1.7 install problem

    I tried to install Oracle 8.1.7 standard edition on Red Hat Linux 8.1.7. After installing all the selected products the network configuration assistant started and never returned. When I try to use any of the assistants (netasst, dbassist, ...) they

  • How to make an instr in javascript

    Dear all, I need to extract some information in a javascript function. In sql we can do like this substr(:P3_APP_AVS_ID, 1, instr(:P3_APP_AVS_ID,'__')-1) How I can do it in javascript. Thanks Eric

  • Flash Player 14   Windows 7 --  Pick a browser

    Hi,  I'm trying to install Flash Player 14 on Windows 7.  All I get is the Installer window that sits there and does nothing.  Gray screen, no progression display, nothing.  I even let it sit there for 2 hours (on a high speed broad band internet min