Mouse down & mouse down in one event

I am trying to put a mouse down with a mouse down in the same event. The first mouse down is to control a graph and the second a table. When I add the second mouse down event the Graph mouse down doesn't work.
What am I doing wrong>
Paul Power
I have not lost my mind, it's backed up on a disk somewhere

By stopped working I mean a broken run arrow and disabled property nodes giving broken wires
I have attached the xy graph code being used
Paul Power
I have not lost my mind, it's backed up on a disk somewhere
Attachments:
XY graph - closest point.vi ‏24 KB
scatter plot.vi ‏27 KB

Similar Messages

  • Kill the MouseEven.CLICK event when mouse is held down?

    I have been studying games on Facebook and am trying to emulate mouse event handling. For example in ChefVille you can click on objects and drag them around. But if you hold the mouse down you pan the entire game environment and when you release the mouse button a click is NOT registered on the object below the mouse. In my tinkering the CLICK event is triggered on the release of the mouse button no matter how long I keep the button depressed. How do I keep the CLICK event from firing if the mouse is held down for some period of time?

    I don't know that you can cancel a CLICK event in the middle of it happening (CLICK = MOUSE_DOWN followed by MOUSE_UP), but you can trigger a Timer on the MOUSE_DOWN event and use its event handler to set a boolean variable that your CLICK event handler function can make use of to decide whether or not to process a CLICK event.

  • How do I detect if the mouse button is down, outside of the applet?

    Using
    X = MouseInfo.getPointerInfo().getLocation().x;
    Y = MouseInfo.getPointerInfo().getLocation().y;I can detect the mouse location anywhere on the entire screen, but after an extensive search on Google I cannot find any way to detect whether a mouse button is being pressed.
    The class I am using is threaded, so I want to check each time to see if a mouse button is down (a simple true or false would be perfect).

    coopkev2 wrote:
    One website says to use the Control.MouseButtons property in Windows, is that possible to do in Java?I would pretty much forget about it, especially if you start to talk about "in OSWhatever it is done like this" - that makes it platform dependent and you can forget about platform specific stuff in the Java language itself - the only way to get something like that done is through a native library that you invoke using Java, using either JNI or JNA.

  • Mouse Down ,Mouse Click conflict

    Dear Flexmasters ,
      I have a view component that I would like to be draggable when the mouse is held down ,  and dispatch an event when clicked ( single-click ).  However , when I go to drag and the mouse is released , a click event is dispatched.  Is there a way I can prevent the click event from being fired during a drag and drop operation ?  As always points WILL be awarded.
    Here is the code if you would like to see it.
                public function init():void
                     this.addEventListener(MouseEvent.MOUSE_DOWN , handleStartDrag );
                    this.addEventListener(MouseEvent.MOUSE_UP , handleStopDrag );
                    this.addEventListener(MouseEvent.CLICK , layerClick );
                private function handleStartDrag(event:MouseEvent):void
                     event.preventDefault();
                    var target:UIComponent = UIComponent(event.currentTarget);
                    target.startDrag(false);
                private function handleStopDrag(event:MouseEvent):void
                    event.preventDefault();
                    var target:UIComponent = UIComponent(event.currentTarget);
                    target.stopDrag();
                private function layerClick(event:MouseEvent):void
                    if(event.type == MouseEvent.CLICK )
                        var uiEvent:UIEVENT = new UIEVENT(UIEVENT.LAYERSELECTED);
                        uiEvent.layer = layer;
                        dispatchEvent( uiEvent );

    I overrided the MouseEvent and Group classes to differenciate the MouseEvent.CLICK and MouseEvent.MOUSE_DOWN -> MouseEvent.MOUSE_UP
    utils.RealMouseEvent.as
    package utils
         import flash.events.MouseEvent;
         import flash.events.TimerEvent;
         import flash.geom.Point;
         import flash.utils.Timer;
         import settings.Settings;
         import spark.components.Group;
         [Event(name="realClick", type="utils.RealMouseEvent")]
         [Event(name="realMouseUp", type="utils.RealMouseEvent")]
         [Event(name="realMouseDown", type="utils.RealMouseEvent")]
         public class RealMouseEventsGroup extends Group
              public function RealMouseEventsGroup()
                   super();
                   _isTimeOut = false;
                   addEventListener(MouseEvent.MOUSE_DOWN,mouseDownHandler,false,1);
                   addEventListener(MouseEvent.CLICK,mouseClickHandler,false,1);
              public var stopPropagation:Boolean = false;
              private var _timer:Timer = new Timer(parseInt(Settings.getSetting("clickDelay")),1);
              private var _mouseMoveTolerance:Number = parseInt(Settings.getSetting("mouseMoveTolerance"));
              private var _isTimeOut:Boolean;
              private var _isMoved:Boolean;
              private var _event:MouseEvent;
              private var _lastMouseDownPt:Point;
              private function mouseDownHandler(event:MouseEvent):void{
                   _lastMouseDownPt = new Point(mouseX,mouseY);
                   _isTimeOut = false;
                   _isMoved = false;
                   _event = event;
                   addEventListener(MouseEvent.MOUSE_UP,mouseUpHandler,false,1);
                   addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler,false,1);
                   _timer.addEventListener(TimerEvent.TIMER_COMPLETE,clickTimeOut,false,1);
                   _timer.reset();
                   _timer.start();
                   if(stopPropagation)
                        event.stopPropagation();
              private function mouseUpHandler(event:MouseEvent):void{
                   if(_isTimeOut || _isMoved)
                        dispatchEvent(new RealMouseEvent(RealMouseEvent.REAL_MOUSE_UP,event));
                   removeEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
                   _timer.stop();
                   if(stopPropagation)
                        event.stopPropagation();
              private function mouseClickHandler(event:MouseEvent):void{
                   if(!_isTimeOut && !_isMoved)
                        dispatchEvent(new RealMouseEvent(RealMouseEvent.REAL_CLICK,event));              
                   _timer.stop();
                   if(stopPropagation)
                        event.stopPropagation();
              private function mouseMoveHandler(event:MouseEvent):void{
                   var pt:Point = new Point(mouseX,mouseY);
                   if(Point.distance(_lastMouseDownPt,pt) > _mouseMoveTolerance){
                        _timer.stop();
                        dispatchEvent(new RealMouseEvent(RealMouseEvent.REAL_MOUSE_DOWN,_event));
                        removeEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
                        _isMoved = true;
              private function clickTimeOut(event:TimerEvent):void{
                   _isTimeOut = true;
                   _timer.removeEventListener(TimerEvent.TIMER_COMPLETE,clickTimeOut);
                   removeEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
                   dispatchEvent(new RealMouseEvent(RealMouseEvent.REAL_MOUSE_DOWN,_event));
    utils.RealMouseEventsGroup.as
    package utils
         import flash.display.InteractiveObject;
         import flash.events.MouseEvent;
         public class RealMouseEvent extends MouseEvent
              public static const REAL_CLICK:String = "realClick";
              public static const REAL_MOUSE_DOWN:String = "realMouseDown";
              public static const REAL_MOUSE_UP:String = "realMouseUp";
              public function RealMouseEvent(type:String, src:MouseEvent, bubbles:Boolean=true, cancelable:Boolean=false)
                   super(type, bubbles, cancelable, src.localX, src.localY, src.relatedObject, src.ctrlKey, src.altKey, src.shiftKey, src.buttonDown, src.delta);
    exemple of use :
    <utils:RealMouseEventsGroup id="myGroup"                                         realClick="myGroup_realClickHandler(event)"                                        realMouseDown="myGroup_realMouseDownHandler(event)"                                        realMouseUp="myGroup_realMouseUpHandler(event)"/>

  • Go down, mouses

    This is driving me crazy. My Mac Mighty Mouse (hardwired, not airborne, and not the new MagicMouse or whatever the digitally stimulated mouse is called) will NOT SCROLL DOWN.
    It will scroll up and sideways. But it won't go down, like that evening sun, or whatever Elton John was singing about.
    My iMac is 2 years old, and I'm now on my third mouse. The Original and Warranty Replacement 1 both had problems recording clicks and tracking; I'm on WR2 now.
    With the last mouse and now with this one, after a while, the cursor on screen does not track downward when I spin the trackball. I've done all the tricks: used the black lint-free cloth, rolled it on a white piece of paper to dislodge anything, and cleaned it with alcohol. Often, when I turn the mouse over and roll it on the wheel, the cursor responds properly and without hesitation. but when I turn the mouse over and use my finger, nothing happens. [Don't get carried away with parallel interpretations: this isn't an entendre about other things!]
    When I try to fix it, I make sure my hands are clean, I have just run the mouse through a bath of alcohol, and I often tap the mouse on its side to dislodge any small specks of dirt on the inside. The best that happens is that the cursor tracks properly for the first test or two, then stops tracking. As I said, it's still tracks properly in the other three directions, just not downward.
    Is there some special kind of chiropractic therapy for this damned thing? Or do I need to turn it in for Warranty Replacement 3?
    Thanks.

    Michael,
    It's just dirty, turn it over and rub it very vigorously on a piece of plain white paper for about 30 seconds. If it still isn't clean then repeat. You should do this about 1x a month just to keep the back cleaned up.
    Regards,
    Roger

  • Safari 5.1 flash mouse_leave not fired when mouse button is down

    Hi all, anyone know a work around for the fact that Event.MOUSE_LEAVE is not fired in Safari 5.1 (OSX 10.6.8) if the mouse button is down? I tried the latest beta player and the issue is not resolved. Thanks!

    WOT alerts you to dangerous web sites.
    That function is already built into Safari, and has been since version 3:
    http://www.macworld.com/article/137094/2008/11/safari_safe_browsing.html
    I had never heard of the WOT extension until today!
    If you go to Safari Preferences/Security you will see a box marked 'Warn when visiting a fraudulent website'. That is what that is.
    The blacklists from Google’s Safe Browsing Initiative (where Safari checks for 'fraudulent websites') are contained in a database cache file called SafeBrowsing.db  - the file was created when you first launched Safari, and if you have the browser open, the file is modified approximately every 30 minutes.

  • I use to be able to scale down objects highlted in box by clicking any corner holding down mouse and scaling down, that option is gone, is it an error on my settings or has that option been removed I now have to go to menu option click edit, then scale, a

    i use to be able to scale down objects highlted in box by clicking any corner holding down mouse and scaling down, that option is gone, is it an error on my settings or has that option been removed I now have to go to menu option click edit, then scale, and then manually have to scale down a percentage.

    Copy cat.

  • Jumpy mouse and shut-downs on G4 mirror door when putting to sleep or just random shut down after install of new 2nd internal WD IDE 320 gig hard drive, OS 10.4.11, orig HD is WD 80, RAM = 2 gig.  Help!

    Jumpy mouse and shut-downs on G4 mirror door when putting to sleep or just random shut down, is now occuring after install of new 2nd internal WD IDE 320 GB hard drive, running OS 10.4.11, orig HD is WD 80 GB, RAM = 2 gig.  Help!

    Hi Ted,
    At this point I think you should get Applejack...
    At this point I think you should get Applejack...
    http://www.macupdate.com/info.php/id/15667/applejack
    Ignore the MacKeeper ad no matter what else you decide.
    After installing, reboot holding down CMD+s, (+s), then when the DOS like prompt shows, type in...
    applejack AUTO
    Then let it do all 6 of it's things.
    At least it'll eliminate some questions if it doesn't fix it.
    The 6 things it does are...
    Correct any Disk problems.
    Repair Permissions.
    Clear out Cache Files.
    Repair/check several plist files.
    Dump the VM files for a fresh start.
    Trash old Log files.
    First reboot will be slower, sometimes 2 or 3 restarts will be required for full benefit... my guess is files relying upon other files relying upon other files! :-)
    Disconnect the USB cable from any Uninterruptible Power Supply so the system doesn't shut down in the middle of the process.
    Just sits there occupying very little space & never interfering, unless you need to invoke it in Single User Mode.
    After installing, reboot holding down CMD+s, (+s), then when the DOS like prompt shows, type in...
    applejack AUTO
    Then let it do all 6 of it's things.
    At least it'll eliminate some questions if it doesn't fix it.
    The 6 things it does are...
    Correct any Disk problems.
    Repair Permissions.
    Clear out Cache Files.
    Repair/check several plist files.
    Dump the VM files for a fresh start.
    Trash old Log files.
    First reboot will be slower, sometimes 2 or 3 restarts will be required for full benefit... my guess is files relying upon other files relying upon other files! :-)
    Disconnect the USB cable from any Uninterruptible Power Supply so the system doesn't shut down in the middle of the process.
    Just sits there occupying very little space & never interfering, unless you need to invoke it in Single User Mode.

  • After installing Lion, mouse up and down scrolling does not work

    After installing Lion, scrolling with an Apple mouse up and down does not work. Horizontal scrolling does work.

    Hi guys. First, check the scroll outside of Firefox. Is it working?
    Second,
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]''' {web link}
    While you are in safe mode;
    Type '''about:preferences'''<Enter> in the address bar
    Select '''Advanced > General.'''
    Look for and turn off '''Use Hardware Acceleration'''.
    Poke around safe web sites. Are there any problems?
    Then restart.

  • How to control system volume by moving mouse up and down using java

    hi,
    please give me suggestion that how to control the system volume by moving mouse up and down in java..
    thanks,
    prabhu selvakumar.

    Prabhu_Selvakumar wrote:
    Thank u for ur reply... i dont know wat is JNI interface... i have to read about that.... Unless you're a whiz-bang C/C++ coder, using this won't be easy or pretty. For my money, if I wanted to create a program that interacted closely with a specific OS, I'd use a more OS-specific programming language such as C# if I'm coding for Windoz.

  • Urgent !- Drop down the list without using mouse and ALT+DOWN

    I'm working in Oracle Forms 10g. Is there any way I can drop down the list, the moment the list gets focused, without using the mouse and ALT+DOWN?
    Kindly let me know if you have a solution for this. Thanks in advance.

    Dear Uma Maheswari,
    You can use also the arrow keys to drop down the lists, but I don't think once you have the focus, you can drop down the list. If you get any solution to this kindly let me know.
    Regards.
    Senthil .A. Perumal.

  • How can you set a wired mouse to scroll down?

    My mouse is set to scroll horizontaly and vertically but it will only scroll up on a page, not down.  Is there any way I could fix this so my mouse can scroll down as well?

    A mouse that will scroll down but not up typically has a mouse ball with junk in it.
    To clean, turn upside-down and roll around on a rough-ish piece of clean white paper such as copy paper.

  • At times Mouse Layer shifts  down

    At times Mouse Layer shifts down, while previewing the file.
    Eg: We generally put the mouse layer on top of the caption
    while creating, but in few slides after publishing and viewing the
    mouse layer is seen below caption box.
    When source file is checked this time, the mouse layer is
    seen down.
    Please let me know the reason and solution for the same.

    MacKeeper is highly invasive malware that can de-stablize your operating system. It is also unethically marketed and a rip-off.
    Further opinion on it and how to uninstall MacKeeper malware:
    http://applehelpwriter.com/2011/09/21/how-to-uninstall-mackeeper-malware/
    This is also worth reading:
    http://www.reedcorner.net/news.php/?p=245
    It sounds like a faulty power unit. You need to get it professionally checked.

  • Safari won't let me left click mouse and scroll down page

    Safari won't let me left click on the mouse and scroll down the page, which I can do in Internet Explorer. That means I have to manually click on the scroll bar on the right side of the website.

    Hopefully it's a cache issue not your Magic Mouse.
    Quit Safari.
    Go to ~/Library/Caches/com.apple.Safari
    Move the Cache.db file from the com.apple.Safari folder to the Trash.
    Relaunch Safari.
    This seems to be a "feature" of Safari
    No.. it's not.

  • HT1338 When I connect my Macbook Pro to my Dell DLP projector, either via cable or wirelessly, I just see a dark screen with the mouse and mouse trails only, can any one help?

    When I connect my Macbook Pro to my Dell DLP projector, either via cable or wirelessly, I just see a dark screen with the mouse and mouse trails only, can any one help?

    jpmarkques post is a good start point, after folling his directions, you can try detect displays. Also try different rsolution and refresh rates.
    Most of the projectors I have used support a 1024X768 res.
    Youcan also try a pram reset if it still does not detect.
    Leave theproctor connected and powered up, power down the MBP.
    Power back up the MBP and hold the following keys before you hear the start up chime:
    Option, command, P,R (no commas) continue to hold these keys till you hear the start up chime 2 times.

  • Mouse Drag in JDialog produces Mouse Enter & Mouse Exit events in JFrame.

    Hi, all.
    Do I have a misconception here? When I drag the mouse in a modal JDialog, mouseEntered and mouseExited events are being delivered to JComponents in the parent JFrame that currently happens to be beneath that JDialog. I would not have expected any events to be delivered to any component not in the modal JDialog while that JDialog is displayed.
    I submitted this as a bug many months ago, and have heard nothing back from Sun, nor can I find anything similar to this in BugTraq.
    Here is sample code:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * This class demonstrates what I believe are TWO bugs in Mouse Event handling in Swing
    * 1.1.3_1, 1.1.3_2, 1.1.3_3, and 1.4.0.
    * 1) When a MODAL JDialog is being displayed, and the cursor is DRAGGED from the JDialog
    *    into and across the parent JFrame, Mouse Enter and Mouse Exit events are given to
    *    the parent JFrame and/or it's child components.  It is my belief that NO such events
    *    should be delivered, that modal dialogs should prevent ANY user interaction with any
    *    component NOT in the JDialog.  Am I crazy?
    *    You can reproduce this simply by running the main() method, then dragging the cursor
    *    from the JDialog into and across the JFrame.
    * 2) When a MODAL JDialog is being displayed, and the cursor is DRAGGED across the JDialog,
    *    Mouse Enter and Mouse Exit events are given to the parent JFrame and/or it's child
    *    components.  This is in addition to the problem described above.
    *    You can reproduce this by dismissing the initial JDialog displayed when the main()
    *    method starts up, clicking on the "Perform Action" button in the JFrame, then dragging
    *    the cursor around the displayed JDialog.
    * The Mouse Enter and Mouse Exit events are reported via System.err.
    public class DragTest
        extends JFrame
        public static void main(final String[] p_args)
            new DragTest();
        public DragTest()
            super("JFrame");
            WindowListener l_windowListener = new WindowAdapter() {
                public void windowClosing(final WindowEvent p_evt)
                    DragTest.this.dispose();
                public void windowClosed(final WindowEvent p_evt)
                    System.exit(0);
            MouseListener l_mouseListener = new MouseAdapter() {
                public void mouseEntered(final MouseEvent p_evt)
                    System.err.println(">>> Mouse Entered: " + ((Component)p_evt.getSource()).getName() );
                public void mouseExited(final MouseEvent p_evt)
                    System.err.println(">>> Mouse Exited: " + ((Component)p_evt.getSource()).getName() );
            JPanel l_panel1 = new JPanel();
            l_panel1.setLayout( new BorderLayout(50,50) );
            l_panel1.setName("JFrame Panel");
            l_panel1.addMouseListener(l_mouseListener);
            JButton l_button = null;
            l_button = new JButton("JFrame North Button");
            l_button.setName(l_button.getText());
            l_button.addMouseListener(l_mouseListener);
            l_panel1.add(l_button, BorderLayout.NORTH);
            l_button = new JButton("JFrame South Button");
            l_button.setName(l_button.getText());
            l_button.addMouseListener(l_mouseListener);
            l_panel1.add(l_button, BorderLayout.SOUTH);
            l_button = new JButton("JFrame East Button");
            l_button.setName(l_button.getText());
            l_button.addMouseListener(l_mouseListener);
            l_panel1.add(l_button, BorderLayout.EAST);
            l_button = new JButton("JFrame West Button");
            l_button.setName(l_button.getText());
            l_button.addMouseListener(l_mouseListener);
            l_panel1.add(l_button, BorderLayout.WEST);
            l_button = new JButton("JFrame Center Button");
            l_button.setName(l_button.getText());
            l_button.addMouseListener(l_mouseListener);
            l_panel1.add(l_button, BorderLayout.CENTER);
            JButton l_actionButton = l_button;
            Container l_contentPane = this.getContentPane();
            l_contentPane.setLayout( new BorderLayout() );
            l_contentPane.add(l_panel1, BorderLayout.NORTH);
            JPanel l_panel2 = new JPanel();
            l_panel2.setName("JDialog Panel");
            l_panel2.addMouseListener(l_mouseListener);
            l_panel2.setLayout( new BorderLayout(50,50) );
            l_panel2.add( new JButton("JDialog North Button"),  BorderLayout.NORTH  );
            l_panel2.add( new JButton("JDialog South Button"),  BorderLayout.SOUTH  );
            l_panel2.add( new JButton("JDialog East Button"),   BorderLayout.EAST   );
            l_panel2.add( new JButton("JDialog West Button"),   BorderLayout.WEST   );
            l_panel2.add( new JButton("JDialog Center Button"), BorderLayout.CENTER );
            final JDialog l_dialog = new JDialog(this, "JDialog", true);
            WindowListener l_windowListener2 = new WindowAdapter() {
                public void windowClosing(WindowEvent p_evt)
                    l_dialog.dispose();
            l_dialog.addWindowListener(l_windowListener2);
            l_dialog.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
            l_dialog.getContentPane().add(l_panel2, BorderLayout.CENTER);
            l_dialog.pack();
            Action l_action = new AbstractAction() {
                { putValue(Action.NAME, "Perform Action (open dialog)"); }
                public void actionPerformed(final ActionEvent p_evt)
                    l_dialog.setVisible(true);
            l_actionButton.setAction(l_action);
            this.addWindowListener(l_windowListener);
            this.pack();
            this.setLocation(100,100);
            this.setVisible(true);
            l_dialog.setVisible(true);
    }(Too bad blank lines are stripped, eh?)
    Thanks in advance for any insights you may be able to provide.
    ---Mark

    I guess we can think of this as one problem. When mouse dragged, JFrame also (Parent) receives events. If i understood correctly, what happens here is, Modal dialog creates its own event pump and Frame will be having its own. See the source code of Dialog's show() method. It uses an interface called Conditional to determine whether to block the events or yield it to parent pump.
    Here is the Conditional code and show method code from java.awt.dialog for reference
    package java.awt;
    * Conditional is used by the EventDispatchThread's message pumps to
    * determine if a given pump should continue to run, or should instead exit
    * and yield control to the parent pump.
    * @version 1.3 02/02/00
    * @author David Mendenhall
    interface Conditional {
        boolean evaluate();
    /////show method
        public void show() {
            if (!isModal()) {
                conditionalShow();
            } else {
                // Set this variable before calling conditionalShow(). That
                // way, if the Dialog is hidden right after being shown, we
                // won't mistakenly block this thread.
                keepBlocking = true;
                if (conditionalShow()) {
                    // We have two mechanisms for blocking: 1. If we're on the
                    // EventDispatchThread, start a new event pump. 2. If we're
                    // on any other thread, call wait() on the treelock.
                    if (Toolkit.getEventQueue().isDispatchThread()) {
                        EventDispatchThread dispatchThread =
                            (EventDispatchThread)Thread.currentThread();
                           * pump events, filter out input events for
                           * component not belong to our modal dialog.
                           * we already disabled other components in native code
                           * but because the event is posted from a different
                           * thread so it's possible that there are some events
                           * for other component already posted in the queue
                           * before we decide do modal show. 
                        dispatchThread.pumpEventsForHierarchy(new Conditional() {
                            public boolean evaluate() {
                                return keepBlocking && windowClosingException == null;
                        }, this);
                    } else {
                        synchronized (getTreeLock()) {
                            while (keepBlocking && windowClosingException == null) {
                                try {
                                    getTreeLock().wait();
                                } catch (InterruptedException e) {
                                    break;
                    if (windowClosingException != null) {
                        windowClosingException.fillInStackTrace();
                        throw windowClosingException;
        }I didn't get exactly what is happening but this may help to think further

Maybe you are looking for