hg: openjfx/8/graphics/rt: RT-24133 Gtk: URL is recognised both as FILE and as URL, linux only, DnD and Clipboard

2013-10-08 Thread hang . vo
Changeset: eff4787e6884
Author:Alexander Zvegintsev
Date:  2013-10-08 14:31 +0400
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/eff4787e6884

RT-24133 Gtk: URL is recognised both as FILE and as URL, linux only, DnD and 
Clipboard

! modules/graphics/src/main/native-glass/gtk/GlassSystemClipboard.cpp
! modules/graphics/src/main/native-glass/gtk/glass_dnd.cpp
! modules/graphics/src/main/native-glass/gtk/glass_general.cpp
! modules/graphics/src/main/native-glass/gtk/glass_general.h



Re: [announce] CodeAreaFX: text area with styled ranges of text

2013-10-08 Thread Tomas Mikula
On Mon, Oct 7, 2013 at 5:16 PM, Danno Ferrin danno.fer...@shemnon.com wrote:
 That. Is. Awesome.

 I don't mean to dissuade you from your code donation, but I feel there may
 be more value in keeping this as a separate third party control.  The
 biggest reason is that once it is in the core it will be released in the
 same schedule as the JDK, with no options to do it on it's own schedule.  A
 secondary a rich third party control ecosystem is viewed as a sign of
 maturity, and this control in the third party realm would go a long way to
 growing that perception.

 Perhaps ControlsFX or JFXtras would be interested if you don't want to
 manage the release and promotion cycles yourself.

Thanks, Danno, for your input.

There might be a licensing problem. Both ControlsFX and JFXtras use
the New BSD license, while in my code there are pieces based on the
OpenJFX code, so I guess I'm stuck with GPLv2 with Classpath
Exception.

