<AWT Dev> Identify SunDropTargetEvent without instanceof and getClass()
sergey.bylokhov at oracle.com
Mon Jul 3 18:39:40 UTC 2017
Thank you for the report.
Can you please create a CR via http://bugs.java.com/?
----- reto.merz at abacus.ch wrote:
> Is there a nice way to identify AWTEvent as a SunDropTargetEvent?
> Otherwise would it be possible to introduce a new public "boolean
> isDropTargetEvent()" method on MouseEvent or AWTEvent?
> Or a public static method "boolean isDropTargetEvent(AWTEvent)"
> At the moment we do this:
> We prefer this over instanceof because of the sun import and java 9.
> Also AWT uses "instanceof SunDropTargetEvent" in several places (eg:
> Component, EventQueue and LightweightDispatcher) to identify
> We need to this for similar reasons like AWT itself, our custom
> EventQueue implementation needs to identify such events and handle it
> in a different way.
More information about the awt-dev