Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #34696

Re: JavaFX: Bindings, StringConverters, and ChangeListeners

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Nigel Wade <nmw@ion.le.ac.uk>
Newsgroups comp.lang.java.programmer
Subject Re: JavaFX: Bindings, StringConverters, and ChangeListeners
Date Thu, 23 Jun 2016 12:19:18 +0100
Lines 32
Message-ID <dt1utmFafi7U1@mid.individual.net> (permalink)
References <87wplhbbvy.fsf@gnu.org> <dsvl9oFqvv4U1@mid.individual.net> <877fdgl87c.fsf@gnu.org> <nkgbuu$l6u$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net JBbK6EYmRrYDY0s7xnAPFA6dVdIXgIEMl1i5zOzRCAUEuNLUIf
Cancel-Lock sha1:atGkH2gpsNm+vTxPOeV/HupcJ5c=
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0
In-Reply-To <nkgbuu$l6u$1@dont-email.me>
Xref csiph.com comp.lang.java.programmer:34696

Show key headers only | View raw


On 23/06/16 10:59, Martin Gregorie wrote:
> On Thu, 23 Jun 2016 08:39:51 +0200, Tassilo Horn wrote:
>
>> Oh, flashing is actually a nice idea and can be done pretty easily from
>> my listener.
>>
> Personal view: flashing is annoying if its more than a single character
> that's doing it. I've recently used black on white for normal Swing
> JTextField data entry fields and, if invalid/inappropriate/out of range,
> setting that to white text on red as an alert. If the rest of the
> window's palette is no closer to red than pastel yellow, its quite eye-
> catching.
>
> Actually this is numeric with the field in question being a total of
> several inputs. The colours I used were:
> - black on white = total too low
> - green on white = total exactly right
> - white on red   = total too high
>
>

You need to be careful with colours. I've had issues with UIManager overriding my colours because it decided there was 
insufficient contrast between the foreground and background. I'd very carefully chosen the colours so that there was 
sufficient contrast, but the UIManager had other ideas. As far as I could tell the UIManager only compares the 
light/darkness of the colours, and doesn't take proper account of the colour contrast. I have no idea if this is similar 
in JavaFX, my Java GUI work is with Swing.

I find that a single flash is not too intrusive. It's a reasonable indication to the user that there is something wrong 
with the input somewhere on the dialog. Then a field highlight can be used to give feedback as to which actual field is 
incorrect.

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

JavaFX: Bindings, StringConverters, and ChangeListeners Tassilo Horn <tsdh@gnu.org> - 2016-06-22 15:18 +0200
  Re: JavaFX: Bindings, StringConverters, and ChangeListeners Nigel Wade <nmw@ion.le.ac.uk> - 2016-06-22 15:22 +0100
    Re: JavaFX: Bindings, StringConverters, and ChangeListeners Tassilo Horn <tsdh@gnu.org> - 2016-06-23 08:39 +0200
      Re: JavaFX: Bindings, StringConverters, and ChangeListeners Martin Gregorie <martin@address-in-sig.invalid> - 2016-06-23 09:59 +0000
        Re: JavaFX: Bindings, StringConverters, and ChangeListeners Nigel Wade <nmw@ion.le.ac.uk> - 2016-06-23 12:19 +0100
      Re: JavaFX: Bindings, StringConverters, and ChangeListeners Nigel Wade <nmw@ion.le.ac.uk> - 2016-06-23 12:39 +0100
        Re: JavaFX: Bindings, StringConverters, and ChangeListeners Tassilo Horn <tsdh@gnu.org> - 2016-06-23 14:39 +0200
  Re: JavaFX: Bindings, StringConverters, and ChangeListeners Eric Douglas <e.d.programmer@gmail.com> - 2016-06-22 08:06 -0700
    Re: JavaFX: Bindings, StringConverters, and ChangeListeners Tassilo Horn <tsdh@gnu.org> - 2016-06-23 08:45 +0200
      Re: JavaFX: Bindings, StringConverters, and ChangeListeners Eric Douglas <e.d.programmer@gmail.com> - 2016-06-23 05:11 -0700
        Re: JavaFX: Bindings, StringConverters, and ChangeListeners Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-23 08:22 -0400
          Re: JavaFX: Bindings, StringConverters, and ChangeListeners Tassilo Horn <tsdh@gnu.org> - 2016-06-23 15:12 +0200
            Re: JavaFX: Bindings, StringConverters, and ChangeListeners Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-06-23 10:56 -0400

csiph-web