[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: Why don't GridPane, HBox, BorderPane, VBox, StackPane have Skins?
From:       Tom Eugelink <tbee () tbee ! org>
Date:       2019-04-29 21:26:29
Message-ID: 0a973210-0bcd-21db-7c3c-d734a9ffb869 () tbee ! org
[Download RAW message or body]

Panes are about positioning their children. But if you need a div element=
 to do so, that should be no problem. The render engine is free to choose=
 whatever it needs to render a given node tree.

The nodes tree is about what needs to be rendered, not how to do it for a=
 certain technology. So GridPane just positions its childeren, independen=
t on the actual visualization. And then the engine has to decide how to v=
isualize those nodes (using as many divs as it needs).



On 29-4-2019 12:49, Alex Sviridov wrote:
> Hi Kevin,
>
> Let me explain the reasons of this question. We implement JavaFX (simpl=
ified) in TypeScript
> ( https://github.com/PavelKastornyy/script4j ) for web. For every JavaF=
X Node we have
> html element. For example, for Pane we have <div></div>.
>
> So the question, where should we put all the logic about html elements =
of the Node?
> We thought that Skin is the best candidate, however, we found that not =
all nodes have Skins,
> for example GridPane doesn't. What would you advise?
>
>
>> =D0=9F=D1=8F=D1=82=D0=BD=D0=B8=D1=86=D0=B0, 26 =D0=B0=D0=BF=D1=80=D0=B5=
=D0=BB=D1=8F 2019, 17:46 +03:00 =D0=BE=D1=82 Kevin Rushforth <kevin.rushf=
orth@oracle.com>:
>>
>> Those are layout containers, not UI controls. Given their purpose -- t=
o
>> be containers for laying out children -- it would seem odd for them to
>> have skins. The ability to CSS-style a Pane should be sufficient to do
>> what you want.
>>
>> -- Kevin
>>
>>
>> On 4/26/2019 6:13 AM, Alex Sviridov wrote:
>>> I am studying JavaFX API and can't understand why GridPane, HBox, Bor=
derPane, VBox, StackPane don't have Skins. According to Skin API doc:
>>>> Base class for defining the visual representation of user interface =
controls by defining a scene graph of nodes to represent the skin. A user=
 interface control is abstracted behind the Skinnable interface.
>>> Why do JavaFX developers use skins only for controls, but not for the=
 above panes? I am asking, because these panes also have visual represent=
ation. For example, we can set color, they have children which can be pla=
ced somehow differently etc. Could anyone explain?
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic