From ec329b2b7ec5459e47fc3ea562a9c80c904515dc Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 20 Mar 2019 17:51:56 +0100 Subject: NewtCanvasJFX: Clarify [dispose() -> destroy()] operation This is automatically issued when receiving the javafx.stage.WindowEvent#WINDOW_CLOSE_REQUEST from the attached top-level JavaFX Window --- .../classes/com/jogamp/newt/javafx/NewtCanvasJFX.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/newt/classes/com') diff --git a/src/newt/classes/com/jogamp/newt/javafx/NewtCanvasJFX.java b/src/newt/classes/com/jogamp/newt/javafx/NewtCanvasJFX.java index 8da4cfdfe..4865a41d1 100644 --- a/src/newt/classes/com/jogamp/newt/javafx/NewtCanvasJFX.java +++ b/src/newt/classes/com/jogamp/newt/javafx/NewtCanvasJFX.java @@ -96,7 +96,7 @@ public class NewtCanvasJFX extends Canvas implements WindowClosingProtocol { if( DEBUG ) { System.err.println("NewtCanvasJFX.Event.DISPOSE, "+e); } - NewtCanvasJFX.this.dispose(); + NewtCanvasJFX.this.destroy(); } }; private final EventHandler windowShownListener = new EventHandler() { public final void handle(final javafx.stage.WindowEvent e) { @@ -250,7 +250,7 @@ public class NewtCanvasJFX extends Canvas implements WindowClosingProtocol { System.err.println("NewtCanvasJFX.updateParentWindowAndScreen: Scene "+s+", Window "+w+" (showing "+(null!=w?w.isShowing():0)+")"); } if( w != parentWindow ) { - disposeImpl(false); + destroyImpl(false); } parentWindow = w; if( null != w ) { @@ -266,7 +266,7 @@ public class NewtCanvasJFX extends Canvas implements WindowClosingProtocol { System.err.println("NewtCanvasJFX.updateParentWindowAndScreen: Null Scene"); } if( null != parentWindow ) { - disposeImpl(false); + destroyImpl(false); } } return false; @@ -277,16 +277,16 @@ public class NewtCanvasJFX extends Canvas implements WindowClosingProtocol { *
    *
  • Make the NEWT Child invisible
  • *
  • Disconnects the NEWT Child from this Canvas NativeWindow, reparent to NULL
  • - *
  • Issues destroy() on the NEWT Child
  • + *
  • Issues {@link Window#destroy()} on the NEWT Child
  • *
  • Remove reference to the NEWT Child
  • *
+ * JavaFX will issue this call when sending out the {@link javafx.stage.WindowEvent#WINDOW_CLOSE_REQUEST} automatically. * @see Window#destroy() */ - // FIXME JFX similar @Override - public void dispose() { - disposeImpl(true); + public void destroy() { + destroyImpl(true); } - private void disposeImpl(final boolean disposeNewtChild) { + private void destroyImpl(final boolean disposeNewtChild) { if(DEBUG) { System.err.println("NewtCanvasJFX.dispose: (has parent "+(null!=parentWindow)+", hasNative "+(null!=nativeWindow)+",\n\t"+newtChild); } -- cgit v1.2.3