diff options
author | Sven Gothel <[email protected]> | 2019-03-20 17:51:56 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-03-20 17:51:56 +0100 |
commit | ec329b2b7ec5459e47fc3ea562a9c80c904515dc (patch) | |
tree | 00b27faf9bf713b39871e0a3e994b4ddc2ed6857 /src/newt | |
parent | c5979a9a4690eec57c1192c9cd5c842ced92fd21 (diff) |
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
Diffstat (limited to 'src/newt')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/javafx/NewtCanvasJFX.java | 16 |
1 files changed, 8 insertions, 8 deletions
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<javafx.stage.WindowEvent> windowShownListener = new EventHandler<javafx.stage.WindowEvent>() { 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 { * <ul> * <li> Make the NEWT Child invisible </li> * <li> Disconnects the NEWT Child from this Canvas NativeWindow, reparent to NULL </li> - * <li> Issues <code>destroy()</code> on the NEWT Child</li> + * <li> Issues {@link Window#destroy()} on the NEWT Child</li> * <li> Remove reference to the NEWT Child</li> * </ul> + * 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); } |