TransferHandler need to override double click action

Hi everyone...need some advice.
I've downloaded code from this demo:
http://java.sun.com/docs/books/tutorial/uiswing/misc/example-1dot4/index.html#DragFileDemoonly AFTER downloading and making major changes (to incorporate it into my app), did I realize you have to DOUBLE click to drag a file. I find this quite annoying...and would like to make the drag/drop action respond to a SINGLE click.
If you look at the demo code, you'll see there are 3 files associated with it. I'm assuming that it's the FileAndTextTransferHandler class I should have to make a change to...but, really not sure...
I have no idea how to go about this... using the TransferHandler is all new to me. My best guess is to override it's getCopyAction() method in the subclass and have it return some kind of MouseClick action?
Any advice?
Thanks!

If you have to double click then in the code the developer has called method getClickCount. So just open the files and look for the call.
You will find something like
if(e.getClickCount() == 2).... or similar. remove the if and it will work with a single click.

Similar Messages

  • How to  record double click action in ECATT ...?

    Hi,
    I created ecatt for Asset master in that recording there is sub field in which i need to enter data only after double clicking main field ,while recording i double clicked tha main field after upload txt file unless i double click the field it is not moving farward,
    so can u help the same..
    thanking you

    You can record double click action using ecatt or u can do same by pressing f2 key while recordiing

  • How to overwrite double click action in siteadmin grid?

    I would like to create custom page based on siteadmin widget and now I'm facing a problem with changing a double click action as a defoult it open location with .html sufix if it is not a folder. I would like to open dialog.
    Thanks,

    Thanks Sham, here is my sample function if anyone need it too
    var coreOpenPage = CQ.wcm.SiteAdmin.openPage;
    CQ.wcm.SiteAdmin.openPage = function(path, type, newWindow, selection) {
         if (type == 'commerce/components/product') {
             CQ.Ext.Msg.alert(
                 "Debug",
                 "Open product dialog"
          } else {
             coreOpenPage.apply(this, arguments);

  • I need to just double click on every folder and have it open in a new window every time, as before. Can I do that?

    I need to just double click on every folder and have it open in a new window every time, as before. Can I do that?

    Finder -> Preferences -> General -> uncheck "Open folders in tabs instead of new windows"

  • How to capturing Mouse double click action?

    Hi all,
    how can we identify the "mouse double click" action?
    MouseListener has methods for only mousePressed,released,clicked (single).
    Thanks in advance..
    Regards
    Sojan

    Hi,
    Thanks it worked ..
    e.getClickCount() value increases if we keep on clicking on the component, is there anythning wrong by interpreting double click as
    "e.getClickCount() >=2 "?
    Regards
    Sojan

  • Agentry - Disable Double Click Action on Individual Row

    Is it possible to disable the double click action on a single row in a list screen?  I wanted to have a rule that would disable a row if it has already been updated.  Let me know if that is possible.

    The double click option can not be set by a rule or not, but the action is called, you can put an enable rule on to check the data already.
    Stephen

  • Double click actions were capturing for PPOME by other servers,But not in..

    Hi all,
      I am trying to assign cost center for the employee using T.Code PPOME. While recording I am unable to select person to assign cost center,
    i.e. while recoding I had done double click action for selecting a person. But, at the time of processing the recorded code, That double click actions were not capturing. 
    Here my problem is...
    When I am running, My program is unable to catch double
    But, In other server system, double click action was capturing sucessfully.Can any one suggest me regarding this.
      Can any one suggest me how to handel this issue.
    Thanks in advance,
    Surender.B.V.
    Edited by: Surender Batlanki on Feb 8, 2008 7:20 PM
    Edited by: Surender Batlanki on Feb 8, 2008 7:24 PM

    Hi Kiran,
        I got what you told, But are you sure double click action will not handel in SHDB recording for any transaction code ?
        I also tried all possibilities, as you suggested by using menu bar options, mouse right click actions and making changes in recorded program. If I gone through this step I can solve my issue.
        Do u face this kind of issue any time i.e. handling double click actions. Can you suggest me if any.
        Thanks for your reply.
    Regards,
    Surender.B.V.

  • How to separate double click action and single click action

    in my mouse action listerner for JTable.
    i do two actions, when user doule click column header, sort the column,
    when single clicked, select all cells in this column.
    but when user double clicked, the action attached with single click also triggered.(column sorted but also selected)
    how to separate them.

    Ok, so despite my earlier suggestion being basically the only solution offered anyway on the web it appears that Lokust is correct and that the single click operation would be performed as well as the double click one. to get round this u have to implement a Timer, i'm not going to post my whole code here because most of it is irrelevent, just add this code in the correct places and it should work fine. apologies to all format junkies for not using code tags!
    import java.util.Timer;
    import java.util.TimeTask;
    public class WhateverClassName implements MouseListener {
    private Timer t;
    private boolean doubleclick;
    myTable.addMouseListener(this);
    public void mouseClicked(MouseEvent e) {
         t = new Timer();
         if (e.getClickCount() == 2){
              doubleclick = true;
         else if(e.getClickCount()==1){
              t.schedule(new MyTimerTask(),500);
    /*You need all these methods as well */
    /* (non-Javadoc)
    * @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
    public void mouseEntered(MouseEvent arg0) {
    /* (non-Javadoc)
    * @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent)
    public void mouseExited(MouseEvent arg0) {
    /* (non-Javadoc)
    * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
    public void mousePressed(MouseEvent arg0) {
    /* (non-Javadoc)
    * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
    public void mouseReleased(MouseEvent arg0) {
    class MyTimerTask extends TimerTask{
    /* (non-Javadoc)
    * @see java.util.TimerTask#run()
         public void run() {
              if(doubleclick){
                   System.out.print("double click");
              else{
                   System.out.println("single click");
              t.cancel();
    This assumes that for it to be considered a double click user has to click twice within .5 seconds.
    Let me know if that works or not, sorry its a bit messy!

  • Need help in double click the column in ALV

    hello all ,
    I am new to Abap coding . I have got the following requirement .
    there are 2 columns in my alv grid output list . First  column shows both the sales orders and Quotation .
    2nd column shows the document type ..If the document type is ZQT then that is recognised as Quotation . For the remaining documnets types all are sales orders. Please see sample list ..
    Salesorder/quotation | Document type
                       | -
                  | -
                    | ZQT
                    | -
                        | -
    So if the users double clicks on Sales order it has to go to VA02 transaction .
    If the user double clicks on quotationin that same column  it has to go to VA22 transaction .
    Please tell me how to achieve thisfunctionality in the same column .
    Thanks

    As per your requirement i put one example so it will help to solve your issue
    DEFINE m_fieldcat.
      add 1 to ls_fieldcat-col_pos.
      ls_fieldcat-fieldname   = &1.
      ls_fieldcat-ref_tabname = &2.
      ls_fieldcat-cfieldname  = &3.
      ls_fieldcat-qfieldname  = &4.
      append ls_fieldcat to lt_fieldcat.
    END-OF-DEFINITION.
    TYPE-POOLS: slis.                      " ALV Global types
    TYPES:
      BEGIN OF ty_vbak,
        vkorg TYPE vbak-vkorg,             " Sales organization
        kunnr TYPE vbak-kunnr,             " Sold-to party
        vbeln TYPE vbak-vbeln,             " Sales document
        netwr TYPE vbak-netwr,             " Net Value of the Sales Order
        waerk TYPE vbak-waerk,             " Currency
      END OF ty_vbak,
      BEGIN OF ty_vbap,
        vbeln  TYPE vbap-vbeln,            " Sales document
        posnr  TYPE vbap-posnr,            " Sales document item
        matnr  TYPE vbap-matnr,            " Material number
        arktx  TYPE vbap-arktx,            " Short text for sales order item
        kwmeng TYPE vbap-kwmeng,           " Order quantity
        vrkme  TYPE vbap-vrkme,            " Quantity Unit
        netwr  TYPE vbap-netwr,            " Net value of the order item
        waerk  TYPE vbap-waerk,            " Currency
      END OF ty_vbap.
    DATA :
      gs_vbak TYPE ty_vbak,
    * Data displayed in the first list
      gt_vbak TYPE TABLE OF ty_vbak,
    * Data displayed in the second list
      gt_vbap TYPE TABLE OF ty_vbap.
    SELECT-OPTIONS :
      s_vkorg FOR gs_vbak-vkorg,           " Sales organization
      s_kunnr FOR gs_vbak-kunnr,           " Sold-to party
      s_vbeln FOR gs_vbak-vbeln.           " Sales document
    SELECTION-SCREEN :
      SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.    "#EC NEEDED
    PARAMETERS p_max(2) TYPE n DEFAULT '20' OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    INITIALIZATION.
      v_1 = 'Maximum of records to read'.
    START-OF-SELECTION.
      PERFORM f_read_data_vbak.
      PERFORM f_display_data_vbak.

  • Overriding double click in JTable custom cell

    I have a JTable where I reset the custom cells to become editable on a single click instead if a double using:
    ((DefaultCellEditor)table.getDefaultEditor(String.class)).setClickCountToStart(1);
    Now what I need to do is display a JPopupMenu click a cell is double clicked. This works on cells that are not editable but the problem is that the user needs the popup dialog to display info for the cells that are editable.
    I have used the basic way to implement a double click on a certain column (in this case my third column):
    public void mouseClicked(MouseEvent e){
                   if (e.getClickCount() == 2 && table.getSelectedColumn() == 2 ){
                        popupMenu.show( e.getComponent(),
    e.getX(), e.getY() );
    But when double clicking, nothing happens.
    Anyone have any idea to implement this or over-ride an editable cell?
    Thanks,
    Chris

    This still says <identifier> expect, how can I resove this please? Then you still have something wrong with your code. Since you didn't post your code how are we supposed to help?
    The proper way to ask a question is to include your demo code that trys to illustrate the problem. Something like the following:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class TableRightClick extends JFrame
         public TableRightClick()
              JTable table = new JTable(10, 5);
              table.addMouseListener( new MouseAdapter()
                   public void mousePressed(MouseEvent e)
                        if ( SwingUtilities.isRightMouseButton(e) )
    //                    if (e.isPopupTrigger())
                             JTable source = (JTable)e.getSource();
                             int row = source.rowAtPoint( e.getPoint() );
                             int column = source.columnAtPoint( e.getPoint() );
                             System.out.println(column);
                             source.changeSelection(row, column, false, false);
              table.setPreferredScrollableViewportSize(table.getPreferredSize());
              getContentPane().add( new JScrollPane(table) );
         public static void main(String[] args)
              TableRightClick frame = new TableRightClick();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible( true );
    }

  • Double click action from trackpad button?

    Hi all,
    I've had my iBook G4 for a few months now and last week I've been noticing that a single click on my trackpad button would product doubl click results. This is really annoying when I:
    - try to use a form checkbox and it quickly changes and changes back
    - try to make a selection photoshop and it just disappears
    - try to open a new tab in Firefox/Camino/Safari/etc and two tabs open of the same URL
    I'm noticing that if I press on the left side of the button it tends to be a single click and the right (most common) gives the double. Did I accidentally change something in the System Preferences? Any experience on fixing this problem?
    Thanks to anybody who can help.

    Hi Eggz
    I experience the same here with my iBook G4 12''. It is quite like my three year old nokia cell phone registering double input from single touches all the time. Only the iBook is just four weeks old.
    The 'Ignore accidental trackpad input' option in System Preferences is turned on all the time. I unchecked it and it does not appear to have any effect on this double clicking issue.
    After four years of heavy TiBook trackpad button clicking (no mouse ever on my laptop), and knowing my friends 12'' PowerBook, the iBook trackpad button feels very lousy. Its unprecise movement/action point and its hollow plastic clicking sound do not live up to the standards I am used to. Ok, it's only an iBook - but it's disappointing anyway.
    I will talk to support tomorrow (today a holiday) and get back with news afterward.
    Sebastian
    iBook G4 12''   Mac OS X (10.4.6)   G5 Quad

  • Single Click versus Double Click Action not working

    Hello, having an issue with actions on symbols.
    I have symbols that when clicked play at a specific location on the timeline.
    Tthe first symbol uses single click (how I want it)
    The rest of the symbols also use single click, but when I test the animation they require double click (even though they are coded to be single click)
    Any ideas?
    Here is a testing location for the animation:
    http://www.contentx.com/DSU_discovery/MainAnim.html
    Ideally I want single click on all the symbols. The double click is confusing.
    Thanks!
    zack

    Hi, Zack-
    Marie nailed it without even looking at the project.    You are calling play() on a place that has a trigger that says stop().  The reason it plays the second time is rather complicated and has to do with the default play() behavior when there's a trigger, but the easy thing to do is to add one to your click event timecode.
    For instance: Presentation.click currently says:
    sym.play(22000);
    Just replace it with:
    sym.play(22001);
    The next easiest thing to do is to change your play call to use the optional "false" parameter to force it to not execute the trigger at 2200.
    sym.play(22000, false);
    http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html#symbolinstance
       - scroll down to "play" to read more about the API
    Hope that helps!
    -Elaine

  • Remediation for single-clicking a double-click action

    I'm using the double mouse click feature of a Click box in a
    software simulation lesson we've built in captivate. Unfortunately
    when the user single-clicks in the Click box, no remediation shows
    to tell the user that they must double-click in the box to complete
    the step.
    Anyone have any ideas on how to provide the user with
    remediation on single clicking a double click Click box?
    Thanks,
    Scott Witlen
    McKessson Provider Technologies

    Um... there are no macros. Captivate is a closed system with
    no documented API outside of some variables you can read and in
    some cases, set to make Captivate do some simple navigation-related
    things. Search the Captivate help file for 'variables' and you'll
    find a list.
    Outside of that, the only official ways to "enhance"
    Captivate are either to:
    - Create your own standalone functionality in Flash and
    insert it in Captivate as a self-contained animation. This can be
    problematic due to the closed nature of the Captivate runtime, as
    well as the layering imposed by the use of skins and borders.
    - Make Javascript calls to the browser and put the
    functionality there. Since there is limited interactivity between
    Javascript and Flash, this is much more limited in scope than
    inserting your own self-contained animations
    Some folks have also opened up a published SWF with a
    decompiler program and viewed the Adobe source code in an effort to
    make their inserted animations do cooler things, but that is very
    much an unsupported activity.

  • Regarding exec of a report  based on double click action o sel-screen field

    Hi folks!
         I want to execute my report program when i select
    some action from selection screen field using f4 help of that field.Now instead of clicking on the execution button,i want my report to get executed when i select some action from the selection-screen field.Please provide
    me with some suggestions.All the helpful suggestions will be rewarded.Hoping helpful suggestion from all sap gurus.
    Thanks & Regards,
    raghav.

    Hi,
       try below logic
         at selection-screen on ON VALUE-REQUEST FOR
         psel_low_high 
          leave to list-processing
          or
          submit ztest and return.    
    Regards
    amole

  • Is there a way to read the system DoubleClickTime double-click%3F

    Hi,
    I'm doing some customized actions on a tree if a user "slow-double-clicks" on a valid tag in the tree. My current solution works, but I would like to set the "limit" or interpretation of what constitutes a "slow" double-click based on the system DoubleClickTime setting of the system that the program is running on.. Anyone knows how to read this piece of information on a) windows system or b) any system?
    Please note that due to what I'm trying to accomplish, I cannot use the "double-click" event to make this determination.  (Double-clicks are left alone to do whatever they would normally do.)
    Microsoft MSDN on Double-clicks
    --I guess a more general form of the question would be "how to read out windows system settings in LabVIEW".
    For the specially interested, my program is an event driven queue machine. When I get a mouse up on the tree-control, I pass the ms timer to an action engine (get, set, re-set) which tracks delta time between two clicks and passes out an enum of "click type" (as defined by me) as either n/a, single, double, slow double.
    In my queue handler loop, I take the click message (from event loop), do some basic checks (is tag of the tree coordinate location empty string?) and pass it all along to another state that determines what to do based on click type, parent(s) (or indent level) and column.  The need for this "slow-click" feature came about when I needed to let the user re-name a parent level tag-item.. If you double-click normally on a parent, it will expand or collapse its children list. . In some applications, (windows explorer for example), the default double-click action (open the file) can be "changed" to a "rename" function by clicking a little slower. Clicking too slow will be interpreted as a "single" click (e.g. select).
    QFang
    CLD LabVIEW 7.1 to 2013

    How about now?
    The clue is in tst's post above, its under .net, windows.forms http://msdn.microsoft.com/en-us/library/system.windows.forms.systeminformation.doubleclicktime.aspx
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

Maybe you are looking for

  • Security using custom field in PCUI

    We would like to create a custom field on the header of the business partner to store information that would then be used in the security roles. For example, we want to create a branch field on the header of the business partner and then use this fie

  • Crysis FPS: Windows Vista 64-Bit.

    With my current system spec... Resolution at 1680x1050, all settings at very high, vsync on, no AA, Crysis version 1.1, I'm getting about 19FPS. Resolution at 1680x1050, all settings at very high, vsync on, 16x AA, Crysis version 1.1, I'm getting abo

  • Problems with Basic 3D Filter in Motion 2.0.1

    Hello helpful people, when I apply the Basic 3D filter to a layer the layer becomes a little fuzzy. With no settings on the filter changed. If I put the filter on only a piece of the middle of the timeline my object goes from sharp to fuzzy and then

  • Msi gt70-20c second hard disk

    Hi, i would like to know if the msi gt70-20c 252 has the raid msata card alrady installed in, or only a sata 2 port, or nothing at all. Does anyone bought a gt70-2OC with a single hard disk and after that tried to installa a normal sata drive? Thanks

  • PC Suite Contact Data Location?

    My 6220 died while using PC Suite [PCS] for the first time on a new XP machine taking all my contacts with it. (I had not had a chance to do a content copy yet). Where does PCS store / does it store the contacts of phones that have previously been us