Distinguishing between single and double left click

Hello there,
Is it possible to handle a single click and a double click separately?
I mean to ignore a single click handling, when you double click.
Thank you

I agree with bazja01 except I would make a small change as shown below:
private class MouseListener extends MouseAdapter {
   public void mouseClicked(MouseEvent e) {
      if (e.getClickCount() > 1) {        // change from ==2 to >1
          // do double click process
      } else {
          // do single click
}This is because for some unknown reasons, on my Windows 98SE, the click count jumped from 1 to 3 on a double click and I wasted a lot of time trying to figure out why my code using ==2 didn't work.
V.V.

Similar Messages

  • Programming button for single and double click

    I know how to programme a button to play a certain movie segment. However, in my current project I need to be able to programme a button in the menu so that
    1. on rollover - nothing
    2. on single mouse click - button colour changes + a parapraph of text appears on the menu screen in a predefined space
    3. on double click - a movie clip plays
    It might be a simple qiestion but I would greatly appreciate it if you could point me in the right direction.
    Thanks.

    Nick76 wrote:
    I know how to programme a button to play a certain movie segment. However, in my current project I need to be able to programme a button in the menu so that
    1. on rollover - nothing
    Do not change the highligh and it will look like nothing is happening (make sure auto activate is not beign used)
    2. on single mouse click - button colour changes + a parapraph of text appears on the menu screen in a predefined space
    3. on double click - a movie clip plays
    It might be a simple qiestion but I would greatly appreciate it if you could point me in the right direction.
    Thanks.
    Single and Double clicks cannot be done like that. (Some players using layered menus do require a click to get things seen but not really what you are speaking about.)
    Flash or Director may be better for this?

  • Detecting click ( single and double) on row (displayed using iterator)

    Hello All,
    I am using jdev 11.1.1.6
    I am displaying a list as below.
                                   <trh:tableLayout>
                                        <af:iterator value="#{pageFlowScope.Bean.List}" var="temp">
                                         <trh:rowLayout>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value1}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value2}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value3}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value4}"/>
                                          </trh:cellFormat>
                                        </trh:rowLayout>
                                        </af:iterator>
                                      </trh:tableLayout>
    My requirement is, when user clicks on a row, that row should be detected in backend and those value will be used.
    My requirement is, On single click row should be detected(in backend/bean)
    On double click, the values is saved(in backend/bean).
    How can i detect single and double click on a particular row ?

    I have updated the code as below, single click and double click are getting detected on a row
        <af:resource type="javascript">
                function singleClick(){
                    alert("Single Click");
                function doubleClick(){
                    alert("Double Click");
        </af:resource>
                                   <trh:tableLayout>
                                        <af:iterator value="#{pageFlowScope.Bean.List}" var="temp" onclick="singleClick()" ondblclick="doubleClick()">
                                         <trh:rowLayout>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value1}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value2}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value3}"/>
                                          </trh:cellFormat>
                                          <trh:cellFormat>
                                           <af:outputText value="#{temp.value4}"/>
                                          </trh:cellFormat>
                                        </trh:rowLayout>
                                        </af:iterator>
                                      </trh:tableLayout>
    Now,
    suppose i have following values for some/any row,
    value1=20, value2="abc", value3=009, value4="Language" 
    How can i retrieve these values in java script (if in backing bean then very good)

  • Doubt - mouse double click invokes both single and double click

    Hi Friends,
    I added mouse listener to a java component. In the mouseClicked() method, I have implementation for both mouse single and double click. When I try to double click that component it invokes the single click method first and the it invokes the double click method. My problem is when I try to double click that component it should invoke my double click method alone not single click too.
    I'd be very grateful if someone can help me.
    Thanks and Regards,
    Sangeetha J

    Your problem: a double click is two single clicks. The first click will always fire a single-click event. How's the computer supposed to know that another click is to follow?
    All I think you could do is to instantiate a timer in the one-click method, set to whatever amount of time you think a double-click should take. If you get a second event while the timer's still active, it was a double-click and you can stop the timer and do the double-click action. Otherwise your timer should execute the single-click action after it timed out.
    But this will make your GUI look like it's responding slowly to single-clicks.

  • Can't open new tabs with double left click on tab bar in FF29.0.1?

    I've always enjoyed how tabs work in FF, mainly with them being on the bottom (which I had to find a work-around for by making the userChrome.css file - the "about:config" modification no longer works) and also being able to double left click on the tab bar to create new tabs.
    With the most recent update, double left clicking on the tab bar no longer has a function, and to create new tabs, I must now middle click. It's not a big deal really, but is there a way to change this back?
    I searched through some options on the "about:config" page, searched "tab" and found an option there: "browser.tabs.opentabfor.middleclick" that seemed promising. I changed the value to "False" but it didn't change anything - in fact, middle clicking still creates new tabs.
    I tried adding a modified function with "leftclick" in it, just to see if it might do anything but, nothing.
    Any other suggestions for restoring the double left click function to create new tabs? Thanks!

    ''Hydrilus wrote:''
    browser.tabs.opentabfor.middleclick
    If set to false, middle-clicking <u>links on web pages</u> opens them in a new window. It probably also affects bookmarks, history entries, and items in the address bar drop-down menu.
    ''Hydrilus wrote:''
    Any other suggestions for restoring the double left click function to create new tabs?
    You need an add-on. Here are two I know about:
    * [https://addons.mozilla.org/firefox/addon/classicthemerestorer/ Classic Theme Restorer]. In the add-on's option window, click the Special tab and check "Tabs toolbar: double click opens a new tab"
    * [https://addons.mozilla.org/firefox/addon/tab-mix-plus/ Tab Mix Plus]. In the add-on's option window, click the Mouse icon, then the Mouse Clicking tab, then the Double-click tab below that. [http://tmp.garyr.net/support/viewpage.php?t=3&p=mouse-clicking The Tab Mix Plus help page] has more details.

  • Outlook 2010 apostrophe, single and double quotes are changes to question mark while sending mails to other internet receipient.

    We are using MS Outlook 2010 as our mail client. But we have noticed that whenevr we sent a mail to any other internet mail recipient all the "apostrophe", "single" and "double quotes" have automatically converted to ?. We have
    done almost all the workaround found in this site such as
    1.New a message and focus on the message window > click File > Options > Mail > Spelling and Autocorrect… > Proofing > AutoCorrect Options… > AutoFormat > clear the box before “Straight quotes” with “smart quotes”
    2. Used different encoding. We presently using US-ASCII for outgoing message. etc.
    Need your help to sort out these issues urgently.
    Waiting for a solution.

    Hi,
    What is your account type? IMAP, POP or Exchange?
    Send an email from the webmail, ask the recipient if this issue persists.
    As far as I know, this problem is always related to the encoding for outgoing messages, and here I suggest you try UTF-8:
    Go to File -> Options -> Advanced -> International options -> Uncheck "Automatically select encoding for outgoing messages", then select "Unicode (UTF-8)" beside "Preferred encoding for outgoing messages" -> OK.
    Hope this helps.
    Regards,
    Melon Chen
    TechNet Community Support

  • Single and double quotes entered in form field cause corruption?

    I am creating a database change request system using in APEX 2.2 and the main form has a description field (clob) and a API_description field (varchar2(4000)) that are text area fields on the page. The form seems to have trouble when the string data entered into the text area page items on the form contain single and double quotes.
    <br><br>
    I have pasted my test data below in this problem description(this is not true sql but it gets the point accross). I use the wizard created insert process to get the data into the db from the text fields in the wizard generated form, then use the wizard created fetch process to get the data back out and rendered on the same form. When I use the test data below, sometimes a few characters dissappear from my input data on the way out, sometime form fields go away, and their html is interspersed with the previous form field's data on the page. And I get different results on different tests with the same data.
    <br><br>
    Do I have to do something special for a vanilla htmldb text page item on a form to be able to receive single and double quotes in the string input in order to avoid that string data confusing the processing on the way in to the Database or on the way out for rendering?
    <br><br>
    Do I have to escape the characters? How do I do this?
    <br><br>
    The "varchar2(1) := ‘A’" part of the below TEST DATA string seem to cause the most trouble. The behavior is erratic - sometimes the pattern works, sometimes html is interspersed in one place, sometimes another (on the way back out)
    <br><br>
    START TEST DATA:
    Add column pcl3_data_ind varchar2(1) to edc_tran,edc_log, edc_recreate_tran table
    Or
    Create a file with following sql in it
    Insert into sometable values(‘A’,sysdate);
    Or
    create new table as follows
    create table “someschema”.“sometable”
    (id number not null,
    Name varchar2(20) not null,
    Join_date sysdate
    Active varchar2(1) := ‘A’
    END TEST DATA:
    <br><br>
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    Here is an example of the test data being displayed after being fetched back out of oracle (this will look like gibberish when rendered in the forum system (end of problem description except for example):
    <br><br>
    env
    Add column pcl3_data_ind varchar2(1) to edc_tran,edc_log, edc_recreate_tran table
    Or
    Create a file with following sql in it
    Insert into sometable values(‘A’,sysdate);
    Or
    crete new tableas follws
    crate table “somesca”.“sometable”
    har2(20) not null,
    Join_date sysdate
    Active varchar2(1) := ‘A’
    woextarea>
    <a class="eLink" title="Edit" href="javascript:popupURL('f?p=4000:371:204538675714370::::P371_ID,FB_FLOW_ID,FB_FLOW_PAGE_ID:1034609472735510,104,2');" tabindex="999"><img src="/i/e.gif" alt="Edit" class="eLink" /></a></td></tr><tr><td nowrap align="right"><label ...

    I found a good php related post that has a nice set of the potentially problematic characters (this is in the context of word pasted into IE I think). I am pretty confident that at least single curly quotes do not work well in apex 2.2). I would not be surprised if some of the others were trouble as well.:
    http://lists.evolt.org/archive/Week-of-Mon-20030602/141975.html
    here is the list
    $trans_tbl[chr(34)] = '"' ;          //      quote
              $trans_tbl[chr(38)] = '&' ;          //      ampersand
              $trans_tbl[chr(60)] = '<' ;          //      less-than
              $trans_tbl[chr(62)] = '>' ;          //      more-than
              $trans_tbl[chr(128)] = '€' ;     //      euro
              $trans_tbl[chr(129)] = '€' ;      //     euro
              $trans_tbl[chr(130)] = '‚' ;      //     low quote
              $trans_tbl[chr(131)] = 'ƒ' ;      //     florin
              $trans_tbl[chr(132)] = '„' ;      //      double low quote
              $trans_tbl[chr(133)] = '…' ;      //     ellipsis
              $trans_tbl[chr(134)] = '†' ;     //     dagger
              $trans_tbl[chr(135)] = '‡' ;      //     double dagger
              $trans_tbl[chr(136)] = 'ˆ' ;      //     circumflex
              $trans_tbl[chr(137)] = '‰' ;      //     per thousand
              $trans_tbl[chr(138)] = 'Š' ;      //     S caron
              $trans_tbl[chr(139)] = '‹' ;      //     left angle quote
              $trans_tbl[chr(140)] = 'Œ' ;      //     OE ligature
              $trans_tbl[chr(142)] = 'Ž' ;      //     Z caron
              $trans_tbl[chr(145)] = '‘' ;      //     left single quote
              $trans_tbl[chr(146)] = '’' ;      //     right single quote
              $trans_tbl[chr(147)] = '“' ;      //     left double quote
              $trans_tbl[chr(148)] = '”' ;      //     right double quote
              $trans_tbl[chr(149)] = '•' ;      //     bullet
              $trans_tbl[chr(150)] = '–' ;      //     en dash
              $trans_tbl[chr(151)] = '—' ;      //     em dash
              $trans_tbl[chr(152)] = '˜' ;      //     small tilde
              $trans_tbl[chr(153)] = '™' ;      //     trademark
              $trans_tbl[chr(154)] = 'š' ;      //     small s caron
              $trans_tbl[chr(155)] = '›' ;      //     right angle quote
              $trans_tbl[chr(156)] = 'œ' ;      //     oe ligature
              $trans_tbl[chr(158)] = 'ž' ;      //      small z caron
              $trans_tbl[chr(159)] = 'Ÿ' ;      //     Y with diaeresis
    <br>
    -Geoffrey

  • What 's the difference between quote ' and double quote "?

    what's the difference between quote' and double quote "?
    when we use each one?
    Exemple of use of each case?

    'c' is a char, ie. a primitive type representing a single character
    "c" is an instance of the String class length 1.

  • Toggling between single and multiple selection in a table

    I am working on ADF faces. I need to switch between single and multiple selection in <af:table based on a button I select.
    I cannot use switcher or rendered property inside <af:table. Only the first one is rendering the second one is not rendering based on the switch
    <f:facet name="selection">
    <af:tableSelectMany autoSubmit="true"
    rendered="#{treeBean.multipleRows}"/>
    </f:facet>
    <f:facet name="selection">
    <af:tableSelectOne autoSubmit="true"
    rendered="#{treeBean.singleRows}"/>
    </f:facet>
    When I use inside the switcher, it doesn't like the parent.
    Any ideas would be greatly appreciated.
    Thanks,
    Vijay.

    I have probably misunderstood what your issue is. I do not know what your version of ADF faces is. Here is some sample code working with my version. Please check if your jdev has "rowSelection" attribute. If it has, please try my sampe code
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces">
    <jsp:directive.page contentType="text/html;charset=utf-8"/>
    <f:view>
    <af:document title="tableSelectMany Demo">
    <af:form>
    <af:panelGroup layout="vertical">
    <af:messages/>
    <af:selectOneChoice value="#{sessionScope.tableSelection}"
    autoSubmit="true"
    id="selType"
    label="Selection Type">
    <af:selectItem label="Single" value="#{null}"/>
    <af:selectItem label="Multiple" value="#{true}"/>
    </af:selectOneChoice>
    <af:table summary="Periodic table"
    binding="#{tableActions.table}"
    partialTriggers="selType"
    rowSelection="#{sessionScope.tableSelection ? 'multiple' : 'single'}"
    value="#{periodicTable.tableData}" var="row" rows="10">
    <af:column>
    <f:facet name="header">
    <af:outputText value="Name"/>
    </f:facet>
    <af:outputText value="#{row.name}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Symbol"/>
    </f:facet>
    <af:outputText value="#{row.symbol}"/>
    </af:column>
    <af:column>
    <f:facet name="header">
    <af:outputText value="Action Column"/>
    </f:facet>
    <af:commandButton immediate="true" text="Action"
    action="#{row.action}"/>
    </af:column>
    </af:table>
    </af:panelGroup>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>

  • Does anybody know any software for the Mac that I can run round robin, single and double elimination tournaments?

    Does anybody know any software for the Mac that I can run round robin, single and double elimination tournaments?  I help run tournaments but using excel for pool play and the web for bracket play, but if wifi is not available I have no way of running brackets for prize play.  Can some one help point me in the direction of software that I can use locally on my Mac Pro. 
    Thanks,
    Chris
    <E-mail Edited by Host>

    Splendid City Team Sports Scheduler, and Sports Scheduling Software System

  • Distinguishing between CSV and Excel file formats

    I am trying to distinguish between CSV and Excel files.   Most of the files I need to process are CSV, but some have been opened and re-saved in Excel format.  I know about the Excel toolbox available, but haven't used it yet. 
    I need to be able to open a spreadsheet file regardless of if it is in CSV or Excel format.  Any help would be greatly appreciated.
    Here are two example files, one CSV and one Excel.  Both have .XLS file extensions. 
    Attachments:
    20-4-XLS.xls ‏21 KB
    20-5-CSV.xls ‏8 KB

    Hi Paul,
    I think the matter is not the extention (xls or csv or whatever) but the format of the data written in your file.
    To see what I mean, open the xls file you posted with notepad... What does it look like ?
    You have tobe sure of the format of the file you want to read so that you can develop an appropriate VI... if you want to be able to read different type of data format, do a test before reading the file and then use an appropriate routine for each format.
    Hope this helps you...
    BTW, to read the one named CSV, a simple "read from spreadsheet file" VI will do the job
    When my feet touch the ground each morning the devil thinks "bloody hell... He's up again!"

  • Distinguishing between topics and queues

              Hi,
              I have a generic piece of code that takes a javax.jms.Destination that does different
              things depending if the destination is a queue or a topic.
              The problem is that it seems that destinations in Weblogic implement both queue
              and topic:
              instanceof queue <new_JMSTopic_1>
              queue name: <new_JMSTopic_1>
              weblogic.jms.common.InvalidDestinationException: Destination must be a queue,
              ne
              w_JMSTopic_1
              at weblogic.jms.common.Destination.checkDestinationType(Destination.java
              :113)
              at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1516)
              at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1500)
              at Test.run(Test.java:100)
              at Test.main(Test.java:311)
              Is there anyway for me to programatically distinguish between queues and topics
              as there seems not to be any javadoc on weblogic.jms.common.Destination and instanceof
              does not work? I would prefer not to rely on exceptions.
              I'm using Weblogic 8.1 sp2.
              Thanks
              Riad
              

              Cool. Thanks for your help Tom.
              Riad
              Tom Barnes <[email protected]> wrote:
              >Hi Riad,
              >
              >This has come up before.
              >
              >For now, you may cast dest to weblogic.jms.common.DestinationImpl
              >and call "isQueue()". Normally, only the javadoc'd methods
              >in weblogic.jms.extensions are intended for public use,
              >but for this case we make an exception.
              >
              >In the next release, this method will be exposed through
              >a new public WL JMS API extension:
              >weblogic.jms.extensions.WLDestination,
              >and might not be available otherwise.
              >
              >Tom, BEA
              >
              >P.S. A java tip: The JDK's built-in "javap"
              >is useful for viewing an arbitrary class api.
              >As in "javap weblogic.jms.extensions.JMSHelper".
              >
              >Riad wrote:
              >> Hi,
              >>
              >> I have a generic piece of code that takes a javax.jms.Destination that
              >does different
              >> things depending if the destination is a queue or a topic.
              >>
              >> The problem is that it seems that destinations in Weblogic implement
              >both queue
              >> and topic:
              >> instanceof queue <new_JMSTopic_1>
              >> queue name: <new_JMSTopic_1>
              >> weblogic.jms.common.InvalidDestinationException: Destination must be
              >a queue,
              >> ne
              >> w_JMSTopic_1
              >> at weblogic.jms.common.Destination.checkDestinationType(Destination.java
              >> :113)
              >> at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1516)
              >> at weblogic.jms.client.JMSSession.createBrowser(JMSSession.java:1500)
              >> at Test.run(Test.java:100)
              >> at Test.main(Test.java:311)
              >>
              >> Is there anyway for me to programatically distinguish between queues
              >and topics
              >> as there seems not to be any javadoc on weblogic.jms.common.Destination
              >and instanceof
              >> does not work? I would prefer not to rely on exceptions.
              >>
              >> I'm using Weblogic 8.1 sp2.
              >>
              >> Thanks
              >> Riad
              >
              

  • Distinguish between AW5 and 6 in script

    I'm trying to create an application in Automator to automate the conversion of AW to iWork. I'm using one of Yvan's scripts to convert AW6 to iWork successfully. The only step remaining is to convert to AW6 from 5, something that shouldn't be too hard since all it has to do is open and save. However, I can't find a good way to distinguish between AW5 and 6. In his script, I believe Yvan does this here:
    on AWtoAW6(leCheminOriginal_UniText) -- leCheminOriginal_UniText est Unicode text
              local leFichier, flag, nf, l, nouveauChemin
              set leFichier to leCheminOriginal_UniText as alias
              try
                        tell application "AppleWorks 6.2.9"
      activate
      open leFichier
                                  set nf to name of document 1
                                  if nf contains v6 then
                                            set AppleScript's text item delimiters to v6
                                            set l to text items of nf
                                            set AppleScript's text item delimiters to ""
                                            set nf to l as text
                                  end if
                                  if nf does not end with ".cwk" then set nf to nf & ".cwk"
                                  set nouveauChemin to cheminDeStockage & nf
                                  tell application "System Events"
                                            if exists (file nouveauChemin) then set name of file nouveauChemin to (text 1 thru -(2 + (length of "cwk")) of nf) & my horoDateur(modification date of file nouveauChemin) & ".cwk" (* name stamped *)
      make new file at end of folder cheminDeStockage with properties {name:nf, file creator:"BOBO", file type:fileType}
                                  end tell
                                  set leFichier to nouveauChemin as alias
      save document 1 in leFichier
      close document 1
                        end tell -- AppleWorks 6
              on error
                        set rapport to rapport & msg96 & nouveauChemin & return
              end try
    end AWtoAW6
    But I'm not sure. What I need is a script that opens, checks if it's an AW5 file, if it is opens and saves in AW6, and then proceeds to open my other script that can do the

    I'm not sure what you mean. The files have to be saved as AW6 for the iWork apps to be able to open them.
    Yvan has added all of his AppleWorks scripts to his Box.com account. He says the one you need is https://app.box.com/s/hqq9jwfi45nknjpf6d52

  • Why do i have to keep clicking my left mouse button to make the program work it just stops and if left click it starts working

    Why do i have to keep clicking my left mouse button to make the program work it just stops and if left click it starts working. I'v only just started to use this program and It's no good at all if I go to a website and click a button I have to keep clicking it to finish what its doing.

    hello jeffsprig, can you try to replicate this behaviour when you launch firefox in safe mode once?
    [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
    multiple other affected users have reported that this was an issue caused by malware on their pc. please run a scan of your system with [http://www.bleepingcomputer.com/download/adwcleaner/ adwcleaner] and the [http://www.malwarebytes.org/products/malwarebytes_free free version of malwarebytes].
    [[Troubleshoot Firefox issues caused by malware]]

  • Distinguish between 0001 and 0006 Vendor in SRM?

    Hi,
    how can i distinguish between 0001 and 0006 vendors in SRM side after they have been replicated from R/3.
    Regards,
    Neha

    Hi Muthu,
    Thanks for your response.
    VENMAP contains both the vendors as both the vendors are replicated from ECC.
    I have found one solution:
    During the replication add a piece of code in both the methods of the  BADI BBP_TRANSDATA_PREP
    What will the code achieve:
                From the table CT_LFA1 identify the vendors with KTOKK = '0006'
                for those vendors set CT_LFA1-SPERM = 'X'.
                This will update the table field BUT000-XBLCK with 'X'.
                Hence, this can be used in the search help to distinguish between 0001 and 0006 vendors.
               XBLCK is used for blocking vendors from any purchasing activity .
    in my opinion this solution should work.
    What do u say?
    Regards,
    Neha Misra

Maybe you are looking for