Best,
Tomas



 On Mon, Oct 7, 2013 at 7:48 AM, Tomas Mikula tomas.mik...@gmail.com wrote:

 Hi all,

 I implemented a text control that supports assigning style classes to
 portions of text. It is meant to be used for syntax highlighting.

 https://github.com/TomasMikula/CodeAreaFX

 The code is based on the original TextArea code. This implies the
 license to be GPLv2 with the Classpath Exception. I would be happy to
 contribute it back to the OpenJFX project.
 The idea of using a ListView of TextFlows is borrowed from Tom
 Schindl's StyledTextArea
 (http://fxexperience.com/2013/02/interview-with-tom-schindl-2/).

 Check out the demos and the APIs. Feedback really appreciated. Any
 help with the issues
 (https://github.com/TomasMikula/CodeAreaFX/wiki/Known-Issues) would be
 awesome.

 Best,
 Tomas




hg: openjfx/8/graphics/rt: RT-33384: avoid using Double.MAX_VALUE and Double.MIN_VALUE

2013-10-08 Thread hang . vo
Changeset: f2d3f04c1632
Author:David Grievedavid.gri...@oracle.com
Date:  2013-10-08 08:02 -0400
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/f2d3f04c1632

RT-33384: avoid using Double.MAX_VALUE and Double.MIN_VALUE

! modules/controls/src/main/java/javafx/scene/control/SkinBase.java



hg: openjfx/8/graphics/rt: ECLIPSE ONLY: fix .classpath

2013-10-08 Thread hang . vo
Changeset: 1b6d4c9bd1a7
Author:snorthov
Date:  2013-10-08 07:14 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/1b6d4c9bd1a7

ECLIPSE ONLY: fix .classpath

! .classpath



hg: openjfx/8/graphics/rt: 3 new changesets

2013-10-08 Thread hang . vo
Changeset: 61727bf6e832
Author:kcr
Date:  2013-10-08 09:26 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/61727bf6e832

[TEST-ONLY] RT-32950: Enable excluded tests in gradle build
Reviewed-by: Chien

! build.gradle
! 
modules/base/src/test/java/javafx/binding/expression/AbstractNumberExpressionTest.java

Changeset: 093ea25436c7
Author:kcr
Date:  2013-10-08 09:26 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/093ea25436c7

RT-21415: Need to add javafx-src.zip to JDK 8 distribution
Reviewed-by: David Hill, Felipe

! build.gradle
! gradle.properties.template

Changeset: ab9489903f7b
Author:Yao Wang yao.w.w...@oracle.com
Date:  2013-10-08 09:30 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/ab9489903f7b

RT-26587: 3D Data validation AND RT-30451: FX 8 3D: Need to validate Mesh's 
data size
Summary: Validate input data during FX-NG sync stage. AND Need to validate the 
size and range of these arrays.
Reviewed-by: kcr and cyang

! modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGShape3D.java
! modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGTriangleMesh.java
! modules/graphics/src/main/java/com/sun/prism/impl/BaseMesh.java
! modules/graphics/src/main/java/javafx/scene/shape/Box.java
! modules/graphics/src/main/java/javafx/scene/shape/Cylinder.java
! modules/graphics/src/main/java/javafx/scene/shape/Sphere.java
! modules/graphics/src/main/java/javafx/scene/shape/TriangleMesh.java



Re: hg: openjfx/8/graphics/rt: 3 new changesets

2013-10-08 Thread Tom Schindl
So where the src.zip end up, so that k can adjust the tooling?

Tom

Von meinem iPhone gesendet

 Am 08.10.2013 um 18:32 schrieb hang...@oracle.com:
 
 Changeset: 61727bf6e832
 Author:kcr
 Date:  2013-10-08 09:26 -0700
 URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/61727bf6e832
 
 [TEST-ONLY] RT-32950: Enable excluded tests in gradle build
 Reviewed-by: Chien
 
 ! build.gradle
 ! 
 modules/base/src/test/java/javafx/binding/expression/AbstractNumberExpressionTest.java
 
 Changeset: 093ea25436c7
 Author:kcr
 Date:  2013-10-08 09:26 -0700
 URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/093ea25436c7
 
 RT-21415: Need to add javafx-src.zip to JDK 8 distribution
 Reviewed-by: David Hill, Felipe
 
 ! build.gradle
 ! gradle.properties.template
 
 Changeset: ab9489903f7b
 Author:Yao Wang yao.w.w...@oracle.com
 Date:  2013-10-08 09:30 -0700
 URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/ab9489903f7b
 
 RT-26587: 3D Data validation AND RT-30451: FX 8 3D: Need to validate Mesh's 
 data size
 Summary: Validate input data during FX-NG sync stage. AND Need to validate 
 the size and range of these arrays.
 Reviewed-by: kcr and cyang
 
 ! modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGShape3D.java
 ! modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGTriangleMesh.java
 ! modules/graphics/src/main/java/com/sun/prism/impl/BaseMesh.java
 ! modules/graphics/src/main/java/javafx/scene/shape/Box.java
 ! modules/graphics/src/main/java/javafx/scene/shape/Cylinder.java
 ! modules/graphics/src/main/java/javafx/scene/shape/Sphere.java
 ! modules/graphics/src/main/java/javafx/scene/shape/TriangleMesh.java
 


hg: openjfx/8/graphics/rt: 3 new changesets

2013-10-08 Thread hang . vo
Changeset: 085053c47663
Author:hudson
Date:  2013-10-03 08:05 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/085053c47663

Added tag 8.0-b110 for changeset 0eb503d2b567

! .hgtags

Changeset: b3fa96512e75
Author:mv157916
Date:  2013-10-03 16:58 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/b3fa96512e75

RT-33356: Update the JDK 8 build number to b110 in rt/build.properties file in 
the JavaFX 8 Master forest.

! build.properties

Changeset: e6331b4daf15
Author:jgodinez
Date:  2013-10-08 09:38 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/e6331b4daf15

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/8.0/MASTER/jfx/rt

- .idea/RegionTests.iml
- modules/fxml/src/test/java/javafx/fxml/RT_23413Test.java
- modules/fxml/src/test/resources/javafx/fxml/rt_23413.fxml
- modules/graphics/src/main/java/com/sun/prism/tkal/Window.java
- tests/manual/RegionTests/src/main/java/region/RegionBackgroundFillUITest.java
- tests/manual/RegionTests/src/main/java/region/RegionBackgroundImageUITest.java
- tests/manual/RegionTests/src/main/java/region/RegionBorderImageUITest.java
- tests/manual/RegionTests/src/main/java/region/RegionBorderStrokeUITest.java
- tests/manual/RegionTests/src/main/java/region/RegionShapeUITest.java
- tests/manual/RegionTests/src/main/java/region/RegionUITestBase.java
- tests/manual/RegionTests/src/main/resources/region/BlackButton.png
- tests/manual/RegionTests/src/main/resources/region/WindowsButton.png
- tests/manual/RegionTests/src/main/resources/region/border.png
- tests/manual/RegionTests/src/main/resources/region/bor...@2x.png
- tests/manual/RegionTests/src/main/resources/region/checker.png
- tests/manual/RegionTests/src/main/resources/region/popover-no-arrow-empty.png
- 
tests/manual/RegionTests/src/main/resources/region/popover-no-arrow-em...@2x.png
- tests/manual/RegionTests/src/main/resources/region/test20x20.png
- tests/manual/RegionTests/src/main/resources/region/test20...@2x.png
- tests/manual/RegionTests/src/main/resources/region/test48x48.png
- tests/manual/RegionTests/src/main/resources/region/test48...@2x.png



Re: hg: openjfx/8/graphics/rt: 3 new changesets

2013-10-08 Thread Kevin Rushforth
In the top-level JDK directory, next to src.zip, there will be a 
javafx-src.zip.


-- Kevin


Tom Schindl wrote:

So where the src.zip end up, so that k can adjust the tooling?

Tom

Von meinem iPhone gesendet

  

Am 08.10.2013 um 18:32 schrieb hang...@oracle.com:

Changeset: 61727bf6e832
Author:kcr
Date:  2013-10-08 09:26 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/61727bf6e832

[TEST-ONLY] RT-32950: Enable excluded tests in gradle build
Reviewed-by: Chien

! build.gradle
! 
modules/base/src/test/java/javafx/binding/expression/AbstractNumberExpressionTest.java

Changeset: 093ea25436c7
Author:kcr
Date:  2013-10-08 09:26 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/093ea25436c7

RT-21415: Need to add javafx-src.zip to JDK 8 distribution
Reviewed-by: David Hill, Felipe

! build.gradle
! gradle.properties.template

Changeset: ab9489903f7b
Author:Yao Wang yao.w.w...@oracle.com
Date:  2013-10-08 09:30 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/ab9489903f7b

RT-26587: 3D Data validation AND RT-30451: FX 8 3D: Need to validate Mesh's 
data size
Summary: Validate input data during FX-NG sync stage. AND Need to validate the 
size and range of these arrays.
Reviewed-by: kcr and cyang

! modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGShape3D.java
! modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGTriangleMesh.java
! modules/graphics/src/main/java/com/sun/prism/impl/BaseMesh.java
! modules/graphics/src/main/java/javafx/scene/shape/Box.java
! modules/graphics/src/main/java/javafx/scene/shape/Cylinder.java
! modules/graphics/src/main/java/javafx/scene/shape/Sphere.java
! modules/graphics/src/main/java/javafx/scene/shape/TriangleMesh.java




Re: [announce] CodeAreaFX: text area with styled ranges of text

2013-10-08 Thread Jonathan Giles
Tomas,

Very nice work! :-)

The first step in the process to contribute features / bug fixes back
into OpenJFX is to create a Jira issue (or find one that covers the
topic). In the case of styled text ranges I don't believe a Jira issue
exists, so feel free to open a new issue. This will be the way we can
see what is popular and still outstanding in JavaFX, and of course
discuss details.

I'm not clear on how closely your approach is related to Tom's, but
perhaps there is sufficient overlap there that you can collaborate. This
may help to improve your API and implementation prior to it being
considered for integration into OpenJFX, and will of course help to
prevent duplication of effort.

Keep up the great work and be sure to keep me in the loop of your
progress :-)

