0

Piccolo2D has two significant advantages above Swing:

  1. Each child can be shifted both in negative and positive directions of coordinates (Swing supports preliminary positive directions (and layout managers))
  2. Each component has associated affine transform and all it's children obey this transform. All parent path components' transform superpose to give final transform. In Swing some children components can ignore parent transform.

I regard this traits as "normal" and "essential" and the absence of these thing means that graphic library is invalid (like Swing).

So, I wonder if JavaFX, which is proposed as improved alternative to Swing, contain essential traits above?

DT7
  • 1,615
  • 14
  • 26
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385

1 Answers1

1

Most components in JavaFX are Nodes, which can be related to each other hierarchically.

From the Architecture introduction:

The JavaFX scene graph (...) is a hierarchical tree of nodes that 
represents all of the visual elements of the application's user interface. 

Each node in a scene graph has a single parent and zero or more children.

Transformations applied to a Node will also affect its children, so yes, JavaFX has the feature you're looking for.

cangrejo
  • 2,189
  • 3
  • 24
  • 31
  • So, even if a child is edit field or radio button, it can be rotated or scaled if it's parent is rotated or scaled? And what about negative values? Can JavaFX' scroll pane equivalent be scrolled in negative direction? – Suzan Cioc Nov 06 '13 at 19:36
  • I can't test that right now, but I'm positive I have rotated, scaled and translated buttons with total freedom. Text fields and radio buttons shouldn't be any different. I don't know about scroll panes, but they also inherit from Node, so there shouldn't be a problem. JavaFX is designed with that kind of freedom in mind. – cangrejo Nov 06 '13 at 19:46