Re: Converting a Color object to its string representation

2023-12-09 Thread John Hendrikx
I think this is too niche to have Color provide. Just make a utility method for whatever format you desire, instead of making Color responsible for half a dozen ways of formatting colors, and then probably still missing some format that someone needs. Ticket should be closed as won't fix.

Re: Converting a Color object to its string representation

2023-12-09 Thread Michael Strauß
I obviously meant to write withPrefix("#"), not withDelimiter("#")... On Sat, Dec 9, 2023 at 9:57 PM Michael Strauß wrote: > > How would HexFormat work with Color, other than using an extremely > unwieldy syntax? > > String formatted = HexFormat.of() > .withDelimiter("#") >

Re: Converting a Color object to its string representation

2023-12-09 Thread Michael Strauß
How would HexFormat work with Color, other than using an extremely unwieldy syntax? String formatted = HexFormat.of() .withDelimiter("#") .formatHex(new byte[] { (byte)(color.getRed() * 255.0f), (byte)(color.getGreen() * 255.0f),

Re: Converting a Color object to its string representation

2023-12-09 Thread David Alayachew
Apologies - java.util.HexFormat That's what I get for firing from the hip, then looking afterwards. On Sat, Dec 9, 2023, 3:38 PM David Alayachew wrote: > Doesn't HexDigits cover 3/4 of these cases? > > On Sat, Dec 9, 2023, 1:20 PM Michael Strauß > wrote: > >> If we are going to revisit the

Re: Converting a Color object to its string representation

2023-12-09 Thread David Alayachew
Doesn't HexDigits cover 3/4 of these cases? On Sat, Dec 9, 2023, 1:20 PM Michael Strauß wrote: > If we are going to revisit the `Color` class, maybe we want to provide > a more comprehensive string formatting API, for example: > - full-length web strings (e.g. "#ffad341c") > - compact web

Re: Converting a Color object to its string representation

2023-12-09 Thread Michael Strauß
If we are going to revisit the `Color` class, maybe we want to provide a more comprehensive string formatting API, for example: - full-length web strings (e.g. "#ffad341c") - compact web strings (e.g. "#ccc") - with/without the leading # - nearest named color ("darkgoldenrod") On Sat, Dec 9,

Re: RFR: 8321573: Improve Platform.Preferences documentation [v3]

2023-12-09 Thread Michael Strauß
> This PR enhances the documentation of `Platform.Preferences.accentColor`: > > >/** > - * The accent color. > + * The accent color, which can be used to highlight the active or > important part of a > + * control and make it stand out from the rest of the user interface. It > is

Re: RFR: 8321573: Improve Platform.Preferences documentation [v2]

2023-12-09 Thread Kevin Rushforth
On Sat, 9 Dec 2023 09:33:13 GMT, Nir Lisker wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> wording, table styling > > modules/javafx.graphics/src/main/java/javafx/application/Platform.java line > 596: > >>

Re: RFR: 8321573: Improve Platform.Preferences documentation [v2]

2023-12-09 Thread Kevin Rushforth
On Sat, 9 Dec 2023 16:20:30 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> wording, table styling > > modules/javafx.graphics/src/main/java/javafx/application/Platform.java line > 473: >

Converting a Color object to its string representation

2023-12-09 Thread Eran Leshem
Hello, Can I contribute an implementation for https://bugs.openjdk.org/browse/JDK-8090778? Eran

Re: RFR: 8299753: Tree/TableView: Column Resizing With Fractional Scale [v7]

2023-12-09 Thread Karthik P K
On Thu, 2 Nov 2023 15:31:40 GMT, Andy Goryachev wrote: >> Modified the resize algorithm to work well with fractional scale, thanks for >> deeper understanding of the problem thanks to @hjohn and @mstr2 . >> >> It is important to note that even though the constraints are given by the >> user

Re: RFR: 8321573: Improve Platform.Preferences documentation [v2]

2023-12-09 Thread Nir Lisker
On Sat, 9 Dec 2023 08:40:31 GMT, Michael Strauß wrote: >> This PR enhances the documentation of `Platform.Preferences.accentColor`: >> >> >>/** >> - * The accent color. >> + * The accent color, which can be used to highlight the active or >> important part of a >> + * control and

Re: RFR: 8321573: Improve Platform.Preferences documentation [v2]

2023-12-09 Thread Michael Strauß
On Sat, 9 Dec 2023 07:25:17 GMT, Nir Lisker wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> wording, table styling > > modules/javafx.graphics/src/main/java/javafx/application/Platform.java line > 612: > >>

Re: RFR: 8321573: Improve Platform.Preferences documentation [v2]

2023-12-09 Thread Michael Strauß
> This PR enhances the documentation of `Platform.Preferences.accentColor`: > > >/** > - * The accent color. > + * The accent color, which can be used to highlight the active or > important part of a > + * control and make it stand out from the rest of the user interface. It > is