Interactive drag and drop (right clicks)

I'm trying to create interactive training videos that utilize
right-clicks as well as right-click drag and drops. I hope i'm just
missing something. It's important for our training to include these
abilities. Any suggestions?

quote:
Originally posted by:
Captiv8r
Hi katymeredith
I'm sorry to hear you don't view Captivate useful. However,
your post confuses me just a bit.
What is the intent? If you want to just rant, I guess that's
fine. But we are all users here just trying to help one another
out. If you feel Adobe might be reading and making decisions based
on user posts, you would be wrong. They seldom look in here,
leaving it pretty much to us. This isn't a slam against them or
even a bad thing. Just the nature of peer-to-peer support.
I would like to address some of your assertions though.
You said:
The lack of proper right click functionality really makes
Captivate a non starter for serious application training
simulations.
Fair enough. Yes, I agree right mouse click is an issue. But
there are workarounds. Perhaps if the developers hear enough folks
ask about it, it will change.
As does the lack of mouseover transitions.
I'm not sure what you mean. Captivate does have mouseover
effects. Perhaps I'm misunderstanding what you mean by "mouseover
transition". Just last night I posted an example to my site in
order to ask another user if this is what was meant. Take a look at
it and see if you disagree that this constitutes a "mouseover
transition".
Click
here to see example
As does the lack of proper keypress transitions.
Not sure what you mean with that.
As does the lack of proper text entry handling.
Or that either. I use Text Entry boxes all the time with no
issues. Maybe I'm doing it wrong.
As does the fact that you can't properly pause a slide (keep
your browser minimised for long enough, and you'll complete the
course without having to do anything!)
Hmmm, I've never seen a movie that has been paused by an
interactive object just take off on its own again and simply
complete with no intervention. Are you talking about a
demonstration and not a simulation?
Cheers... Rick
Hi Rick
I DO find Captivate useful - just really frustrating when it
comes to developing interactive tutorial simulations. And what I
find most frustrating is that it's a really really good product -
but that doesn't quite do what I need it to do
Hence the rant .....
And what I meant was:
1. Right click - probably the biggest gripe. Yes, I know that
there are a few workarounds, but they all seem to require you to
start coding, or work in some situations and not others; if I'm
releasing a sim to 10000 people with varying setups I need to be
absolutely certain that it'll work.
How many applications do you know that don't use right click?
So Captivate must have full right click interactions (and by that I
mean - anything you can do with the left button you can do with the
right button).
2. Mouseover stuff. That example of yours looks pretty
impressive - not quite what I had in mind though - I really mean
transitions on mouseover to next slide, back to start of slide, to
slide x, etc etc. - example: to activate a submenu by hovering over
it, or to correctly show the change in a button's appearance when
you move your mouse over it.
I know you can do this with a rollover image - at least, you
could if it didn't crash my PC when I tried to open the image
- but that's so time consuming to have to manually
grab and overlay an image for every mouseover. So again, I really
need an 'anything you can do with a click you can do with a hover'
interaction.
3. Proper keypress interactions. I need to be able to detect
a keypress, regardless of where the mouse pointer is or where the
focus is. I know there's a partial solution involving text entry
boxes and jiggling with the shortcut key, but there are pitfalls if
the focus isn't in the text box. What I really need is an
interaction that covers the entire slide and simply detects a
keypress and gives me the same navigation options as a click.
4. Text entry handling. Yes, there's the text box
interaction, if you don't mind it not really looking like your
actual application
- but where's the pre entry text? Most apps will
squirt some default (preselected and editable) text into text boxes
- as far as I know Captivate won't - unless you klutz it using an
image - which you then can't edit.
And when you do edit the text in the box, the highlight
colours don't match system settings. And you can't get the text to
wrap properly according to the size of the text box - it sort of
scrolls horizontally. And the multiple correct answers is good, but
it won't give any leeway to spelling errors - other other sim
builders will allow you to allow, say, 6 out of 8 characters as
being enough to count as 'correct'. Oh, and there should be an
option for Captivate to monitor typing and immediately spot the
correct entry's been typed without waiting for an exit key or
click.
5. I might be about to admit I was wrong here ....
- my understanding was that you couldn't keep a
slide active for more than 3600 (?) seconds in a simulation, and
that if the slide reached its maximum time it automatically went to
the next one? Have to admit I haven't really experimented with that
side of things.
So are you saying that if you have a clickbox interaction
that moves to the next slide, and the user doesn't click it, and
you don't have a playbar, then the slide will just stay there. For
ever? If so, that does make Captivate a bit more useful to me!
Apologies if I've got the wrong end of the stick on that one.
I know all this may sound like minor niggles, but it's very
important to me that my sims look and behave as close as possible
to the original app as possible. I'm more relaxed about demos -
which is where I'm using Cap at the moment. In comparison to the
sim builders you get with LMS systems it looks fantastic and is
miles more intuitive - it's just that they tend to have all the
interactions I really need - and Cap doesn't.
If they can get what I've mentioned above into Cap 3 - or,
hope against hope, 2.1 - I'll be abandoning traditional sim
builders.

