Skip to main content

Dragging a Frame

2 replies [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Tom Ball

Hey presenters team -- talk to the scenegraph folks. ;-)

Seriously, two things changed going from the interpreter to the compiler
environments, and the one that would affect UI performance and
functionality the most is the underlying scenegraph library. I've
copied that team's alias, and with your example they should have enough
to evaluate where the problem is. Rest assured that if the problem is
due to the compiler emitting bad code, they won't hesitate to let us know!

Tom

Jo Voordeckers wrote:
> Hey compiler team,
>
> Dragging an (undecorated) frame around the screen doesn't seem to work
> as smoothly as before in the interpreter, or there is maybe a better way
> to do this!?
>
> Try to drag the undecorated frame by the blue rect. In the interpreter
> this smoothly drags the frame around the screen, now (release 2548) the
> frame jumps around the screen leaving droppings all over the place.
>
> import javafx.ui.*;
> import javafx.ui.canvas.*;
>
> var f:Frame = Frame {
> width: 700
> height: 300
> centerOnScreen: true
> content:
> Canvas {
> content: VBox {
> content: [
> Rect {
> width: 700
> height: 50
> fill: Color.BLUE
> onMouseDragged: function(e: CanvasMouseEvent) {
>
> f.screenx += e.localDragTranslation.x;
> f.screeny += e.localDragTranslation.y;
> }
> }
> ,
> Rect {
> width: 700
> height: 250
> fill: Color.GRAY
> }
> ]
> }
> }
> visible: true
> undecorated: true
> onClose: function() {
> java.lang.System.exit(0);
> }
> }
>
>
> Thanks!
>
> --
> - Jo

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
For additional commands, e-mail: dev-help@scenegraph.dev.java.net

Richard Bair

Interesting. I know with Reprise (which I'm using in the several
JavaOne demos I'm doing) I have "drag window" support and it is
incredibly smooth. This is on WinXP with the latest 6u10 JDK. I'll try
running this and see what performance is like for me.

Richard

On Apr 11, 2008, at 9:47 PM, Tom Ball wrote:

> Hey presenters team -- talk to the scenegraph folks. ;-)
>
> Seriously, two things changed going from the interpreter to the
> compiler environments, and the one that would affect UI performance
> and functionality the most is the underlying scenegraph library.
> I've copied that team's alias, and with your example they should
> have enough to evaluate where the problem is. Rest assured that if
> the problem is due to the compiler emitting bad code, they won't
> hesitate to let us know!
>
> Tom
>
> Jo Voordeckers wrote:
>> Hey compiler team,
>> Dragging an (undecorated) frame around the screen doesn't seem to
>> work as smoothly as before in the interpreter, or there is maybe a
>> better way to do this!?
>> Try to drag the undecorated frame by the blue rect. In the
>> interpreter this smoothly drags the frame around the screen, now
>> (release 2548) the frame jumps around the screen leaving droppings
>> all over the place.
>> import javafx.ui.*;
>> import javafx.ui.canvas.*;
>> var f:Frame = Frame { width: 700
>> height: 300
>> centerOnScreen: true
>> content: Canvas {
>> content: VBox {
>> content: [
>> Rect {
>> width: 700
>> height: 50
>> fill: Color.BLUE
>> onMouseDragged: function(e: CanvasMouseEvent)
>> { f
>> .screenx += e.localDragTranslation.x;
>> f.screeny += e.localDragTranslation.y;
>> }
>> }
>> ,
>> Rect {
>> width: 700
>> height: 250
>> fill: Color.GRAY
>> } ]
>> }
>> }
>> visible: true
>> undecorated: true
>> onClose: function() {
>> java.lang.System.exit(0);
>> }
>> }
>> Thanks!
>> --
>> - Jo
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openjfx-compiler.dev.java.net
> For additional commands, e-mail: dev-help@openjfx-
> compiler.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@scenegraph.dev.java.net
For additional commands, e-mail: dev-help@scenegraph.dev.java.net