/** Enables/disables dropping support. * @param state true means drops into view are allowed, * false forbids any drops into this view. */ public void setDropTarget (boolean state) { // create drop support if needed if (dropActive && (dropSupport == null)) dropSupport = new TreeViewDropSupport(this, tree, dropTargetPopupAllowed); // activate / deactivate support according to the state dropActive = state; if (dropSupport != null) { dropSupport.activate(dropActive); } }
/** Enables/disables dropping support. * @param state true means drops into view are allowed, * false forbids any drops into this view. */ public void setDropTarget (boolean state) { // create drop support if needed if (dropActive && (dropSupport == null)) dropSupport = new TreeViewDropSupport(this, tree, dropTargetPopupAllowed); // activate / deactivate support according to the state dropActive = state; if (dropSupport != null) { dropSupport.activate(dropActive); } }
/** Enables/disables dropping support. * @param state true means drops into view are allowed, * false forbids any drops into this view. */ public void setDropTarget(boolean state) { // create drop support if needed if (dropActive && (dropSupport == null)) { dropSupport = new TreeViewDropSupport(this, tree, dropTargetPopupAllowed); } // activate / deactivate support according to the state dropActive = state; if (dropSupport != null && !GraphicsEnvironment.isHeadless()) { dropSupport.activate(dropActive); } }