Bugzilla – Attachment 889 Details for
Bug 1504
Placement of NewtCanvasJFX within other JavaFX layout elements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Possible repair for NewtCanvasJFX layout problems
Bug_1504_javafx_position.diff (text/plain), 1.86 KB, created by
nyc10003
on 2024-03-04 21:20:10 CET
(
hide
)
Description:
Possible repair for NewtCanvasJFX layout problems
Filename:
MIME Type:
Creator:
nyc10003
Created:
2024-03-04 21:20:10 CET
Size:
1.86 KB
patch
obsolete
>diff --git a/src/newt/classes/com/jogamp/newt/javafx/NewtCanvasJFX.java b/src/newt/classes/com/jogamp/newt/javafx/NewtCanvasJFX.java >index 288516deb..3d7b38c9c 100644 >--- a/src/newt/classes/com/jogamp/newt/javafx/NewtCanvasJFX.java >+++ b/src/newt/classes/com/jogamp/newt/javafx/NewtCanvasJFX.java >@@ -142,6 +142,18 @@ public class NewtCanvasJFX extends Canvas implements NativeWindowHolder, WindowC > } }; > this.widthProperty().addListener(sizeListener); > this.heightProperty().addListener(sizeListener); >+ >+ final ChangeListener<Number> posListener = new ChangeListener<Number>() { >+ @Override public void changed(final ObservableValue<? extends Number> observable, final Number oldValue, final Number newValue) { >+ if( DEBUG ) { >+ System.err.println("NewtCanvasJFX.Event.Pos, "+oldValue.doubleValue()+" -> "+newValue.doubleValue()+", has "+getLayoutX()+"x"+getLayoutY()); >+ } >+ updatePosCheck((int)getLayoutX(), (int)getLayoutY()); >+ repaintAction(isVisible()); >+ } }; >+ this.layoutXProperty().addListener(posListener); >+ this.layoutYProperty().addListener(posListener); >+ > this.visibleProperty().addListener(new ChangeListener<Boolean>() { > @Override public void changed(final ObservableValue<? extends Boolean> observable, final Boolean oldValue, final Boolean newValue) { > if( DEBUG ) { >@@ -150,6 +162,7 @@ public class NewtCanvasJFX extends Canvas implements NativeWindowHolder, WindowC > repaintAction(newValue.booleanValue()); > } > }); >+ > this.sceneProperty().addListener(new ChangeListener<Scene>() { > @Override public void changed(final ObservableValue<? extends Scene> observable, final Scene oldValue, final Scene newValue) { > if( DEBUG ) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1504
:
888
| 889