JDK-8093590 : Controls skins should not call setOnMouseXXX to add mouse handlers in skins.
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8u20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-03-19
  • Updated: 2015-06-12
  • Resolved: 2014-04-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u20Fixed
Description
The basic pattern is 
if (getSkinnable().getOnMouseXXX() == null) getSkinnable().setOnMouseXXX(handler);

It would be better to addEventHandler(handler)
Comments
I just scanned through all skin and behavior classes, and found a handful of instances of this problem. I've fixed them in the following changeset: http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/8ad840a50b6a
09-04-2014