< prev index next >
modules/graphics/src/main/java/com/sun/javafx/scene/input/DragboardHelper.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 23,32 ****
--- 23,33 ----
* questions.
*/
package com.sun.javafx.scene.input;
+ import com.sun.javafx.tk.TKClipboard;
import javafx.scene.input.Dragboard;
/**
* Used to access internal methods of Dragboard.
*/
*** 43,62 ****
--- 44,73 ----
public static void setDataAccessRestriction(Dragboard dragboard,
boolean restricted) {
dragboardAccessor.setDataAccessRestriction(dragboard, restricted);
}
+ public static TKClipboard getPeer(Dragboard dragboard) {
+ return dragboardAccessor.getPeer(dragboard);
+ }
+
+ public static Dragboard createDragboard(TKClipboard peer) {
+ return dragboardAccessor.createDragboard(peer);
+ }
+
public static void setDragboardAccessor(final DragboardAccessor newAccessor) {
if (dragboardAccessor != null) {
throw new IllegalStateException();
}
dragboardAccessor = newAccessor;
}
public interface DragboardAccessor {
void setDataAccessRestriction(Dragboard dragboard, boolean restricted);
+ TKClipboard getPeer(Dragboard dragboard);
+ Dragboard createDragboard(TKClipboard peer);
}
private static void forceInit(final Class<?> classToInit) {
try {
Class.forName(classToInit.getName(), true,
< prev index next >