Look and feel mechanism?

Felix Bembrick felix.bembrick at gmail.com
Sun Dec 8 18:18:52 PST 2013


@Stephen, you are absolutely right about this.  But such an approach (and
pretty much *any* approach) to "emulated" native look and feels is fraught
with difficulties and complexities.

Firstly, it will *never* be possible to completely emulate the native look
and feel.  And, even if the differences are subtle, there is the very real
risk that the end user will have a very uneasy feeling using such a look
and feel.  At times it will even seem like an imposter.

Secondly, you will be forever playing catchup as each new major release
(and also even each minor update) changes one or more of the behaviours
that you have so carefully emulated.  The result is that for a while at
least, your emulated look and feel is an even more obvious imposter with an
even more uneasy experience for the user.

Thirdly, building such emulated look and feels is a *lot* of work (much
more than you would think).

My reasoning is: why bother?  Why not build a "JavaFX look and feel" (akin
to something like Nimubs in Swing) that simply doesn't even try to look
native?  Then you know for sure your app looks and behaves identically on
all devices and there is no hint of "imposter-ness".

These days, many apps do not look 100% native and may have their own
controls or look and feel in general.  Why not channel all that massive
effort in constructing an emulated native look and feel into simply making
JavaFX better overall?

Felix



On 9 December 2013 12:35, Pedro Duque Vieira <pedro.duquevieira at gmail.com>wrote:

> Thanks!
>
> @Jasper: Yes, that's very interesting! Forgot that was possible to do in
> CSS.
>
>
> On Mon, Dec 9, 2013 at 12:15 AM, Stephen Winnall <steve at winnall.ch> wrote:
>
> > It may be possible to change the LOOK with CSS, but not the FEEL, which
> is
> > where Java apps have traditionally failed big time.
> >
> > Some things that I don’t think can be changed with CSS:
> >
> > 1) texts
> > 2) order of buttons
> > 3) escape characters for shortcuts
> > 4) menus
> > 5) system-level stuff (double-clicking on files, dropping files on
> > applications, …)
> > 6) filesystem conventions
> > 7) ...
> >
> > I think FXML can fix some of these, but not all. So it seems to me that a
> > LaF in JFX will consist of at least:
> >
> >         - one or more CSS files
> >         - one or more FXML files
> >         - some plumbing at the system level
> >
> > It would be nice to have a set of proper LaFs for each major platform
> with
> > an appropriate common API.
> >
> > Steve
> >
> > On 9 Dec 2013, at 00:20, Jasper Potts <jasper.potts at oracle.com> wrote:
> >
> > > You can set skin classes from CSS so should be able to do everything
> you
> > could with Swing and more. With just a CSS file and skins as and when
> > needed.
> > >
> > > Jasper
> > >
> > >> On Dec 8, 2013, at 3:00 PM, Jonathan Giles <jonathan.giles at oracle.com
> >
> > wrote:
> > >>
> > >> At present there are no plans to introduce any further API or
> > >> functionality in this area, but if there is something you are wanting
> > >> then you should file feature requests in Jira.
> > >>
> > >> -- Jonathan
> > >>
> > >>> On 9/12/2013 11:54 a.m., Pedro Duque Vieira wrote:
> > >>> Hi,
> > >>>
> > >>> Is there any Look and Feel mechanism in place, like the one in Swing?
> > That
> > >>> doesn't appear to exist..
> > >>>
> > >>> Are there any plans to add one? You can only do so much with CSS...
> > >>>
> > >>> Thanks in advance, best regards,
> > >>
> >
> >
>
>
> --
> Pedro Duque Vieira
>


More information about the openjfx-dev mailing list