My first assumption was that we can get rid of the peer parameter at all
(like you did in DropTarget.java), however this doesn't seem possible
regardless of JFX/interop (AFAICS).
On 18/03/15 19:23, Sergey Bylokhov wrote:
Hi, Anton.
The problem is that this method is called when the peer itself change
the information in the DropTargetContext. So this method works like a
setter.
Right.
I can make this method private, and get an access to it via accessor.
Will it be better?
I'm ok with leaving it as is...
All the rest looks fine to me wrt JFX/interop.
Thanks,
Anton.
18.03.15 8:27, Anton V. Tarasov wrote:
Hi Sergey,
The only dependency on JFX/interop is this method in
DropTargetContext.java:
98 public void addNotify(final Object dtcp) throws
IllegalArgumentException {
Was that the reason why you left the parameter?
Is it technically possible to retrieve the peer via the
ComponentAccessor.getPeer(component) method where the component is
dropTarget.getComponent()?
Thanks,
Anton.
On 16.03.2015 21:30, Sergey Bylokhov wrote:
Hello.
Please review the fix for jdk 9.
There are a number of public API which reference the unsupported
java.awt. dnd.peer interfaces.
protected
java.awt.dnd.DragSource.createDragSourceContext(java.awt.dnd.peer.DragSourceContextPeer,
...)
public
java.awt.dnd.DragSourceContext(java.awt.dnd.peer.DragSourceContextPeer,
...) constructor
public java.awt.dnd.DropTarget.addNotify(ComponentPeer peer) and
removeNotify(ComponentPeer peer)
public
java.awt.dnd.DropTargetContext.addNotify(DropTargetContextPeer dtcp)
There is a decision to remove these references as described:
http://mail.openjdk.java.net/pipermail/awt-dev/2015-February/008924.html
Changes description:
* DragSource.java, DragSourceContext.java, DropTarget.java : In
all of these methods the peers are used as a parameters. In most
of the cases these parameters are not necessary, because the
peer can be accessed using the reference to the shared
object(Component/DropTarget etc). Since these methods can be
useful I did not remove them, but remove one parameter only.
* DropTargetContext.java: addNotify() is called when we cannot get
the information about a peer so I change type of the parameter
and documentation of the method. It seems that these methods
DropTargetContext.addNotify/removeNotify are not useful and I
can change them by private version, but I don't know which way
will be better.
Bug: https://bugs.openjdk.java.net/browse/JDK-8074763
Webrev can be found at:
http://cr.openjdk.java.net/~serb/8074763/webrev.01
--
Best regards, Sergey.
--
Best regards, Sergey.