Mouse input/output events

Hello

I have a question about mouse input/output events. Specifically, I would like to know why so many mouse entry/exit events are generated. Suppose that you stack several components like this:

@Override
public void start(Stage frame) throws Exception {
     Pane root = new Pane();
     frame.setScene(new Scene(root));
     addEnterExitHandlers(root, "root");

     Pane fst = new Pane();
     root.getChildren().add(fst);
     addEnterExitHandlers(fst, "first");

     Pane snd = new Pane();
     fst.getChildren().add(snd);
     addEnterExitHandlers(snd, "second");

     Rectangle rect = new Rectangle(0, 0, 100, 100);
     snd.getChildren().add(rect);
     addEnterExitHandlers(rect, "rect");

     frame.show();
}

The addEnterExitHandlers() method just registers handlers for MouseEvent.MOUSE_ENTERED_TARGET and MouseEvent.MOUSE_EXITED_TARGET which print the name of the type of the event with the specified string.

The result looks like this:

root MOUSE_ENTERED

first MOUSE_ENTERED
root MOUSE_ENTERED_TARGET

second MOUSE_ENTERED
first MOUSE_ENTERED_TARGET
root MOUSE_ENTERED_TARGET

rect MOUSE_ENTERED
second MOUSE_ENTERED_TARGET
first MOUSE_ENTERED_TARGET
root MOUSE_ENTERED_TARGET

root MOUSE_EXITED

first MOUSE_EXITED
root MOUSE_EXITED_TARGET

second MOUSE_EXITED
first MOUSE_EXITED_TARGET
root MOUSE_EXITED_TARGET

rect MOUSE_EXITED
second MOUSE_EXITED_TARGET
first MOUSE_EXITED_TARGET
root MOUSE_EXITED_TARGET

This output is not correct, because I inserted blank lines to visually group related items.

As you can see, a MOUSE_ENTERED event is fired for each node and all nodes parents receive MOUSE_ENTER_TARGET events. I just thought that it would be sufficient to take only the last group of input/output events, respectively, that is to say:

rect MOUSE_ENTERED
second MOUSE_ENTERED_TARGET
first MOUSE_ENTERED_TARGET
root MOUSE_ENTERED_TARGET

rect MOUSE_EXITED
second MOUSE_EXITED_TARGET
first MOUSE_EXITED_TARGET
root MOUSE_EXITED_TARGET

Is there a particular reason the behavior?

Best regards
Matthias

Hi Matthias,

Yes, there is a reason for that. In the vast majority of use cases, entry/out handlers are added on a node to handle the case where the mouse arrives / leaves the node. _TARGET variants will tell you "this node or some of his children was input/out", which is not quite there. Now, if you want to check that TSF has been entered, you just do:

fst.setOnMouseEntered(new EventHandler() {
  @Override public void handle(MouseEvent e) {
    // your code
  }
});

If we have generated only the last group of events, as you suggest, you'd have to do:

fst.addEventHandler(MouseEvent.MOUSE_ENTERED_TARGET, new EventHandler() {
  @Override public void handle(MouseEvent e) {
    if (e.getTarget() == fst) {
      // your code
    }
  }
});

Even if we added convenience for the _TARGET (setOnMouseEnteredTarget) variants management, having to always check the target would be pretty boring.

See you soon,.

Pavel

Tags: Java