-- Jonathan

On 8/10/2013 2:48 a.m., Tomas Mikula wrote:
 Hi all,

 I implemented a text control that supports assigning style classes to
 portions of text. It is meant to be used for syntax highlighting.

 https://github.com/TomasMikula/CodeAreaFX

 The code is based on the original TextArea code. This implies the
 license to be GPLv2 with the Classpath Exception. I would be happy to
 contribute it back to the OpenJFX project.
 The idea of using a ListView of TextFlows is borrowed from Tom
 Schindl's StyledTextArea
 (http://fxexperience.com/2013/02/interview-with-tom-schindl-2/).

 Check out the demos and the APIs. Feedback really appreciated. Any
 help with the issues
 (https://github.com/TomasMikula/CodeAreaFX/wiki/Known-Issues) would be
 awesome.

 Best,
 Tomas



Reacting to mouse events on a TreeCell. Is it supposed to be this awkward?

2013-10-08 Thread Scott Palmer
I'm investigating a memory leak and it seems that the culprit is event
listeners attached to TreeCells

The GC roots of my leaks are deep in the JavaFX window/event system

In a class extending TreeCell,  am calling methods on such as:

setOnContextMenuRequested(contextMenuRequestHandler);
setOnMouseClicked(mouseEventHandler);
setOnDragDetected(dragDetectedHandler);

All of the event handlers in this case will have a reference to the
TreeCell, either via the implicit reference of the anonymous inner class,
or an explicit member

I do this in updateItem when the cell is not empty and has a non-null item.
If updateItem is called and the cell is empty or has a null item then I
clear the event handlers with:

setOnContextMenuRequested(null);
setOnMouseClicked(null);
setOnDragDetected(null);

The problem is that TreeView doesn't seem to reuse TreeCells very much.  It
mostly creates new ones.  This means that many TreeCells are disconnected
from the scene graph and lost while there is still an event handler
connected to it.

Am I doing something wrong?
This seemed like the correct way to deal with dragging and double clicking
on tree nodes.

The tutorial here:
http://docs.oracle.com/javafx/2/ui_controls/tree-view.htm#BABDEADA

only goes so far as to add a context menu. (My context menu needs to be
constructed dynamically.)  So I'm not sure if I'm allowed to connect
event handlers to TreeCells in this way, but I don't know what the
alternative is.

I suppose I would have to listen to something to ensure the TreeCell is
still part of the scene graph and disconnect the listeners when that
changes.  It seems a bit awkward.


Scott
(I'm using 7u40)


Re: Reacting to mouse events on a TreeCell. Is it supposed to be this awkward?

2013-10-08 Thread Jonathan Giles
I note right at the end you say you're using 7u40. In the JavaFX 2.x
series of releases it is true that TreeView misbehaved a bit around cell
reuse. This should no longer be the case in JavaFX 8.0. In any case, the
best option is to file a bug report and discuss it further in there,
especially so if you can reproduce the issue in JavaFX 8.0.

One thing that sticks out: you don't say if you're using
WeakEventHandler or EventHandler instances. If you're using EventHandler
you could consider using WeakEventHandler. This may help to alleviate
some of the memory leak.

-- Jonathan

On 9/10/2013 8:37 a.m., Scott Palmer wrote:
 I'm investigating a memory leak and it seems that the culprit is event
 listeners attached to TreeCells

 The GC roots of my leaks are deep in the JavaFX window/event system

 In a class extending TreeCell,  am calling methods on such as:

 setOnContextMenuRequested(contextMenuRequestHandler);
 setOnMouseClicked(mouseEventHandler);
 setOnDragDetected(dragDetectedHandler);

 All of the event handlers in this case will have a reference to the
 TreeCell, either via the implicit reference of the anonymous inner class,
 or an explicit member

 I do this in updateItem when the cell is not empty and has a non-null item.
 If updateItem is called and the cell is empty or has a null item then I
 clear the event handlers with:

 setOnContextMenuRequested(null);
 setOnMouseClicked(null);
 setOnDragDetected(null);

 The problem is that TreeView doesn't seem to reuse TreeCells very much.  It
 mostly creates new ones.  This means that many TreeCells are disconnected
 from the scene graph and lost while there is still an event handler
 connected to it.

 Am I doing something wrong?
 This seemed like the correct way to deal with dragging and double clicking
 on tree nodes.

 The tutorial here:
 http://docs.oracle.com/javafx/2/ui_controls/tree-view.htm#BABDEADA

 only goes so far as to add a context menu. (My context menu needs to be
 constructed dynamically.)  So I'm not sure if I'm allowed to connect
 event handlers to TreeCells in this way, but I don't know what the
 alternative is.

 I suppose I would have to listen to something to ensure the TreeCell is
 still part of the scene graph and disconnect the listeners when that
 changes.  It seems a bit awkward.


 Scott
 (I'm using 7u40)



Re: Reacting to mouse events on a TreeCell. Is it supposed to be this awkward?

2013-10-08 Thread Scott Palmer
Will do.

I also just noticed (after using Bindings.select(this.sceneProperty(),
window, showing) to try to trigger my diconnecting) that in 7u40
TreeCells seem to remain connected to the scene until I force the tree to
repaint.
In my app every time I open a document I rebuild a tree.  even when
listening to the above mentioned binding, nothing was triggering as I
loaded new documents until I resized my UI.  Then suddenly all those unused
TreeCells were let go.


Scott


On Tue, Oct 8, 2013 at 3:48 PM, Jonathan Giles jonathan.gi...@oracle.comwrote:

 I note right at the end you say you're using 7u40. In the JavaFX 2.x
 series of releases it is true that TreeView misbehaved a bit around cell
 reuse. This should no longer be the case in JavaFX 8.0. In any case, the
 best option is to file a bug report and discuss it further in there,
 especially so if you can reproduce the issue in JavaFX 8.0.

 One thing that sticks out: you don't say if you're using
 WeakEventHandler or EventHandler instances. If you're using EventHandler
 you could consider using WeakEventHandler. This may help to alleviate
 some of the memory leak.

 -- Jonathan

 On 9/10/2013 8:37 a.m., Scott Palmer wrote:
  I'm investigating a memory leak and it seems that the culprit is event
  listeners attached to TreeCells
 
  The GC roots of my leaks are deep in the JavaFX window/event system
 
  In a class extending TreeCell,  am calling methods on such as:
 
  setOnContextMenuRequested(contextMenuRequestHandler);
  setOnMouseClicked(mouseEventHandler);
  setOnDragDetected(dragDetectedHandler);
 
  All of the event handlers in this case will have a reference to the
  TreeCell, either via the implicit reference of the anonymous inner class,
  or an explicit member
 
  I do this in updateItem when the cell is not empty and has a non-null
 item.
  If updateItem is called and the cell is empty or has a null item then I
  clear the event handlers with:
 
  setOnContextMenuRequested(null);
  setOnMouseClicked(null);
  setOnDragDetected(null);
 
  The problem is that TreeView doesn't seem to reuse TreeCells very much.
  It
  mostly creates new ones.  This means that many TreeCells are disconnected
  from the scene graph and lost while there is still an event handler
  connected to it.
 
  Am I doing something wrong?
  This seemed like the correct way to deal with dragging and double
 clicking
  on tree nodes.
 
  The tutorial here:
  http://docs.oracle.com/javafx/2/ui_controls/tree-view.htm#BABDEADA
 
  only goes so far as to add a context menu. (My context menu needs to be
  constructed dynamically.)  So I'm not sure if I'm allowed to connect
  event handlers to TreeCells in this way, but I don't know what the
  alternative is.
 
  I suppose I would have to listen to something to ensure the TreeCell is
  still part of the scene graph and disconnect the listeners when that
  changes.  It seems a bit awkward.
 
 
  Scott
  (I'm using 7u40)




Re: API Change Proposal - Re: MSAA and Scene anti aliasing

2013-10-08 Thread Thor Johannesson
Hi All,

Need to revive this thread, to remind everyone that anti-aliasing API change is 
going in. And should be available in build b112.
See bug report for some further detail/discussion: 
https://javafx-jira.kenai.com/browse/RT-31878

Initially only available anti-aliasing modes are BALANCED and DISABLED, as per 
decision by Kevin and Richard.  FASTEST and NICEST should come later.

The new class SceneAntialiasing  should resembled below:

/**
 * The JavaFX {@code SceneAntialiasing} class specifies the level of
 * anti-aliasing desired. Scene anti-aliasing is primarily used when rendering
 * 3D primitives, which are otherwise rendered aliased.
 * p
 * Note: In order for {@code SceneAntialiasing} to have an affect, the 
underlying
 * system must support:
 * {@link javafx.application.ConditionalFeature#SCENE3D 
ConditionalFeature.SCENE3D}
 * and anti-aliasing.
 * /p
 * @since JavaFX 8.0
 */
public final class SceneAntialiasing {
/**
 * Disables anti-aliasing
 */
public static final SceneAntialiasing DISABLED = new 
SceneAntialiasing(DISABLED);
/**
 * Enables anti-aliasing optimizing for a balance of quality and performance
 */
public static final SceneAntialiasing BALANCED = new 
SceneAntialiasing(BALANCED);
...
private SceneAntialiasing(String value) { val = value; }
}

Note this is a potential breaking change, and the following constructors will 
change!

Constructors remove:
public Scene(Parent root, double width, double height, boolean depthBuffer, 
boolean antiAliasing)
public SubScene(Parent root, double width, double height, boolean depthBuffer, 
boolean antiAliasing)

Constructor add:
public Scene(Parent root, double width, double height, boolean depthBuffer, 
SceneAntiAliasing antiAliasing)
public SubScene(Parent root, double width, double height, boolean depthBuffer, 
SceneAntiAliasing antiAliasing)


-Thor
On Jul 24, 2013, at 2:37 PM, Chien Yang wrote:

 Thank you for the feedback! We decided to drop DEFAULT in favor of BALANCED. 
 So here is the revised SceneAntiAliasing enum entries:
 
 public enum SceneAntiAliasing {
BALANCED, // enables anti-aliasing using optimal system setting available 
 that balances speed and quality
DISABLED, // disables anti-aliasing
FASTEST, // enables anti-aliasing using minimum system setting available 
 that results in better frame rate
NICEST // enables anti-aliasing using maximum system setting available 
 that results in best visual quality
 }
 
 Thanks,
 - Chien
 
 On 7/23/2013 1:29 PM, Chien Yang wrote:
 Hi all,
 
We appreciate all the feedback you have contributed to this topic. After 
 listening to the feedback and an internal discussion, we would like to 
 propose a minor change to the API for supporting scene anti-aliasing. We 
 intentionally choose not to expose the number of samples and techniques used 
 in this release, but this doesn't preclude future addition when the time is 
 right for more options. This change will be tracked by RT-31878 
 (https://javafx-jira.kenai.com/browse/RT-31878):
 
 Anti-aliasing API Change Proposal:
 
 Constructors remove:
 public Scene(Parent root, double width, double height, boolean depthBuffer, 
 boolean antiAliasing)
 public SubScene(Parent root, double width, double height, boolean 
 depthBuffer, boolean antiAliasing)
 
 Constructor add:
 public Scene(Parent root, double width, double height, boolean depthBuffer, 
 SceneAntiAliasing antiAliasing)
 public SubScene(Parent root, double width, double height, boolean 
 depthBuffer, SceneAntiAliasing antiAliasing)
 
 Note:The antiAliasing argument will be used if the underlying graphics 
 driver has anti-aliasing support.
 
 Where SceneAntiAliasing is an enum with the following entries at the moment:
 
 public enum SceneAntiAliasing {
DISABLED, // disables anti-aliasing
DEFAULT, // enables anti-aliasing using a default system setting 
 available that balances speed and quality
FASTEST, // enables anti-aliasing using minimum system setting available 
 that results in better frame rate
NICEST // enables anti-aliasing using maximum system setting available 
 that results in best visual quality
 }
 
 Thanks,
 - Chien
 



hg: openjfx/8/graphics/rt: 2 new changesets

2013-10-08 Thread hang . vo
Changeset: 23a4702aac22
Author:rbair
Date:  2013-10-08 12:38 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/23a4702aac22

RT-29794: NPE from NGRegion in Ensemble8
Reviewed-by: lnerad

! modules/graphics/src/main/java/com/sun/javafx/scene/DirtyBits.java
! modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGRegion.java
! modules/graphics/src/main/java/javafx/scene/image/Image.java
! modules/graphics/src/main/java/javafx/scene/layout/Region.java
! modules/graphics/src/test/java/com/sun/javafx/pgstub/StubImageLoader.java
! modules/graphics/src/test/java/com/sun/javafx/pgstub/StubToolkit.java
+ 
modules/graphics/src/test/java/com/sun/javafx/pgstub/StubWritablePlatformImage.java
+ modules/graphics/src/test/java/javafx/scene/image/ImageForTesting.java
! modules/graphics/src/test/java/javafx/scene/layout/RegionTest.java

Changeset: c878df60c9d7
Author:rbair
Date:  2013-10-08 14:16 -0700
URL:   http://hg.openjdk.java.net/openjfx/8/graphics/rt/rev/c878df60c9d7

RT-19809: Border image and border stroke rendering order
Reviewed-by: jasper

! modules/graphics/src/main/java/com/sun/javafx/sg/prism/NGRegion.java



Re: [announce] CodeAreaFX: text area with styled ranges of text

2013-10-08 Thread Tomas Mikula
Thanks, Jonathan.

On Tue, Oct 8, 2013 at 9:08 PM, Jonathan Giles
jonathan.gi...@oracle.com wrote:
 Tomas,

 Very nice work! :-)

 The first step in the process to contribute features / bug fixes back
 into OpenJFX is to create a Jira issue (or find one that covers the
 topic). In the case of styled text ranges I don't believe a Jira issue
 exists, so feel free to open a new issue. This will be the way we can
 see what is popular and still outstanding in JavaFX, and of course
 discuss details.

 I'm not clear on how closely your approach is related to Tom's, but
 perhaps there is sufficient overlap there that you can collaborate.

I think the main differences are:
1. Tom's StyledTextArea assigns styles, while my CodeArea assigns
style classes. I think my approach is easier to work with, but less
powerful (you can only use styles pre-defined in a stylesheet, thus
you can't implement a rich text editor on top of CodeArea).
2. StyledTextArea's API assigns styles for the whole content at once,
CodeArea assigns one range at a time. I think both approaches have
their use and I plan to add support for batch assignment for
performance reasons.
3. AFAIK, StyledTextArea does not support text selection.
4. Compared to TextArea, CodeArea supports detailed change events
(which part of text was replaced) via TextChangeListener
(http://tomasmikula.github.io/CodeAreaFX/codearea/control/TextChangeListener.html).
Not sure about StyledTextArea.

 This
 may help to improve your API and implementation prior to it being
 considered for integration into OpenJFX, and will of course help to
 prevent duplication of effort.

I don't consider the API to be final, quite opposite, I expect changes
arising from the community and from my own needs. I'm open to feedback
and suggestions.

Regards,
Tomas


 Keep up the great work and be sure to keep me in the loop of your
 progress :-)

 -- Jonathan

 On 8/10/2013 2:48 a.m., Tomas Mikula wrote:
 Hi all,

 I implemented a text control that supports assigning style classes to
 portions of text. It is meant to be used for syntax highlighting.

 https://github.com/TomasMikula/CodeAreaFX

 The code is based on the original TextArea code. This implies the
 license to be GPLv2 with the Classpath Exception. I would be happy to
 contribute it back to the OpenJFX project.
 The idea of using a ListView of TextFlows is borrowed from Tom
 Schindl's StyledTextArea
 (http://fxexperience.com/2013/02/interview-with-tom-schindl-2/).

 Check out the demos and the APIs. Feedback really appreciated. Any
 help with the issues
 (https://github.com/TomasMikula/CodeAreaFX/wiki/Known-Issues) would be
 awesome.

 Best,
 Tomas



Re: Keyboard events

2013-10-08 Thread Pedro Duque Vieira
Do you want me to file a Jira issue for this?

Regards,


On Mon, Oct 7, 2013 at 6:03 PM, Artem Ananiev artem.anan...@oracle.comwrote:


 On 10/7/2013 6:53 PM, Richard Bair wrote:

 That being said, this seems like a very common use case, and I wonder if
 there is something more we could do (in the longer term, short term do as
 Artem suggests)


 One of the options is to provide API to query for keyboard state at any
 arbitrary moment, whether particular key is pressed or not. Even if we only
 support locking keys (Caps, Num, Scroll, Kana) and control keys (Shift,
 Control, Command, Alt), it will be of great value. Game developers will be
 happy to have such API for all the keys, including navigation and letter
 ones.

 Thanks,

 Artem


  On Oct 7, 2013, at 3:56 AM, Artem Ananiev artem.anan...@oracle.com
 wrote:


  On 10/7/2013 2:40 AM, Pedro Duque Vieira wrote:
 Hi,

 I have the following use case:
 When the user presses shift and the mouse is hover the chart component
 the
 cursor must change to an open hand cursor signaling to the user that the
 chart is ready for a panning action.
 The problem is that for this to be possible I want the chart to be able
 to
 listen to keyboard events even when it doesn't have focus.

 I think this is not possible and I wonder why. Swing was the same, you
 could only listen to keyboard events if the control had focus. Is this a
 technical limitation? If there is no technical limitation I think it
 would
 be better to remove this restriction, I think it is limiting and the
 above
 scenario is a good use case to show that.


 This is not a technical limitation, it's just the way how it's supposed
 to work. All the key events are dispatched to the component in focus, this
 is what input focus is.

 Scenario you described should be easier to implement in FX than in
 Swing. In AWT/Swing, input events are dispatched to a single component,
 while FX is much more flexible. All the events are delivered to a Scene
 first, then dispatched to the focused component (or component under mouse,
 for mouse events), then bubbled up back to the Scene. What you need is to
 register a custom event filter for the scene and listen to all the key
 events.

 See Scene.addEventFilter() and Scene.addEventHandler() for details.

 Thanks,

 Artem

  Thanks, best regards,




-- 
Pedro Duque Vieira