Undo Drag and Drop

How to implement undo operation on JTree nodes drag and drop in swings ?

Mike,
You are correct. JDeveloper 9.0.5 does not support any form of multi-file undo. This feature is being investigated for a future release.
For now, you need to clean up the bindings manually from the UIModel tab of the structure pane.
-brian
Team JDeveloper/UIX

Similar Messages

  • I recently attempted to save my Notes in Macmail by dragging and dropping them into the Notes folder. On my most recent sync all Notes were deleted. Is there a way to undo this?

    I recently attempted to save my Notes in Macmail by dragging and dropping them into the Notes folder. On my most recent sync all Notes were deleted. Is there a way to undo this?

    Garret,
    is your movie in your backup folder a Quicktime movie? Then probably only have the Quicktime wrapper in your backup folder, but not the referenced media in the file fork of the movie. If you see the full quality movie in iPhoto in QuickTime player, don't drag it from the browser to the Desktop, but use "File > Reveal in Finder > Original File" to show the movie in your iPhoto Library. Select the Movie when it is revealed and ctrl-click it to open it in Quicktime Player.
    Export it from Quicktime Player with "Export to" and share it to iTunes. This way it will be converted to a .mp4 movie that embeds the missing resources.
    You can drag the converted movie from iTunes to the Desktop or share it using to Media Browser to other applications.
    Regards
    Léonie

  • Drag and Drop of cell content between 2 tables

    Hi Guys,
    Iam into implementing drag and drop of cell contents between 2 different tables,say Table1 and Table2.(Iam not dragging and dropping rows or cells,Just copying the content of one cell to another).
    Have extended the java tutorial class "TableTransferHandler" and "StringTransferHandler" under http://java.sun.com/docs/books/tutorial/uiswing/examples/dnd/index.html#ExtendedDndDemo to satisfy my needs.
    The drag is enabled for Table1 and table2 as follows.
    jTable1.setDragEnabled(true);
    jTable1.setTransferHandler(new TableTransferHandler());
    jTable2.setDragEnabled(true);
    jTable2.setTransferHandler(new TableTransferHandler());
    Dont be taken aback with the code I have put.It just to show what I have done..
    My questions are put at the end of the post..
    //String Transfer Handler class.
    public abstract class StringTransferHandler extends TransferHandler {
        protected abstract String exportString(JComponent c);
        protected abstract void importString(JComponent c, String str);
        protected abstract void cleanup(JComponent c, boolean remove);
        protected Transferable createTransferable(JComponent c) {
            return new StringSelection(exportString(c));
        public int getSourceActions(JComponent c) {
            return COPY_OR_MOVE;
        public boolean importData(JComponent c, Transferable t) {
            if (canImport(c, t.getTransferDataFlavors())) {
                try {
                    String str = (String)t.getTransferData(DataFlavor.stringFlavor);
                    importString(c, str);
                    return true;
                } catch (UnsupportedFlavorException ufe) {
                } catch (IOException ioe) {
            return false;
        protected void exportDone(JComponent c, Transferable data, int action) {
            cleanup(c, action == MOVE);
        public boolean canImport(JComponent c, DataFlavor[] flavors) {
              JTable table = (JTable)c;         
             int selColIndex = table.getSelectedColumn();
            for (int i = 0; i < flavors.length; i++) {
                if ((DataFlavor.stringFlavor.equals(flavors))&& (selColIndex !=0)) {
    return true;
    return false;
    }//TableTransferHandler classpublic class TableTransferHandler extends StringTransferHandler {
    private int[] rows = null;
    private int addIndex = -1; //Location where items were added
    private int addCount = 0; //Number of items added.
    protected String exportString(JComponent c) {
    JTable table = (JTable)c;
    rows = table.getSelectedRows();
    StringBuffer buff = new StringBuffer();
    int selRowIndex = table.getSelectedRow();
    int selColIndex = table.getSelectedColumn();
    String val = table.getValueAt(selRowIndex,selColIndex).toString();
    buff.append(val);
    return buff.toString();
    protected void importString(JComponent c, String str) {
    JTable target = (JTable)c;
    DefaultTableModel model = (DefaultTableModel)target.getModel();
    //int index = target.getSelectedRow();
    int row = target.getSelectedRow();
    int column = target.getSelectedColumn();
    target.setValueAt(str, row, column);
    protected void cleanup(JComponent c, boolean remove) {
    }Now I want to put in the following functionality into my program...
    [1]prevent dragging and dropping text in to the same table.That means I dont want to drag a cell content from Table1  and drop to another cell in Table1. Want to drag and drop cell content only from Table1 to Table2.
    [2]Change cursor on a un-defined Target. That means how to prevent a drag from a particular column in Table1.Also how to prevent a drop to a particular column in Table2. How to change the cursor to a "NO-DRAG" cursoror "NO-DROP" cursor.
    Could it be done using Drag Source Listener and drop Target Listener?.
    If yes,How can these listeners attached to the table and how to do it?
    If No,How Could it be done?
    [3]Want to change the background colour of the cell being dragged and also the background colour of the target cell where the drop is made...
    [4]Is there any out of the box way to make an undo in the target cell(where drop was made) so that the old cell value is brought back.
    How can I extend my code to take care of the above said things.
    Any help or suggestions is greatly appreciated.....
    Edited by: Kohinoor on Jan 17, 2008 10:58 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi Guys,
    Iam into implementing drag and drop of cell contents between 2 different tables,say Table1 and Table2.(Iam not dragging and dropping rows or cells,Just copying the content of one cell to another).
    Have extended the java tutorial class "TableTransferHandler" and "StringTransferHandler" under http://java.sun.com/docs/books/tutorial/uiswing/examples/dnd/index.html#ExtendedDndDemo to satisfy my needs.
    The drag is enabled for Table1 and table2 as follows.
    jTable1.setDragEnabled(true);
    jTable1.setTransferHandler(new TableTransferHandler());
    jTable2.setDragEnabled(true);
    jTable2.setTransferHandler(new TableTransferHandler());
    Dont be taken aback with the code I have put.It just to show what I have done..
    My questions are put at the end of the post..
    //String Transfer Handler class.
    public abstract class StringTransferHandler extends TransferHandler {
        protected abstract String exportString(JComponent c);
        protected abstract void importString(JComponent c, String str);
        protected abstract void cleanup(JComponent c, boolean remove);
        protected Transferable createTransferable(JComponent c) {
            return new StringSelection(exportString(c));
        public int getSourceActions(JComponent c) {
            return COPY_OR_MOVE;
        public boolean importData(JComponent c, Transferable t) {
            if (canImport(c, t.getTransferDataFlavors())) {
                try {
                    String str = (String)t.getTransferData(DataFlavor.stringFlavor);
                    importString(c, str);
                    return true;
                } catch (UnsupportedFlavorException ufe) {
                } catch (IOException ioe) {
            return false;
        protected void exportDone(JComponent c, Transferable data, int action) {
            cleanup(c, action == MOVE);
        public boolean canImport(JComponent c, DataFlavor[] flavors) {
              JTable table = (JTable)c;         
             int selColIndex = table.getSelectedColumn();
            for (int i = 0; i < flavors.length; i++) {
                if ((DataFlavor.stringFlavor.equals(flavors))&& (selColIndex !=0)) {
    return true;
    return false;
    }//TableTransferHandler classpublic class TableTransferHandler extends StringTransferHandler {
    private int[] rows = null;
    private int addIndex = -1; //Location where items were added
    private int addCount = 0; //Number of items added.
    protected String exportString(JComponent c) {
    JTable table = (JTable)c;
    rows = table.getSelectedRows();
    StringBuffer buff = new StringBuffer();
    int selRowIndex = table.getSelectedRow();
    int selColIndex = table.getSelectedColumn();
    String val = table.getValueAt(selRowIndex,selColIndex).toString();
    buff.append(val);
    return buff.toString();
    protected void importString(JComponent c, String str) {
    JTable target = (JTable)c;
    DefaultTableModel model = (DefaultTableModel)target.getModel();
    //int index = target.getSelectedRow();
    int row = target.getSelectedRow();
    int column = target.getSelectedColumn();
    target.setValueAt(str, row, column);
    protected void cleanup(JComponent c, boolean remove) {
    }Now I want to put in the following functionality into my program...
    [1]prevent dragging and dropping text in to the same table.That means I dont want to drag a cell content from Table1  and drop to another cell in Table1. Want to drag and drop cell content only from Table1 to Table2.
    [2]Change cursor on a un-defined Target. That means how to prevent a drag from a particular column in Table1.Also how to prevent a drop to a particular column in Table2. How to change the cursor to a "NO-DRAG" cursoror "NO-DROP" cursor.
    Could it be done using Drag Source Listener and drop Target Listener?.
    If yes,How can these listeners attached to the table and how to do it?
    If No,How Could it be done?
    [3]Want to change the background colour of the cell being dragged and also the background colour of the target cell where the drop is made...
    [4]Is there any out of the box way to make an undo in the target cell(where drop was made) so that the old cell value is brought back.
    How can I extend my code to take care of the above said things.
    Any help or suggestions is greatly appreciated.....
    Edited by: Kohinoor on Jan 17, 2008 10:58 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Possible Bug with Drag-and-Drop Being Published via HTML5 - Getting "Undefined" Error When Dragging Object

    Hello,
    I came up with a way to use drag-and-drop interactions that will take advantage of file input so that I may create a drag-and-drop interaction that uses one draggable object over and over allowing multiple scoring/tracking possibilities.  Example use...is having the draggable object be dynamic in that it randomly changes its text so that a learner can drag a term it's possible classification.........thus allowing the possibility of having many terms easily loaded without having to redo a drag-and-drop interaction for each needed terms/classifications updates/changes.
    My Issue: When using a variable to represent the text for a draggable Smart Shape object, I'm getting the error message "undefined" when, clicking/pressing on the object, as well as during the drag of the object. This issue occurs when publishing the project in an HTML5 format.  Flash interestingly enough seems to work perfect...but we are not interested in publishing via Flash any longer.
    To better help you explore this error message, I've set up a test project so that you can see when and how the "undefined" message shows up during a drag-and-drop interaction.  I've also included the Captivate 8 project file used to make the exploration project I'm sharing in this post.
    Link to Captivate project I created for you all to explore "undefined" error message": http://iti.cscc.edu/drag_and_drop_bug/
    Link to this Captivate 8 Project file: http://iti.cscc.edu/drag_and_drop_bug.cptx
    It's pretty interesting how things react in this demo, please try the following actions to see some interesting happenings:
    Drag the Yellow (or variable drag box) to the drag target.
    Drag Black Hello square to Drag target and click undo or reset - watch the undefined message come up on the Yellow (or variable drag box).
    Drag the Yellow (or variable drag box) to the drag target and then use the undo or reset.
    Move both draggable boxes to the drag target and use the undo and reset buttons...
    Anyhow, I know you all are sharp and will run the demo through its paces.
    I'd really be very honored if anyone help me figure out how I could (when publishing out to HTML5) no longer have the "undefined" error message show up when using drag-and-drop with a variable for shape text. This technique has been well received at the college I work at...and I have many future project requests for using such an idea on a variety of similar interactions. I'd love see a solution or see if this might be a bug Adobe may be able to fix!
    I tried to find a solution to the issue documented here for quite some time, but I was not able to find anyone with this problem much less attempting the idea I'm sharing in the help request -  save the darn "undefined" message that comes up!
    Many thanks in advance for any help and/or direction that you all may be able to provide,
    Paul

    Hello,
    I just wanted to supply a minor update related to my drag-and-drop question/issue stated above:
    I did another test using Captivate 7, and found that the undefined error (publishing as HTML5) does not appear and the variable data remains visible - except the variable data turns very small and does not honor any font size related settings.
    I did go ahead and submit this to Adobe as a possible bug today.
    Thanks again for any help related to this issue.  If the issued documented above is solved, it will allow many amazing things to be done using Captivate's drag-and-drop for both regular type projects as well as interaction development for iBooks! 
    Matter of fact if this issue gets fixed, I'll publish a Blog entry (or video) on way's I've used Captivate's drag-and-drop to create dynamic learning activities for Higher Ed. and for use in iBooks.
    ~ Paul

  • Preventing drag and drop

    I've been working very hard to keep my play lists organized and every so often I'll accidentally drag and drop one play list into another. Is there a way to stop this from happening? I like the power to be able to drag groups of songs and such but I don't want to be able to just click on a play list's name and drag and drop it into another one. Any suggestions would be appreciated.

    There is no way to prevent it, and no "Undo" if you do it accidentally. Sorry.
    As an experiment, go to your Settings in Control Panel and try a lower pixel count. This may make the display and associated mouse operations a bit less error-prone.

  • I want to Sync my iPhone 4 to iTunes however I get an error message from iTunes each time I connect the phone to the PC saying that I should restore to factory settings. Frustrating because it's already annoying enough that I can't drag and drop mp3's!!!

    I have never been so frustrated before in my life with any phone. I find it obnoxious as it is that I cannot simply drag and drop files (especially MP3's) straight from my PC directly into my phone, which I have been used to doing up until now. Everyone who convinced me to get the iPhone has instructed me that my frustration can be fixed by downloading iTunes and syncing it all up via that program (which I have never used before). So, I downloaded the program successfully, however when I connect the iPhone 4 to the PC and iTunes is open, I get an error message that 'iTunes cannot read the content of the iPhone "iPhone" and that I should go to the Preferences tab of the iPhone and select 'restore' to restore this phone to factory settings. First of all, I don't understand why I need to do that. I have already downloaded apps and other important things in the 2 days that I have the phone. I am also scared that it will erase my contacts. This is such a headache. Music is very imporatant to me, but I am getting so frustrated that I don't have freedom over the phone which I thought was supposed to be one of the best out there. I would really appreciate help in this matter. I am sure the phone is great but I am on the verge of taking it back and getting something else.

    Hey joshuafromisr,
    If you resintall iTunes, it should fix the issue. The following document will go over how to remove iTunes fully and then reinstall. Depending on what version of Windows you're running you'll either follow the directions here:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    http://support.apple.com/kb/HT1925
    or here:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    http://support.apple.com/kb/HT1923
    Best,
    David

  • When I drag and drop an icon from the address bar to the desktop is does creat the shortcut but will not display the website icon, only the firefox icon, how can I display website icons?

    When I drag and drop a website icon from the Forefox address bar to the desk top, the short cut is created but the icon that appears is the firefox Icon. I want to disply the icon from the website that the short cut refers to. I have checked all I can think of in my computer to no avail.

    You have to assign the favicon yourself to the desktop shortcut (right-click the shortcut: Properties) after you have dragged the link to the desktop.
    You can usually find the favicon in Tools >Page Info > Media and save the icon there.
    Otherwise use the main domain of the website and add favicon.ico (e.g. mozilla.com/favicon.ico ) to display the favicon in a tab and save that image to a folder.

  • Is there any way of dragging and dropping an iCal event showing in week view across to a date in the left sidebar monthly calendar?

    Hi, Im not a frequent forum poster, as most of my questions can be found already answered on them!
    This is a question Ive had for a long time and it amazes me that no-one else seems to ask it. I check at each OS upgrade but its never there...
    Is there any way of dragging and dropping an iCal event showing in week view across to a date in the left sidebar monthly calendar?
    I was able to do this years ago in MS Outlook, and utilized it all the time when I needed to push things back, now I have to open the event and select an new date in the drop-down calendar for each & every event I want to move to a new month at the end of the month.
    If its definitely not possible, how to you ask apple to consider including it - it doesnt seem like a particularly difficult task.
    Thankyou
    Andrew.

    Andrew,
    Is there any way of dragging and dropping an iCal event showing in week view across to a date in the left sidebar monthly calendar?
    No, but you can use cut/paste. Cut (⌘X) the event, then click on the week where you want to move the event, and Paste (⌘V).
    If you have a suggestion for Apple to change that method use: Apple - Mac OS X - Feedback.

  • Why does not drag and drop work?!

    Hello,
    I am trying to implent a drag and drop from a table to an icon representing a trash.
    The drop handler fails in converting the selected rows to a list:
    com.sun.el.MethodExpressionImpl@87d9c00d javax.el.ELException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
    Could you help me to understand why? Below are the details.
    This is the af:table:
    <af:table var="row" rowBandingInterval="0" id="t1"
    value="#{bindings.MyView1.collectionModel}"
    rowSelection="multiple"
    columnStretching="last"
    horizontalGridVisible="false"
    verticalGridVisible="false" fetchSize="-1"
    autoHeightRows="6" width="190"
    disableColumnReordering="true">
    <af:column sortable="true" headerText="Entry" id="c1"
    align="start">
    <af:outputText value="#{row.Description}" id="ot1"/>
    </af:column>
    <af:dragSource actions="MOVE" defaultAction="MOVE"
    discriminant="delete"/>
    </af:table>
    This is the drop area:
    <af:image source="Images/empty_trash_32.png" id="i2">
    <af:dropTarget dropListener="#{backingBeanScope.DropHandlerBean.dropHandler}"
    actions="MOVE">
    <af:dataFlavor flavorClass="org.apache.myfaces.trinidad.model.RowKeySet"
    discriminant="delete"/>
    </af:dropTarget>
    </af:image>
    This is the failing listener listener (the failing point is bold):
    public DnDAction dropHandler(DropEvent dropEvent) {
    DnDAction dnda = DnDAction.NONE;
    if (dropEvent.getProposedAction() == DnDAction.MOVE) { // delete
    RichTable table = (RichTable)dropEvent.getDragComponent();
    //determine the rows that are dragged over
    Transferable t = dropEvent.getTransferable();
    //when looking for data, use the same discriminator as defined
    //on the drag source
    DataFlavor<RowKeySet> df =
    DataFlavor.getDataFlavor(RowKeySet.class, "delete");
    RowKeySet rks = t.getData(df);
    if (rks == null) {
    return DnDAction.NONE;
    Iterator iter = rks.iterator();
    while (iter.hasNext()) {
    //get next selected row key
    System.out.println(rks.toArray().length); // the number of selected rows is ok
    List key = (List)iter.next(); // here gives: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
    //make row current so we can access it
    table.setRowKey(key);
    //the table model represents its row by the ADF binding class,
    //which is JUCtrlHierNodeBinding
    JUCtrlHierNodeBinding rowBinding =
    (JUCtrlHierNodeBinding)table.getRowData();
    Row row = (Row)rowBinding.getRow();
    //delete row;
    row.remove();
    //activate animation
    dnda = DnDAction.MOVE;
    return dnda;
    thanks.

    I did try, I obtained this:
    java.lang.NullPointerException
    Why NullPointerException?
    I don't know if this helps, but consider that the collection model comes from a ViewObject built on three EOs with many fields, although the table only shows one column.
    This is the Iterator in my pageDef:
    <table IterBinding="MyView1Iterator" id="MyView1">
    <AttrNames>
    <Item Value="Cod1"/>
    <Item Value="Cod2"/>
    <Item Value="Cod3"/>
    <Item Value="Cod4"/>
    <Item Value="Description"/>
    <Item Value="Cod5"/>
    </AttrNames>
    </table>
    Any idea?
    I will see the Key content with the debugger.

  • Did my first back up today using external hard drive and time machine now i can't drag and drop

    Hi, i did my first back up today using time machine it all went onto my external hard drive fine. Now i cant drag and drop anyhting. I assume ive cahnged some settings in time machine but cant figure it out what to do can some one help ?
    thanks

    Brandbasher wrote:
    Thanks Pondini but i have closed time machine, removed external hard drive.
    Did you eject it first?
    Now i cant drag and drop anything on my desk top, or mail or any other application. Ive tried moving folders, documents none of it works. Even moving around documents within a folder, it wont let me chnage the position of files.
    That shouldn't be related to Time Machine (especially if the backups aren't mounted).
    What happens when you try those things?  Do you get any messages?  Anything you can post a screenshot of?
    Have you tried a Restart?
    Does it happen in another user account?  (If you don't have one, create one via System Prefs > Users & Groups.)

  • Drag and Drop (re-order) Thumbnails in Organizer

    I am using Photoshop Elements version 5.0.2
    I would like to re-order pictures in an order that will make sense for me in my business. I suppose I can go through each pix and change the time on them, so I can then sort by time stamp.
    Is there an easier way to do this? I was hopeful that I could drag and drop them in Thumbnail view - but I cannot.
    Thank you,
    Jamie

    >Is there anyway to delete the photos in the main well, without losing them from my collection?
    As I understand the design, the main well is intended to be all the photos that you are managing with Photoshop Elements.
    Collections are used to display a specific group of those photos in your chosen sequence for any given activity.
    I suspect that since you are using a consumer product such as Photoshop Elements for your business purpose, you may need to make some compromises like having a default (the main photo well) display sequence which you see first when starting PSE that is not what you would choose.
    This is not bad if PSE does what you want - just additional steps to switch to the Collection view and also to maintain (drag and drop) the sequencing of the collection when you add additional photo files to a Collection.

  • Problems with ListViews Drag and Drop

    I'm surprised that there isn't an Active X control that can do this more
    easily? Would
    be curious to find out if there is - although we aren't really embracing the
    use of
    them within Forte because it locks you into the Microsoft arena.
    ---------------------- Forwarded by Peggy Lynn Adrian/AM/LLY on 02/03/98 01:33
    PM ---------------------------
    "Stokesbary, Michael" <[email protected]> on 02/03/98 12:19:52 PM
    Please respond to "Stokesbary, Michael" <[email protected]>
    To: "'[email protected]'" <[email protected]>
    cc:
    Subject: Problems with ListViews Drag and Drop
    I am just curious as to other people's experiences with the ListView
    widget when elements in it are set to be draggable. In particular, I am
    currently trying to design an interface that looks a lot like Windows
    Explorer where a TreeView resides on the left side of the window and a
    ListView resides on the right side. Upon double clicking on the
    ListView, if the current node that was clicked on was a folder, then the
    TreeView expands this folder and the contents are then displayed in the
    ListView, otherwise, it was a file and it is brought up in Microsoft
    Word. All this works great if I don't have the elements in the ListView
    widget set to be draggable. If they are set to be draggable, then I am
    finding that the DoubleClick event seems to get registered twice along
    with the ObjectDrop event. This is not good because if I double click
    and the current node is a folder, then it will expand this folder in the
    TreeView, display the contents in the ListView, grab the node that is
    now displayed where that node used to be displayed and run the events
    for that as well. What this means, is that if this is a file, then Word
    is just launched and no big deal. Unfortunately, if this happens to be
    another directory, then the previous directory is dropped into this
    current directory and a recursive copy gets performed, giving me one
    heck of a deep directory tree for that folder.
    Has anybody else seen this, or am I the only lucky one to experience.
    If need be, I do have this exported in a .pex file if anybody needs to
    look at it more closely.
    Thanks in advance.
    Michael Stokesbary
    Software Engineer
    GTE Government Systems Corporation
    tel: (650) 966-2975
    e-mail: [email protected]

    here is the required code....
    private static class TreeDragGestureListener implements DragGestureListener {
         public void dragGestureRecognized(DragGestureEvent dragGestureEvent) {
         // Can only drag leafs
         JTree tree = (JTree) dragGestureEvent.getComponent();
         TreePath path = tree.getSelectionPath();
         if (path == null) {
              // Nothing selected, nothing to drag
              System.out.println("Nothing selected - beep");
              tree.getToolkit().beep();
         } else {
              DefaultMutableTreeNode selection = (DefaultMutableTreeNode) path
                   .getLastPathComponent();
              if (selection.isLeaf()) {
              TransferableTreeNode node = new TransferableTreeNode(
                   selection);
              dragGestureEvent.startDrag(DragSource.DefaultCopyDrop,
                   node, new MyDragSourceListener());
              } else {
              System.out.println("Not a leaf - beep");
              tree.getToolkit().beep();
    }

  • An mp3 file on my computer will not import to itunes by either the drag-and-drop or the Add File to Library method.  Can't figure out what I'm doing wrong.  My OS is Windows 7.

    I purchased an mp3 from a private website on my laptop.  The itunes library i sync ipod to is on my desktop, so i copied the mp3 onto a flash drive and then into my desktop in the Downloads folder and Desktop folder as well as the itunes music folder, 3 places.  I opened itunes on the desktop and read the instructions for importing music that's already in my computer.  Neither the drag-and-drop or the Add File to Library method works.  I've tried both ways over and over.  Cannot figure out what the problem is.  I do note that the name of the mp3 file doesn't show the .mp3 extension, it appears as simply it's title, Eating Healthy, without any extension at all.  Could the filename be the problem, or do you have any other idea what I'm doing wrong?  My OS is Windows 7, using IE9.  Thanks.
    ADDENDUM AFTER READING ANOTHER DISCUSSION HERE:  I have now tried right clicking the song in Windows Explorer and choosing Open With, clicking itunes.  The mp3 plays in itunes but does not add to the library.

    I don't have a Recently Added playlist.  However, I discovered that the file I had named Eating Healthy was given the name You Can Enjoy Eating Healthy when it copied to iTunes.  I'm guessing iTunes pulled the full name of the piece from the internet.  Upshot--the mp3 did transfer to iTunes on all 3 tries, but I was looking in my alphabetized list under E, not Y, so I didn't see it there.  Thanks for your help. 

  • Using drag and drop property in forms.

    Hi all,
    I want to use drag and drop property in a form during
    runtime.I am using oracle 7.3.I don't want to call any
    another application.
    Is there any way?
    Thx in advance.

    Mona ! First tell your problem in brief ..Actually what you want
    on runtime ...would you like to fetching the data from one item
    to another or change the position of any item or
    pushbutton ...or what..give detail ...obviously i can help you..
    there are many commands like set_item_property ,
    get_item_property but right now i could not understand your
    prob ..tell me in brief..
    You can ask me at [email protected]..
    -Anwar

  • Select All in a table does not work for Drag and Drop

    Hi. I am using Jdeveloper 11.1.1.2 but have also reproduced in 11.1.1.3.
    I am trying to implement drag and drop rows from one table to another. Everything works fine except when I do a Select All (ctrl-A) in a table, the table visually looks like all rows are selected, but when I try to click on one of the selected rows to drag to the other table, only the row I click on is dragged.
    I tried setting Range Size -1, fetch mode to FETCH_ALL, content delivery to "immediate" but nothing works.
    I even have reproduced not using a view object but just a List of beans with only 5 or 10 beans showing in the table.
    Does anyone know how to get Select All to work for a Drag Source?
    Thanks.
    -Ed

    Frank-
    OK, thanks for looking into that. I also submitted this service request, which includes a simple sample app to demonstrate the problem:
    SR #3-2387481211: ADF Drag and Drop does not work for rows in table using Select All
    Thanks again for the reply.
    -Ed

Maybe you are looking for

  • How to Import DVD content to FCP for editing

    My clients always bring us DVDs (both PAL and NTSC formats) for us to insert certain segments into the FCP project. Questions: 1. We can import the PAL VOB file into FCP PAL project, but the images seems to be broken up in thick horizontal lines. It

  • My ipod touch is just showing the apple

    im having trouble with my ipod touch 8gb

  • Oracle Error : Oracle Initialization or ShutDown in progress

    Hi friends ; Iam unable to open my ORCL database; and getting the following errors with the process i followed : J:\Documents and Settings\Administrator>sqlplus /nolog SQL*Plus: Release 10.2.0.1.0 - Production on Mon Nov 2 09:19:33 2009 Copyright (c)

  • Why is My Engine Revving

    Why suddenly would my iMac start revving its drive/fan (?), slowing, then revving, etc.? Sometimes it seems that shutting down, then restarting, helps, but it also happens after I have just booted it up. This just started happening a couple of weeks

  • InDesign CS4 Blur lines on screen while mouse scrolling

    Below is a picture of what is happening while scrolling in a few indesign files. When i stop scrolling it does stop and clears the lines off the screen. Does anyone have a clue what is causing it?