Similar Questions

  • Using text input/output of Captivate Exhange

    I have used Captivate for the basics, but I'm looking to do more. I downloaded the Text Input/Output of Captivate Exchange files, but I can't find any instructions on how to apply. The idea is that you would be able to "capture an entry on a slide and post it on blades later.» The zipped download contains four files:

    textInput.fla
    textInput.swf
    textOutput.fla
    textOutput.swf

    My question is how to bring these to a piece of Captivate and use?

    Here is the link to download the files:

    http://www.Adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_US&EXTID=1253 021

    I just realized that the instructions are also on this page...

  • mouse on 'flash' event Shimmers in Firefox 8 but have IE

    On some web pages such as Google Analytics, the image flickers for an Adobe Flash mouse over the event. This happens in Firefox 7 and 8, but does not occur in Internet Explorer. On some other web pages with Flash video, the screen seem to do the opposite of the expected flash response. For example, the line of time because the video appears when the mouse is over the time line, but will disappear when the cursor is placed on the time line... which makes it impossible to fast-forward or select different positions on the time line.

    Windows 7
    ATI Radeon HD 4250

    I think that the problem is solved. I disabled Windows Aero and all the Flash mouse related events now seem to work fine.

  • Portege 3490CT - inputs/outputs

    I have a problem caused by drivers being removed from the machine according to me. I can't input/output using the external remote diskette, CD Rom, or USB port.

    How can I install new drivers without internet access?

    Hi Thom,

    If you have isolated your notebook all your i/o devices, your only way to restore access will restore your full operating system of your recovery disks.

    However, before I do something drastic, that you can try to start in safe mode to see if this will allow you to access your external devices, or you can try to restore your system to a previous restore point (assuming you are using XP) before your drivers has been removed.

    HTH

  • Focusrite scarlett 2i4 unable to use as audio input/output device

    I just bought a Scarlett 2i4 hoping that time would have been solved compatibility problems. However, I'm unable to use it as an input/output device. Site Web Focus rite has a class compatible mode download that is supposed to solve this problem. And I installed it three times without success. Has anyone else had this problem and found a workaround. Thank you! I have a macbook pro mid 2012, el capitan 10.11.3.

    Don't know if this will help.

    I have a 2i2. When I got it, a few BONES in there, I couldn't make it work. I went back and forth with tech support Scarlett. They really tried, even sent several beta drivers. Nothing works.

    Then I uninstalled all the software of Scarlett and restarted - and it works.

  • How to upgrade output during input/output synchronized?

    Hello

    We use an input/output series card m PCI-6289 to provide participants sound while recording the EEG.

    Our inputs and outputs are synchronized using the diagram that is attached.

    To date our output audio segments have been relatively short. However, now we want to output sounds which last a long time. I've run into shortages of memory by using the current diagram.

    Could someone suggest how I could update the audio output, regularly with pieces short 1 sec, in the loop in the diagram attached?

    I tried to move the DAQmx Write.vi (point 4 on the diagram) inside the loop, but the output signal was not correct.

    Thank you very much for your advice!

    Frenk

    Hi Frenk,

    Can you be more specific about the error that you are experiencing?

    Have you heard of the regeneration of analog output? It can be used with a property DAQmx writing node.

    Regeneration is the repetition of the data already in the buffer. Standard regeneration is when the PC buffer data are continually downloaded on the FIFO to write. If the data buffer is smaller than the size of the FIFO, it is copied as many times as possible in the FIFO before the start of the generation. This is done to reduce the risk of errors of bandwidth by transferring is not the new data down to the FIFO fairly quickly. Once started, the generation of the copies of the data are no longer manufactured to fill the buffer. New data can be written in the buffer of PC at any time without interrupting the output.

    You can also use the FIFO regeneration. With regeneration of the FIFO, the entire buffer is downloaded on the FIFO and regenerated from there. Once the data is uploaded, new data cannot be written to the FIFO. To use the FIFO regeneration, the whole buffer must fit within the size of the FIFO. The advantage of using the FIFO regeneration is that it requires no communication with memory primary host after the operation started, thus avoiding any problems that arise due to the excessive movement of buses.

    Take a look at this link which travels with the regeneration: http://www.ni.com/product-documentation/3874/en/

  • Lack of analog input/output range

    Hello!

    I LV 8.6 installed on my PC with XP OS and my card is 6024E. I noticed that the analog input/output palette is not appearing or missing. I tried searching but no luck. NOR-Daq traditional 7.4.4 currently installed.

    Try reinstalling the device driver CD/DVD and make sure you have selected traditional DAQ.

    Say you you installed NOR-DAQ 7.4.4.  But if it was made before you install LabVIEW, LabVIEW and then see.

  • OR 9403: Digital Input/Output slows timed loop?

    Hi all

    I use a loop timed sample of 7 current channels (NI 9023), 3-channel (NI 9025) voltage at 1000 Hz in scan mode and it works fine. However, when I add for 8 output channels of the input/output module digital module NI 9403 for timed loop, CAPAS sampling cannot exceed 1000 Hz. According with time stamp data I wroten in file, it seems that I have in all ten milliseconds, I missed a miliseconds.

    I would like to ask is there a reason for this? The digital I/o module affect the timed loop?

    Thank you much in advance.

    I'm not familiar with the FPGA code, so I can't comment there.  However, I noticed that you call writing to text file twice in the timed loop.  Can you only collect data and then write the files after the time loop?  This would save a lot of time.  For each entry, the program needs to access the hard disk, find the end of the file, add him and return to write on the hard drive.  A lot of your time, especially since the files are getting bigger.

  • Configuration of the inputs/outputs of NI9401 in labview FPGA

    Hello

    I am very new to Labview FPGA. In fact, I'm implementing the very first example introduced by OR for learning Labview FPGA. I need to connect an entry of a NI9401 on one exit from the other.

    However, when I drag and drop the input/output units, the two act as inputs:

    I also changed the propties one of the NI9401 to act as output. But the problem persists.

    It is the example that I am building.

    I'd appreciate any suggestions.

    https://www.YouTube.com/watch?v=mv112V-P030&index=1&list=PLbCk9hRe-ziECXQjE--fN29C_kcx7CHnA

    Right-click on the output node, and then select "change to write."

  • Mathematical functions with input/output error

    Please refer to the attached picture. Where do you find these mathematical functions with input/output error? I saw these in response to a message.

    I think they appear when you connect a waveform or dynamic data type.  Since I rarely use these data types (just give the table!), I'm not positive.

    Lynn

  • Mouse down? Event rejection does not

    Dear community,

    Please could you help me to work the reasons why the mouse down? Event is not be thrown in the following code. I deleted all but the relevant controls. It must be that clicking a control with the left middle of the mouse or buttons right mouse returns the name and the control key, it has been activated with (which it does), but NOT when the Boolean lock is True.

    However, he seems to ignore the value of the Boolean lock?

    Please help me understand what I did wrong here.

    Many thanks in advance,

    R Gibbs

    In the event of filter actions are performed without worrying.  If you add another case of "Change value" or "Mouse Down" for all these buttons, it will not be triggered when the lock is set to TRUE.

  • How to start the view off of the ref cursor Oracle as input/output param

    Hello world

    We use JDev 11.1.2.3 WL 10.3.6 and Java 7.

    We are at the beginning of our transition from Oracle Forms to ADF.  We have a very large forms that uses many store procedures that have IN/OUT ref Cursor parameters and tables plsql.  I tried to find information on best practices to achieve, but only seemed to find tutorials on SEO of the Oracle ref Cursor return functions.  I hope we don't have to rewrite our code of database to work with ADF.

    This is an example of a proc currently a block on a form based on directly

    The ref cursor parameter is input/output to satisfy the way the form handles this type of paradigm.

    ADF we want I hope to reuse these procs existing (without the need to wrap/overload them) on the basis of the display objects.

    Example:

    / * my record type which houses the information I want to go back * /.

    TYPE rec_hist_vacpac_status IS RECORD)

    rec_order NUMBER (5),

    rec_rownum NUMBER (5),

    return_column SAM_VACPAC.vacpac_status%TYPE,

    rec_login_id SAM_VACPAC.ins_user%TYPE,

    status_date SAM_VACPAC.status_date%TYPE

    );

    / * Sets the ref cursor type * /.

    TYPE lcur_hist_vacpac_status IS REF CURSOR;

    / * This is a procedure that would take some info link go / return

    Return the ref cursor of this information as an in / out * /.

    PROCEDURE prc_myinfo_refcur)

    pnum_identify_seq_id in NUMBERS

    pcur_myinfo IN OUT lcur_hist_vacpac_status);

    Can anyone point me in the right direction on documentation on this?

    Thank you!

    Hi Cemerson:

    See this example:

    1. 1. create a TYPE as an object

    CREATE OR REPLACE

    TYPE GOTYOB_EQUI

    AS AN OBJECT

    (

    CDELEM VARCHAR2 (50).

    TIELEM VARCHAR2 (2)

    );

    1. 2. create a TABLE TYPE AS

    CREATE OR REPLACE

    TYPE GOTYTA_EQUI

    AS THE GOTYOB_EQUI TABLE;

    1. 3 create a function, it returns the TYPE of the TABLE

    FUNCTION fn_equiposarriba)

    pa_cdelem IN VARCHAR2,

    pa_nucomp in NUMBERS

    pa_anperi in NUMBERS

    pa_meperi in NUMBERS

    )

    Gotyta_equi RETURN PIPELINED IS

    CURSOR trae_equimani (va_cdelem VARCHAR2) IS

    SELECT cdelem, tielem, cdelempadr,

    (SELECT cdequi

    Of evm_alim

    WHERE anperi = eq.anperi

    AND meperi = eq.meperi

    AND nucomp = eq.nucomp

    AND cdalim = eq.cdalim) cdalim

    Of evm_equimani eq

    WHERE anperi = pa_anperi

    AND meperi = pa_meperi

    AND nucomp = pa_nucomp

    AND cdelem = va_cdelem

    AND cdelempadr <> cdelem

    AND tielem <> 'A ';

    equimani trae_equimani % ROWTYPE;

    va_cdalim VARCHAR2 (100);

    BEGIN

    -Loading los equipos aguas arriba

    WHILE equimani.cdelempadr IS NOT NULL LOOP

    OPEN trae_equimani (equimani.cdelempadr);

    equimani: = NULL;

    SEEK trae_equimani INTO equimani;

    CLOSE Trae_equimani;

    IF equimani.cdelem IS NOT NULL THEN

    PIPE ROW (gotyob_equi (equimani.cdelem, equimani.tielem));

    END IF;

    END LOOP;

    RETURN;

    END;

    1. 4 SQL Query with the help of the function... you can use this SQL in a display object

    SELECT

    *

    Of

    TABLE (gopq_eventos.fn_equiposarriba (' F-SCZ-043-103', '))

    1,

    2013,

    6

    )

    )

    Best regards, Marcelo

  • Error input/output of the VMFS5 local data store

    Hello

    I have 3 locally on the hard drive on my server from IBM. 1 250 GB drive, I used to create the data store Linux (datastore1) and other 2 disks that I created the Windows data store (datastore2)

    Couple of VMS is deployed on the two databases. Over the weekend, suddenly vms Windows Data Store (datastore2) went down. When I checked Monday concluded that data store is visible to ESXi host but I am unable to navigate to virtual machines.

    If I Directory VM cd I get below error:

    ~ # cd/vmfs/volumes/Windows\ Data\ store/Win - 2 k 8-2.

    SH: getcwd: input/output error

    # (unknown)

    ~ # esxcfg - scsidevs - l

    MPX.vmhba32:C0:t0:l0

    Device type: Direct access

    Size: MB 1911

    Full name: USB Direct-access Local (mpx.vmhba32:C0:T0:L0)

    Multichannel plugin: NMP

    Device console: /vmfs/devices/disks/mpx.vmhba32:C0:T0:L0

    Devfs Path: /vmfs/devices/disks/mpx.vmhba32:C0:T0:L0

    Seller: SMART model: USB - IBM Revis: 0000

    : SCSI 2 is Pseudo: false status: on

    : RDM Capable false is removable: true

    Is Local: true is SSD: false

    Other names:

    VML.0000000000766d68626133323a303a30

    VAAI status: unsupported

    MPX.vmhba33:C0:t0:l0

    Device type: CD-ROM

    Size: 0 MB

    Full name: Local USB CD-ROM (mpx.vmhba33:C0:T0:L0)

    Multichannel plugin: NMP

    Device console: /vmfs/devices/cdrom/mpx.vmhba33:C0:T0:L0

    Devfs Path: /vmfs/devices/cdrom/mpx.vmhba33:C0:T0:L0

    Seller: KVM model: vmDisk-CD live again: 0.01

    : SCSI 2 is Pseudo: false status: on

    : RDM Capable false is removable: true

    Is Local: true is SSD: false

    Other names:

    VML.0005000000766d68626133333a303a30

    VAAI status: unsupported

    NAA.5000c500478aee93

    Device type: Direct access

    Size: 286102 MB

    Full name: IBM-ESXS Serial Attached SCSI disk (naa.5000c500478aee93)

    Multichannel plugin: NMP

    Device console: /vmfs/devices/disks/naa.5000c500478aee93

    Devfs Path: /vmfs/devices/disks/naa.5000c500478aee93

    Seller: IBM-ESXS model: ST9300605SS Revis: B556

    SCSI level: 6 is Pseudo: false status: gradient

    RDM Capable is: true is removable: false

    Is Local: the SSD of is wrong: false

    Other names:

    VML.02000000005000c500478aee93535439333030

    VAAI status: unknown

    NAA.5000c500478b8d3b

    Device type: Direct access

    Size: 286102 MB

    Full name: IBM-ESXS Serial Attached SCSI disk (naa.5000c500478b8d3b)

    Multichannel plugin: NMP

    Device console: /vmfs/devices/disks/naa.5000c500478b8d3b

    Devfs Path: /vmfs/devices/disks/naa.5000c500478b8d3b

    Seller: IBM-ESXS model: ST9300605SS Revis: B556

    SCSI level: 6 is Pseudo: false status: gradient

    RDM Capable is: true is removable: false

    Is Local: the SSD of is wrong: false

    Other names:

    VML.02000000005000c500478b8d3b535439333030

    VAAI status: unknown

    NAA.5000c500478d724f

    Device type: Direct access

    Size: 286102 MB

    Full name: IBM-ESXS Serial Attached SCSI disk (naa.5000c500478d724f)

    Multichannel plugin: NMP

    Device console: /vmfs/devices/disks/naa.5000c500478d724f

    Devfs Path: /vmfs/devices/disks/naa.5000c500478d724f

    Seller: IBM-ESXS model: ST9300605SS Revis: B556

    SCSI level: 6 is Pseudo: false status: gradient

    RDM Capable is: true is removable: false

    Is Local: the SSD of is wrong: false

    Other names:

    VML.02000000005000c500478d724f535439333030

    VAAI status: unknown

    ~ # esxcfg - scsidevs - m

    NAA.5000c500478d724f:1 /vmfs/devices/disks/naa.5000c500478d724f:1 4f83af28-52abeaf2-6475-5cf3fcba46f2 0 Linux Data Store

    NAA.5000c500478b8d3b:3 /vmfs/devices/disks/naa.5000c500478b8d3b:3 4f7cfc39-4d17993a-a08c-5cf3fcba46f2 0 Windows Data Store

    Data store of Windows NAA.5000c500478aee93:1 /vmfs/devices/disks/naa.5000c500478aee93:1 4f7cfc39-4d17993a-a08c-5cf3fcba46f2 1

    Here is the output of dmesg: I suspect to be a hard drive problem

    (2014 06-16 T 10: 46:25.385Z cpu5:382346) WARNING: UserObj: 675: could not crossdup fd 8, / dev/ptyp0 CHAR type: busy

    (2014 06-16 T 10: 46:25.385Z cpu5:382346) WARNING: UserObj: 675: could not crossdup fd 10, / dev/ptyp0 CHAR type: busy

    (2014 06-16 T 10: 46:25.385Z cpu2:382348) WARNING: UserLinux: 1340: unsupported: (void)

    (2014 06-16 T 10: 46:52.510Z cpu16:4112) NMP: nmp_ThrottleLogForDevice:2318: Cmd 0 x 28 (0x412440db9c40) to dev 'naa.5000c500478b8d3b' on the way 'vmhba2:C0:T0:L0' failed: H:0 x D:0 x 2 P:0 valid 0 x 0 sense-data: 0x4 0x32 0x0. Bill: NO

    (2014 06-16 T 10: 46:52.510Z cpu16:4112) ScsiDeviceIO: 2316: Cmd (0x412440db9c40) 0 x 28, CmdSN 0x2a to dev 'naa.5000c500478b8d3b' has no sense H:0 x D:0 x 2 P:0 valid 0 x 0-data: 0 x 4 0 32 x 0 x 0.

    (2014 06-16 T 10: 47:34.631Z cpu18:4114) NMP: nmp_ThrottleLogForDevice:2318: Cmd 0 x 28 (0 x 412441635000) to dev 'naa.5000c500478b8d3b' on the way 'vmhba2:C0:T0:L0' failed: H:0 x D:0 x 2 P:0 valid 0 x 0 sense-data: 0x4 0x32 0x0. Bill: NO

    (2014 06-16 T 10: 47:34.631Z cpu18:4114) ScsiDeviceIO: 2316: Cmd (0 x 412441635000) 0 x 28, CmdSN 0x1c to dev 'naa.5000c500478b8d3b' has no sense H:0 x D:0 x 2 P:0 valid 0 x 0-data: 0 x 4 0 32 x 0 x 0.

    (2014 06-16 T 10: 47:41.476Z cpu18:4114) ScsiDeviceIO: 2316: Cmd (0x412440da3500) 0 x 28, CmdSN 0 x 21-dev 'naa.5000c500478b8d3b' has no sense H:0 x D:0 x 2 P:0 valid 0 x 0-data: 0 x 4 0 32 x 0 x 0.

    Please guide me to solve this problem. Thank you all in advance

    /virtu4

    This problem is solved.

    Thanks to the communities for not responding, that made me to fix this myself

    /virt4

  • Can I use first for HD (3D) for video edtiting on the Surface pro 3 (i7 8 GB)? (in m2ts input/output)

    Can I use Premiere Elements for (3D) HD video editing on the SURFACE PRO 3 (i7 8 GB) in m2ts (input/output)?

    Elements does not support 3D, and I doubt that it is running correctly on a Surface.

  • Ghetto VCB / Input/output error (327689)

    Hi all!

    I set up the ghetto of VCB backup script to our ESXi 3.5 servers.

    The way backup target is a Starwind iSCSI connected as a data store. With the data browser I can create and delete its file without problem.

    but when I try to run the script he replys error:

    Impossible to clone the drive: input/output error (327689)

    I have no idea what this could be. A google search gave me an indication which is something with vkmfs tools.

    But the really Wired is the first 5 time of the backup, run smothly thrue...

    Does anyone have a hint for me how to solve this problem?

    Regars @all

    • Alex

    Please take a look at this VMware KB: http://kb.vmware.com/kb/2116375 for the reply

    =========================================================================

    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    repository scripts vGhetto

    VMware Code Central - Scripts/code samples for developers and administrators

    http://Twitter.com/lamw

    If you find this information useful, please give points to "correct" or "useful".