Similar Messages

  • Adobe Interactive Forms and WDA - Right click and submit

    Hi guys,
    We're developing some OnLine Adobe Intercative Form.
    For each module we have one submit button that sends all data to SAP system.
    Every module uses ZCI Layout and Native WebDynpro Library but when someone clicks on the submit button, also with right mouse button, it starts a submit event and after it opens a WDA's menu, from where, someone could accidentally hide a Adobe Form in his browser session!
    So, I would like to know how we can disable this functionality and also how I can have a "hide reader toolbar" in my pallette inside Adobe liveCycle Designer 7.1.
    Regards,
    Antonello

    Interactive Forms support two types of attachments:
    1) Attachments as comments
    - Interactive PDF Forms generated by the Adobe Document Services (ADS) in SAP turn on by default the commenting/annotations toolbar in Adobe Reader. You can then select "Attach a file as a comment" to attach a file anywhere on the page.
    - This is available since the first release of Interactive Forms
    - These attachments cannot be handled  (e.g. detached) automatically on the server. You can use it to archive the PDF with the attachments or to open the form in Acrobat or Reader and open them on the client.
    - Like any annotation functionality this does not work for dynamic interactive PDF forms (PDF forms which can dynamically grow/shrink in the client)
    2) Document Level Attachments
    - This is available with NW04S SPS10 and higher.
    - To attach a document select Menu -> Document -> Attach a File in Reader
    - Attachments can be manipulated/detached on the server using custom Java or ABAP code with the PDFDocument Object... Here is the documentation for the Java PDF Document Object (http://help.sap.com/javadocs/NW04S/current/wd/index.html)
    - This works for all types of PDF documents (dynamic and static)
    Cheers,
    Matthias

  • Trying to drag and drop edit-clicking on image in viewer...

    will not create a thumbnail that i can drop into the timeline. It just moves the image around in the viewer.
    Can anyone tell me what I'm doing wrong.
    Newbie here.
    Thanks to anyone who can help

    Your not dragging far enough. Hang onto the clip (from the viewer) until your over the video (or audio) track you want to drop it into. Also notice with way the cursor arrow is pointing. Down is overwrite. Right is insert.
    o| TOnyTOny |o

  • HT1751 Help!!!!!!!!!  Trying to back up my itunes library to a external hard drive.  Drag and drop right??  Where in good God's name do I fing the EHD icon to drop to?  Desktop?  Nowhere to be found.  Finder? All I get is the "null"  OMG please help.

    Howdy,
    About to explode from frustration.  Oh please can somebody tell me where to drag the itunes folder to in order to copy it to my external hard drive?  Thanks in advance.

    It's almost certainly an issue with your external hard drive, not with iTunes. iTunes does not lock its folders nor files in any way under normal circumstances. Either you have a permissions problem with the external drive - probable since you had a problem before - or something locked the iTunes folder which, if it works correctly to add, play, and sync content, is unlikely.
    If you continue to have problems, try copying some other folder to the external drive and see what happens. If that fails, then the problem is indeed with the external drive. You may get help for that if you ask in the Mac OS X forum.
    Regards.

  • Drag and drop interaction and restricted forward navigation

    I am using the Infosemantics widget in a captivate 6 project and it works well, but I have now been asked to restrict the forward navigation until the learner has completed the drag and drop and I can't work out how to do this as there isn't obviously anything I can assign an advanced action script to with the widget.  Any ideas how I can approach this - I don't want to have to code a drag and drop from scratch.

    Lieve is correct.  Anything you want to be executed as a result of the user's interaction with the widget needs to happen either via the On Success event, or the On Last Attempt (fail) event. 
    In the case of the Interactive Drag and Drop widget (as is also the case with all of our interactive widgets) you also have preference options that allow you to give the user multiple failure attempts by setting the preferences for Reset Success/Fail Criteria After Action.  If you want the timeline stopped while the user is working with the interaction you can also set the Disable Continue option so that the widget remains paused.

  • Drag and drop in captivate 7

    In captivate 7, there is a drag & drop interaction, is it in-built or i want to purchase the  drag and drop widget.

    Hello,
    It is built in since 6.1, and works for SWF and HTML5 output, has not totally the same functionality of the interactive drag and drop widget (but that one only works for SWF-output).
    Lilybiri

  • Drag and drop scoring

    Is there a way to create a variable, or is there a system variable available, that allows for points to be assigned to drag and drop items?  So, for example, each correctly dropped item is worth one point and as the learner makes the series of correct drops the score on the screen keeps increasing?

    You cannot manipulate the Captivate quizzing system variables with Advanced Actions and you cannot assign a user variable as a score.
    This type of scoring flexibility is not available with the native drag and drop functionality available in Captivate as the entire interaction is scored either correct or incorrect, not according to each separate drag item.
    However, if you have the Infosemantics Interactive Drag and Drop widget, you can have multiple widgets on the same slide, each scoring a different drag item / target item match.  In this way you can likely achieve the result you describe above because the more items the user gets matched correctly, the higher their score.
    More details here:
    http://www.infosemantics.com.au/adobe-captivate-widgets/drag-and-drop/interactive
    Trial version available for download here:
    http://www.infosemantics.com.au/adobe-captivate-widgets/download-free-trial-widgets
    PLEASE NOTE THAT THIS WIDGET IS NOT COMPATIBLE WITH HTML5 OUTPUT.

  • Weebly drag and drop editor will not load

    I use ipage for my host. When trying to edit my site using weebly drag and drop I am having an issue. I login to ipage, goto control panel, click weebly drag and drop, then click edit site. It brings up a blank page! I have Firefox 3.6.17. I downgraded from the latest version (had the same problem), because Norton plugins were not compatible with the latest version.

    Nothing seems to work!!  PSE 8 is supposed to be plug and play without having to mess with anything, get tech support or waste my time.  Why then have I spent 3 evenings trying to make it work?   I called Wal Mart who have a no refund policy on software.  I HAVE HAD IT WITH THIS NONSENSE!!!
    Please provide the link to get a refund from ADOBE.

  • Captivate 2 right-click and drag and drop in simulation

    Captivate has been suggested as a suitable replacement for
    Authorware since the announcement that Adobe doesn't plan to
    continue with Authorware. I find myself in the position to put this
    to the test. I'm in the process of recreating a course that had
    been created in Authorware in a toolset comprised of Artuculate
    Presenter, Articulate Quizmaker, Articulate Engage, Captivate, and
    PowerPoint.
    The simulation created in Authorware has these feautures:
    -learner right clicks on items on screen to see a context
    menu then selects option from the context menu
    -learner drags toolbar and other items on screen to another
    screen location
    -learner selects item from Windows Start>>Program and
    other application menus. As the learner's mouse moves over the
    menu, menu options highlight and flyout menus appear even if
    they're not directly involved in the simulation
    -learner logs into course with an employee ID number. This
    information is stored and is used in the simulation in which they
    log into the system being simulated.
    Can I do any of these things in Captivate?
    I suspect I can simulate the flyout menus with a number of
    mouse over hotspots - exactly the way it's done in Authorware.
    However, I haven't found any way to do simulate the other items:
    -use of drag and drop where the learner performs the action
    -use of a variable value to check validity of what has been
    entered in the text field
    -use of right click to advance Captivate simulation.
    I'd appreciate any help you can give me. After all, I've
    heard many people claim that Captivate can replace Authorware.
    Thanks
    Grace Daminato

    Hi Grace,
    Captivate is indeed a replacement for Authorware, but only in
    the way that an Audi is a replacement for a Ferrari. They do the
    same basic job, but you need to do some after market modifications
    to the Audi to level the playing field somewhat.
    1) Flyout menus are indeed possible, if you're willing to
    create "rollovers" that display a picture of the expanded menu when
    the user mouses over. You are limited to exposing only first-level
    menus, however. Captivate does not allow for rollovers on
    rollovers, except possibly via Captivate 3's Slidelet
    functionality.
    ***EDIT***: You can also use Paul Dewhurst's rollover widgets
    to fake multi-level menu behavior. They are available from Paul's
    site here:
    http://www.raisingaimee.co.uk/index.php?option=com_content&task=view&id=24&Itemid=29
    2) Drag-and-drop in Captivate is currently only available as
    an add-in Flash object, each of which must unfortunately be built
    by hand in Flash. Adobe Community Expert Paul Dewhurst offers
    source files for such interactions on his website:
    http://www.raisingaimee.co.uk/index.php?option=com_content&task=view&id=13&Itemid=29
    3) Captivate has built-in checking of field values, but you
    are limited to hardcoded values only. If you need variable-based
    input checking, you must create it yourself in Flash and insert it
    as an animation.
    4) Right-click is possible in Captivate, but must be added
    manually. Captivate community contributor William Heinz has created
    a nifty right-click solution for HTML/SWF publication and Paul
    Dewhurst again comes to the rescue with a solution for .EXE-based
    output:
    HTML/SWF-based Output:
    http://www.adobe.com/devnet/captivate/articles/rightclick.html
    EXE-based Output:
    http://www.raisingaimee.co.uk/index.php?option=com_content&task=view&id=12&Itemid=29
    Unfortunately, making these modifications to Captivate files
    comes at a cost. First, there's the overhead of tracking down and
    implementing the custom enhancements. More importantly, Captivate
    has no way of "scoring" custom enhancements, so any such
    interactions will not be reflected in the user's reported results.
    If you're willing to live with these limitations, and a few
    others, Captivate can indeed be a suitable replacement for
    Authorware.

  • Is there any way to disable right click and drag and drop for photos on iweb?

    Re: protecting photos when using iweb as your web designer...
    Is there any way to disable right click and drag and drop for photos using iweb?  I have seen tutorials about creating a text box around each image - but is there a better way? 

    However, there is no way you can prevent someone from making a screenshot of the image as it is displayed on the screen no matter what application you use to create the web page.
    You can add a watermark to dissuade the casual "thief" but those who are serious about stealing the photo for their own use can remove the watermark with some effort.
    OT

  • Is it possible to add a drag and drop interaction to a called image in a contaner?

    this forum is my last hope =( i know how to do drag and drop
    by itself, however right now i have my flash set up so that when
    you click BUTTON A, it does:
    on (release) {
    _root.gotoAndPlay ("photo1");
    once it goes to "photo1", on that frame, i wrote actions on
    the frame to:
    var myMCL:MovieClipLoader = new MovieClipLoader ();
    myMCL.loadClip ("images/heritageBrochureFront.png",
    "container_mc");
    stop();
    so it loads my picture into the container. my question, once
    the image it in the container, can i add drag and drop interaction
    to it? i would really love an easy solution.

    yes. there are a couple of ways to do this.
    one is the create a child movieclip of container_mc and load
    into that child and assign your onPress/startDrag
    onRelease/stopDrag methods to container_mc.
    a second way is to load into container_mc (like you're
    currently doing), wait until loading is complete (ie, use the
    onLoad method of an mcl listener) and then assign your methods to
    container_mc.

  • Intuitive Drag and Drop interaction

    Hi,
    i am working on a drag and drop interaction with a direct feed-back built in. there are 6 dragables and 6 drop sources, which are rectangle smart shapes. depending on the answer which is dragged, i want an x or a check to appear next to the smart shape and then disappear if the answer is changed or the reset button is clicked. sofar i have assigned an advanced action to each drop source telling it to make an x or a check appear, depending on if the answer is correct or not. the problem is, that the x or the check stays in place after the answer has been substituted with another. I also tried assigning the the check or x with a fade in/fade out time, but that didn´t seem to work. i know the easy way is to just assign one correct answer to each drop source, but i want the interaction to be a bit more intuitive. Any ideas on how to solve this problem?
    Thanks!!!
    -N

    I am sorry i am not sure what the abbreviations AFAIK and IMO mean...At the moment i am trying to solve the  problem using conditional actions. on the right are the dragables on the left the drop source. what i was trying was: if 1=1 (true) then show check, hide x else show x hide check (this is the script for inserting the correct answer) for all of the incorrect answers i wrote: if 1=1 (true) then show x, hide check else hide x show check...now i am not sure if this is completely wrong, but it seemed to work. the problem is, i would have to write this script for each drop source, making the corresponding x or check appear...is there a way to make a "global" script?

  • Who'd like to test a new Drag and Drop Interactive Widget?

    It's taken about 6 months of every spare minute we could find but we're finally ready to do a round of Alpha testing for our new Drag and Drop Interactive Widget for Cp4 and 5.  This post is to ask for a handful of volunteers to test the new widget over the next week creating drag and drop interactions in both Cp4 and Cp5.
    If you've already tried our well-known Drag and Drop Lite Question Widget, but were a bit frustrated by the limitations that the quiz question format placed on your creativity, we think you'll be blown away by what this new Interactive Widget can do.  It does everything the current question widget does, aside from the aspects that are unique to question types (Review Area, Retake Quiz, etc) plus a whole lot more.  Due to the extra functionality, this widget has twice as much code as our last one.
    Some of the features:
    You can have as many widgets as you want on a single slide and each can be addressing a different drag and drop scenario.
    You can reference the same drag and target objects from different widgets to create different.
    Since they are interactive widgets, you can use the widget success/failure criteria to trigger Advanced Actions.  This opens up a lot of possibilities for game interactions.
    You can score each widget differently so that OnSuccess they will each report different scores for dragging the same objects.  This means you can have Conditional Scoring and more than one correct answer for a given problem.
    You can set one of the widgets to have its Preferences be used for all widgets on the slide so that you don't need to set all widget preferences individually, thus saving a lot of time.
    You can set Preference Priority for each widget to configure which widgets will have "right of way" if there is a potential conflict in preferences.  For example, if one widget wants one type of snapping behaviour on an object but another widget wants the same object to snap differently, the widget with the higher Preference Priority will dominate.
    You can nominate other interactive objects (including clickboxes or other widgets) to act as Submit button and Clear button to create a simulated quiz question.
    Since this widget is an Interactive widget, it also has the same advanced Pausing override behaviours we built into our Event Handler widget (http://www.infosemantics.com.au/eventhandler)  So you can have users stay on the same slide playing with the drag and drop interaction for as long as they like without progressing to the next slide until they want to.
    Plus other stuff I can't think of right now.
    If you decide to volunteer to participate in this Alpha testing, please don't use this widget for any production Captivate projects you may have.  The Alpha and Beta versions of the widget will be time-bombed to stop working after a couple of weeks so that we don't have buggy versions running around later.
    As I said at the beginning, we only need a handful of testers, we need people using either Cp4 or Cp5, and you need to do this testing over the next week so that we can then address any issues you find and release a debugged Beta version for more testing.
    Anyone wanna play?
    If you do want to volunteer, send me a private message on this forum with your email address so I can send you a widget and instructions.  We'll only be taking the first dozen or so people that are willing to contribute time and feedback.
    Cheers,
    Rod Ward

    Hi Sandy,
    If you hover the mouse over Rod's avatar, there is an e-mail address visible. For a private message; double-click on his avatar and you'll find the button private message in that dialog box,
    Lilybiri

  • Must click then click and drag for JTable Drag and Drop

    Hi All,
    I've been using Java 1.4 to drag and drop data between two tables in our application. Basically I need to drag the data from individual rows of the source table and insert it into one of the cells in the new table. This works absolutely fine and has made a huge improvement to this portion of our app. I've included example source code below that does a similar thing by transferring data from one table and inserting it into another (it's quite big and also not as well done as the example in our real app but unfortunately I can't send the source for that).
    The thing I've noticed though is that in order to start dragging data I need to click to select it and then press and hold the mouse button to start dragging, whereas under W**dows and just about every other OS you can just press and hold and start dragging straight away. If you try this with a JTable though it just changes the rows you have selected so the drag and drop works but feels a bit clunky and amateurish. I'd like to do something about this such that it works like Windows Explorer (or similar) where you can just press the mouse button and start dragging.
    Any help would be greatly appreciated - and if anybody finds the code useful you're more than welcome to it. Note that the business end of this is CustomTransferHandler.java - this will show you how to insert data at a specific position in a JTable, it's a bit of a faff but not too bad once you've got it sussed.
    Thanks,
    Bart Read
    ===============================================================
    TestFrame.java
    * TestFrame.java
    * Created on October 21, 2002, 4:59 PM
    import java.awt.*;
    import java.awt.datatransfer.*;
    import java.awt.dnd.*;
    import java.awt.event.*;
    import java.util.TooManyListenersException;
    import javax.swing.*;
    * @author  readb
    public class TestFrame extends javax.swing.JFrame
         private static final String [] NAMES     = {
              "John", "Geoff", "Madeleine", "Maria", "Flanders",
              "Homer", "Marge", "Bart", "Lisa", "Weird Baby" };
         private JTable source;
         private JTable dest;
         private MyTableModel     sourceModel;
         private MyTableModel     destModel;
         private Clipboard          clipboard;
         /** Creates a new instance of TestFrame */
         public TestFrame()
              clipboard = getToolkit().getSystemClipboard();
              Container c = getContentPane();
              c.setLayout( new BorderLayout( 40, 40 ) );
              source = new MyJTable();
              sourceModel = new MyTableModel();
              source.setModel( sourceModel );
              source.setDragEnabled( true );
              CustomTransferHandler handler = new CustomTransferHandler( "Source handler" );
              source.setTransferHandler( handler );
              try
                   source.getDropTarget().addDropTargetListener( handler );
              catch ( TooManyListenersException tmle )
                   tmle.printStackTrace();
              dest = new MyJTable();
              destModel = new MyTableModel();
              dest.setModel( destModel );
              dest.setDragEnabled( true );
              handler = new CustomTransferHandler( "Dest handler" );
              dest.setTransferHandler( handler );
              try
                   dest.getDropTarget().addDropTargetListener( handler );
              catch ( TooManyListenersException tmle )
                   tmle.printStackTrace();
              c.add( new JScrollPane( source ), BorderLayout.WEST );
              c.add( new JScrollPane( dest ), BorderLayout.EAST );
              populate();
         private void populate( MyTableModel model )
              for ( int index = 0; index < NAMES.length; ++index )
                   model.setRow( index, new DataRow( index + 1, NAMES[ index ] ) );
         private void populate()
              populate( sourceModel );
              populate( destModel );
         public static void main( String [] args )
              TestFrame app = new TestFrame();
              app.addWindowListener(
                   new WindowAdapter() {
                        public void windowClosing( WindowEvent we )
                             System.exit( 0 );
              app.pack();
              app.setSize( 1000, 600 );
              app.show();
         private class MyJTable extends JTable
              public boolean getScrollableTracksViewportHeight()
                   Component parent = getParent();
                   if (parent instanceof JViewport)
                        return parent.getHeight() > getPreferredSize().height;
                   return false;
    }=====================================================================
    MyTableModel.java
    * MyTableModel.java
    * Created on October 21, 2002, 4:43 PM
    import java.util.ArrayList;
    * @author  readb
    public class MyTableModel extends javax.swing.table.AbstractTableModel
         private static final int          NUMBER               = 0;
         private static final int          NAME               = 1;
         private static final String []     COLUMN_HEADINGS     = { "Number", "Name" };
         private ArrayList data;
         /** Creates a new instance of MyTableModel */
         public MyTableModel()
              super();
              data = new ArrayList();
         public int getColumnCount()
              return COLUMN_HEADINGS.length;
         public String getColumnName( int index )
              return COLUMN_HEADINGS[ index ];
         public Class getColumnClass( int index )
              switch ( index )
                   case NUMBER:
                        return Integer.class;
                   case NAME:
                        return String.class;
                   default:
                        throw new IllegalArgumentException( "Illegal column index: " + index );
         public int getRowCount()
              return ( null == data ? 0 : data.size() );
         public Object getValueAt( int row, int column )
              DataRow dataRow = ( DataRow ) data.get( row );
              switch ( column )
                   case NUMBER:
                        return new Integer( dataRow.getNumber() );
                   case NAME:
                        return dataRow.getName();
                   default:
                        throw new IllegalArgumentException( "Illegal column index: " + column );
         public void addRow( DataRow row )
              int rowIndex = data.size();
              data.add( row );
              fireTableRowsInserted( rowIndex, rowIndex );
         public void addRows( DataRow [] rows )
              int firstRow = data.size();
              for ( int index = 0; index < rows.length; ++index )
                   data.add( rows[ index ] );
              fireTableRowsInserted( firstRow, data.size() - 1 );
         public void setRow( int index, DataRow row )
              if ( index == data.size() )
                   data.add( row );
              else
                   data.set( index, row );
              fireTableRowsUpdated( index, index );
         public void insertRows( int index, DataRow [] rows )
              for ( int rowIndex = rows.length - 1; rowIndex >= 0; --rowIndex )
                   data.add( index, rows[ rowIndex ] );
              fireTableRowsInserted( index, index + rows.length - 1 );
         public DataRow getRow( int index )
              return ( DataRow ) data.get( index );
         public DataRow removeRow( int index )
              DataRow retVal = ( DataRow ) data.remove( index );
              fireTableRowsDeleted( index, index );
              return retVal;
         public boolean removeRow( DataRow row )
              int index = data.indexOf( row );
              boolean retVal = data.remove( row );
              fireTableRowsDeleted( index, index );
              return retVal;
         public void removeRows( DataRow [] rows )
              for ( int index = 0; index < rows.length; ++index )
                   data.remove( rows[ index ] );
              fireTableDataChanged();
    }=====================================================================
    DataRow.java
    * DataRow.java
    * Created on October 21, 2002, 4:41 PM
    import java.io.Serializable;
    * @author  readb
    public class DataRow implements Serializable
         private int          number;
         private String     name;
         /** Creates a new instance of DataRow */
         public DataRow( int number, String name )
              this.number = number;
              this.name = name;
         public int getNumber()
              return number;
         public String getName()
              return name;
         public String toString()
              return String.valueOf( number ) + ": " + name;
    }======================================================================
    CustomTransferHandler.java
    * CustomTransferHandler.java
    * Created on October 22, 2002, 8:36 AM
    import java.awt.*;
    import java.awt.datatransfer.Clipboard;
    import java.awt.datatransfer.ClipboardOwner;
    import java.awt.datatransfer.DataFlavor;
    import java.awt.datatransfer.Transferable;
    import java.awt.datatransfer.UnsupportedFlavorException;
    import java.awt.dnd.*;
    import java.awt.event.InputEvent;
    import java.io.IOException;
    import java.util.Arrays;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JComponent;
    import javax.swing.JTable;
    import javax.swing.TransferHandler;
    * @author  readb
    public class CustomTransferHandler
                   extends TransferHandler
                   implements Transferable, ClipboardOwner, DropTargetListener
         public static final DataFlavor     ROW_ARRAY_FLAVOR     = new DataFlavor( DataRow[].class, "Multiple rows of data" );
         private String               name;
         private ImageIcon          myIcon;
         private     DataRow []          data;
         private boolean               clipboardOwner                    = false;
         private int                    rowIndex                         = -1;
         /** Creates a new instance of CustomTransferHandler */
         public CustomTransferHandler( String name )
              this.name = name;
         public boolean canImport( JComponent comp, DataFlavor [] transferFlavors )
              System.err.println( "CustomTransferHandler::canImport" );
              if ( comp instanceof JTable && ( ( JTable ) comp ).getModel() instanceof MyTableModel )
                   for ( int index = 0; index < transferFlavors.length; ++index )
                        if ( ! transferFlavors[ index ].equals( ROW_ARRAY_FLAVOR ) )
                             return false;
                   return true;
              else
                   return false;
         protected Transferable createTransferable( JComponent c )
              System.err.println( "CustomTransferHandler::createTransferable" );
              if ( ! ( c instanceof JTable ) || ! ( ( ( JTable ) c ).getModel() instanceof MyTableModel ) )
                   return null;
              this.data = null;
              JTable               table     = ( JTable ) c;
              MyTableModel     model     = ( MyTableModel ) table.getModel();
              Clipboard          cb          = table.getToolkit().getSystemClipboard();
              cb.setContents( this, this );
              clipboardOwner = true;
              int [] selectedRows = table.getSelectedRows();
              Arrays.sort( selectedRows );
              data = new DataRow[ selectedRows.length ];
              for ( int index = 0; index < data.length; ++index )
                   data[ index ] = model.getRow( selectedRows[ index ] );
              return this;
         public void exportAsDrag( JComponent comp, InputEvent e, int action )
              super.exportAsDrag( comp, e, action );
              Clipboard          cb          = comp.getToolkit().getSystemClipboard();
              cb.setContents( this, this );
         protected void exportDone( JComponent source, Transferable data, int action )
              System.err.println( "CustomTransferHandler::exportDone" );
              if ( TransferHandler.MOVE == action && source instanceof JTable && ( ( JTable ) source ).getModel() instanceof MyTableModel )
                   JTable table = ( JTable ) source;
                   MyTableModel model = ( MyTableModel ) table.getModel();
                   int [] selected = table.getSelectedRows();
                   for ( int index = selected.length - 1; index >= 0; --index )
                        model.removeRow( selected[ index ] );
         public void exportToClipboard( JComponent comp, Clipboard clip, int action )
              System.err.println( "CustomTransferHandler::exportToClipboard" );
         public int getSourceActions( JComponent c )
              System.err.println( "CustomTransferHandler::getSourceActions" );
              if ( ( c instanceof JTable ) && ( ( JTable ) c ).getModel() instanceof MyTableModel )
                   return MOVE;
              else
                   return NONE;
          *     I've commented this out because it doesn't appear to work in any case.
          *     The image isn't null but as far as I can tell this method is never
          *     invoked.
    //     public Icon getVisualRepresentation( Transferable t )
    //          System.err.println( "CustomTransferHandler::getVisualRepresentation" );
    //          if ( t instanceof CustomTransferHandler )
    //               if ( null == myIcon )
    //                    try
    //                         myIcon = new ImageIcon( getClass().getClassLoader().getResource( "dragimage.gif" ) );
    //                    catch ( Exception e )
    //                         System.err.println( "CustomTransferHandler::getVisualRepresentation: exception loading image" );
    //                         e.printStackTrace();
    //                    if ( null == myIcon )
    //                         System.err.println( "CustomTransferHandler::getVisualRepresentation: myIcon is still NULL" );
    //               return myIcon;
    //          else
    //               return null;
         public boolean importData( JComponent comp, Transferable t )
              System.err.println( "CustomTransferHandler::importData" );
              super.importData( comp, t );
              if ( ! ( comp instanceof JTable ) )
                   return false;
              if ( ! ( ( ( JTable ) comp ).getModel() instanceof MyTableModel ) )
                   return false;
              if ( clipboardOwner )
                   return false;
              if ( !t.isDataFlavorSupported( ROW_ARRAY_FLAVOR ) )
                   return false;
              try
                   data = ( DataRow [] ) t.getTransferData( ROW_ARRAY_FLAVOR );
                   return true;
              catch ( IOException ioe )
                   data = null;
                   return false;
              catch ( UnsupportedFlavorException ufe )
                   data = null;
                   return false;
         public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException
              System.err.println( "MyTransferable::getTransferData" );
              if ( flavor.equals( ROW_ARRAY_FLAVOR ) )
                   return data;
              else
                   throw new UnsupportedFlavorException( flavor );
         public DataFlavor[] getTransferDataFlavors()
              System.err.println( "MyTransferable::getTransferDataFlavors" );
              DataFlavor [] flavors = new DataFlavor[ 1 ];
              flavors[ 0 ] = ROW_ARRAY_FLAVOR;
              return flavors;
         public boolean isDataFlavorSupported( DataFlavor flavor )
              System.err.println( "MyTransferable::isDataFlavorSupported" );
              return flavor.equals( ROW_ARRAY_FLAVOR );
         public void lostOwnership( Clipboard clipboard, Transferable transferable )
              clipboardOwner = false;
         /** Called while a drag operation is ongoing, when the mouse pointer enters
          * the operable part of the drop site for the <code>DropTarget</code>
          * registered with this listener.
          * @param dtde the <code>DropTargetDragEvent</code>
         public void dragEnter(DropTargetDragEvent dtde)
         /** Called while a drag operation is ongoing, when the mouse pointer has
          * exited the operable part of the drop site for the
          * <code>DropTarget</code> registered with this listener.
          * @param dte the <code>DropTargetEvent</code>
         public void dragExit(DropTargetEvent dte)
         /** Called when a drag operation is ongoing, while the mouse pointer is still
          * over the operable part of the drop site for the <code>DropTarget</code>
          * registered with this listener.
          * @param dtde the <code>DropTargetDragEvent</code>
         public void dragOver(DropTargetDragEvent dtde)
         /** Called when the drag operation has terminated with a drop on
          * the operable part of the drop site for the <code>DropTarget</code>
          * registered with this listener.
          * <p>
          * This method is responsible for undertaking
          * the transfer of the data associated with the
          * gesture. The <code>DropTargetDropEvent</code>
          * provides a means to obtain a <code>Transferable</code>
          * object that represents the data object(s) to
          * be transfered.<P>
          * From this method, the <code>DropTargetListener</code>
          * shall accept or reject the drop via the
          * acceptDrop(int dropAction) or rejectDrop() methods of the
          * <code>DropTargetDropEvent</code> parameter.
          * <P>
          * Subsequent to acceptDrop(), but not before,
          * <code>DropTargetDropEvent</code>'s getTransferable()
          * method may be invoked, and data transfer may be
          * performed via the returned <code>Transferable</code>'s
          * getTransferData() method.
          * <P>
          * At the completion of a drop, an implementation
          * of this method is required to signal the success/failure
          * of the drop by passing an appropriate
          * <code>boolean</code> to the <code>DropTargetDropEvent</code>'s
          * dropComplete(boolean success) method.
          * <P>
          * Note: The data transfer should be completed before the call  to the
          * <code>DropTargetDropEvent</code>'s dropComplete(boolean success) method.
          * After that, a call to the getTransferData() method of the
          * <code>Transferable</code> returned by
          * <code>DropTargetDropEvent.getTransferable()</code> is guaranteed to
          * succeed only if the data transfer is local; that is, only if
          * <code>DropTargetDropEvent.isLocalTransfer()</code> returns
          * <code>true</code>. Otherwise, the behavior of the call is
          * implementation-dependent.
          * <P>
          * @param dtde the <code>DropTargetDropEvent</code>
         public void drop(DropTargetDropEvent dtde)
              System.err.println( "CustomTransferHandler::drop" );
              Component c = dtde.getDropTargetContext().getDropTarget().getComponent();
              if ( ! ( c instanceof JComponent ) )
                   dtde.rejectDrop();
                   return;
              JComponent comp = ( JComponent ) c;
              if ( ! ( c instanceof JTable ) || ! ( ( ( JTable ) c ).getModel() instanceof MyTableModel ) )
                   dtde.rejectDrop();
                   return;
              dtde.acceptDrop( TransferHandler.MOVE );
              //     THIS is such a mess -- you can't do the following because
              //     getTransferable() throws an (undocumented) exception - what's that
              //     all about.
    //          Transferable t = dtde.getTransferable();
    //               if ( !t.isDataFlavourSupported( ROW_ARRAY_FLAVOR ) )
    //                    dtde.rejectDrop();
    //                    return false;
    //          TransferHandler handler = comp.getTransferHandler();
    //          if ( null == handler || ! handler.importData( comp, t ) )
    //               dtde.rejectDrop();
    //               return;
              Point p = dtde.getLocation();
              JTable table = ( JTable ) comp;
              rowIndex = table.rowAtPoint( p );
              //     So you have to do this instead and use the data that's been
              //     stored in the data member via import data.  Total mess.
              if ( null == data )
                   dtde.rejectDrop();
                   return;
              MyTableModel model = ( MyTableModel ) table.getModel();
              if ( rowIndex == -1 )
                   model.addRows( data );
              else
                   model.insertRows( rowIndex, data );
              dtde.acceptDrop( TransferHandler.MOVE );
         /** Called if the user has modified
          * the current drop gesture.
          * <P>
          * @param dtde the <code>DropTargetDragEvent</code>
         public void dropActionChanged(DropTargetDragEvent dtde)
    }

    Hi again,
    Well I've tried using the MouseListener / MouseMotionListener approach but it doesn't quite seem to work, although it does get the events correctly. I think the reason is that it doesn't interact correctly with the Java DnD machinery which is something that V.V hinted at. It's something that I may need to look into if / when I have more time available.
    I have to say though that I haven't had any problems with scrollbars - we're making fairly heavy use of large tables and if you drag over a table with a scroll bar and move to the top or bottom then it scrolls as you would expect and allows you to drop the data where you like. For this situation I've used pretty much the same approach as for the toy example above except that I've implemented separate source and destination TransferHandlers (the source table is read-only, and it really doesn't make sense to allow people to drag from the destination table so I've essentially split the functionality of the example handler down the middle).
    I'm not actually particularly in favour of messing too much with the mechanics of DnD, more because of lack of time than anything else. Guess I'll just have to put up with this for the moment. Doesn't help that DnD is so poorly documented by Sun.
    Thanks for all your help.
    Bart

  • [SOLVED] Thunar 1.6 doesn't drag-and-drop with the right mouse button

    Hallo all.
    It might be something I've done (though I did delete my ~/.config/Thunar directory before upgrading), but Thunar doesn't let me drag-and-drop with the right mouse button, thus stopping me from copying something instead of moving it, etc. Has anyone else had that too?
    Last edited by GordonGR (2012-12-28 14:34:20)

    Joel wrote:
    anonymous_user wrote:Is it supposed to be with the right-mouse button? I always thought drag and drop was done with the left button?
    Could be right-hand user
    Come on! Read what GordonGR wrote!
    Microsoft Windows, Nautilus, the Haiku Tracker, and probably many other file managers have a feature where, when you right-click or middle-click and drag an icon to a new location, a pop-up menu appears and asks what you'd like to do (Move, Copy, Link). I thought I used to use this feature in Thunar too but it seems to have stopped working in recent versions. Has anyone else had any experience with it?
    EDIT: Here's random blogger talking about the feature in an older version of Thunar: http://jeromeg.blog.free.fr/index.php?p … and-tricks So that's good, I wasn't just imagining the feature.
    Last edited by drcouzelis (2012-12-12 03:45:05)

Maybe you are looking for