Maybe you are looking for

  • Question of Newby on Skype

    I can sign, but directly afterwards, I go to 'MY ACCOUNT' I don't see the home button, and the home page doesn't seem to be accessible from "MY ACCOUNT..." FAQ doesn't have the answer after almost 30 minutes to search and play... HHHHEEELLLPPP

  • HP D5460 printing problems

    I bought a D5460 and installed on an XP machine at home. Whenever the computer is turned on the printer spits out 3 pages with a single line at the top (starts as USBCU). Printer works fine after that. Moreover, it is not the default printer. Driver

  • Is responceable for Windows Vista to remove my windows mobile 6.5 driver when I sync, how can I reload the driver wireless on my HP Ipaq hx 2795

    My hand held HP Ipaq hx 2795 worked great for several days.  Now the driver for the wireless connection is gone and I can't find a waay to download a new

  • PIX PIX VPN - error log

    I created a VPN between our PIX and PIX customers but receives the following error message when I try to activate tunnnel. I checked the ACL on both ends. Any ideas? ISADB: Reaper checking HIS 0x80da9618, id_conn = 0IPSEC (sa_initiate): ACL = deny; N

  • Impossible to install norton 360 online

    Original title: cannot install norton 360 online I recently changed from windows xp to windows 7.  I have norton 360 online through my ISP, but I can not install on my computer.  I'm on dial up, so I got the new drive for windows 7, but whenever I tr