Re: Proposal: RichTextArea Control (Incubator)

2024-02-22 Thread David Alayachew
I'm speaking from ignorance, but in the same way that java 2d lets you do
image reading and writing with great tools to implement it, but it also
provides defaults for png, gif, jpeg, etc.

A good foundation to build your own is critical. But it does not obviate
the need for a useful default.

On Thu, Feb 22, 2024, 8:46 PM John Hendrikx  wrote:

> Hi,
>
> Far be it from me to tell the FX team what it should do, I am still
> wondering the following:
>
> - A 3rd party control, RichTextFX already exists -- what is this new
> proposal adding that RichTextFX does not have?
> - What (if anything) is stopping a 3rd party from building a RichTextArea
> themselves?
>
> In other words, I think the FX team ought to focus on **facilitating** the
> building of complex controls like RichTextArea, by identifying gaps in the
> current Control API that is **stopping** 3rd parties from doing this
> themselves in the same integrated manner as a "native" FX control.
>
> Enabling thousands or tens of thousand of developers to build more
> complicated controls seems to me like a much better investment than what I
> think will be a significant investment in one of the most complex controls
> imaginable.  RichTextFX was actively developed over a 4 year period, with
> 45 contributors and over 1400 commits (for comparison, JavaFX had 250
> commits in the past year).  If it will be significantly less complicated,
> then what does it offer over RichTextFX?
>
> --John
> On 21/02/2024 19:07, Andy Goryachev wrote:
>
> Dear JavaFX developers:
>
>
>
> We would like to propose a new feature - rich text control, RichTextArea,
> intended to bridge the functional gap with Swing and its
> StyledEditorKit/JEditorPane.  The main design goal is to provide a control
> that is complete enough to be useful out-of-the box, as well as open to
> extension by the application developers.
>
>
>
> This is a complex feature with a large API surface that would be nearly
> impossible to get right the first time, even after an extensive review.  We
> are, therefore, introducing this in an incubating module,
> *javafx.incubator.richtext*.   This will allow us to evolve the API in
> future releases without the strict compatibility constraints that other
> JavaFX modules have.
>
>
>
> Please take a look at the proposal [0], a list of discussion points [1],
> and the API Specification (javadoc) [2]. While the proposed API is ready
> for review, it isn't complete nor set in stone. We are looking for
> feedback, and will update the proposal based on the suggestions we receive
> from the community.  We encourage you to comment either in the mailing
> list, or by leaving comments inline in a draft pull request [3].  For
> context, the links to the original RFE [4] and a list of missing APIs
> related to rich text [5] are provided below.
>
>
>
> Sincerely,
>
> Your friendly JavaFX development team.
>
>
>
>
>
> References
>
>
>
>
>
> [0] Proposal:
> https://github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextArea.md
>
> [1] Discussion points:
> https://github.com/andy-goryachev-oracle/Test/blob/rich.jep.review/doc/RichTextArea/RichTextAreaDiscussion.md
>
> [2] API specification (javadoc):
> https://cr.openjdk.org/~angorya/RichTextArea/javadoc
>
> [3] Draft Pull Request for API comments and feedback:
> https://github.com/openjdk/jfx/pull/1374
>
> [4] RichTextArea RFE: https://bugs.openjdk.org/browse/JDK-8301121
>
> [5] Missing APIs related to rich text control:
> https://bugs.openjdk.org/browse/JDK-8300569
>
>
>
>


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 `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, 2023 at 3:44 PM Eran Leshem  wrote:
>> >
>> > Hello,
>> >
>> >
>> >
>> > Can I contribute an implementation for
>> https://bugs.openjdk.org/browse/JDK-8090778?
>> >
>> >
>> >
>> > Eran
>> >
>> >
>>
>


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 strings (e.g. "#ccc")
> - with/without the leading #
> - nearest named color ("darkgoldenrod")
>
>
> On Sat, Dec 9, 2023 at 3:44 PM Eran Leshem  wrote:
> >
> > Hello,
> >
> >
> >
> > Can I contribute an implementation for
> https://bugs.openjdk.org/browse/JDK-8090778?
> >
> >
> >
> > Eran
> >
> >
>


Re: My JavaFX Christmas Wishlist

2023-11-15 Thread David Alayachew
My bigger question is asking what you lose by having AWT in JavaFX. Is
there something fundamentally problematic about it that its removal would
solve/alleviate a problem?

Whereas on the other hand, AWT has some very useful libraries that are in
use by nearly all Java GUI frameworks. For example, if you want to do
anything really complex with 2D Image work, you will inevitably end up
using java.awt.BufferedImage. It's simple, but very fast.

On Wed, Nov 15, 2023 at 12:18 PM Dirk Lemmermann 
wrote:

> 3D: unfortunately that is completely out of my comfort zone … for this
> feature request I am merely the messenger.
> AWT: I was thinking that this is mostly a refactoring and probably code
> duplication?
>
> Dirk
>
> Am 15.11.2023 um 14:28 schrieb Nir Lisker :
>
> 3D line and point primitives
>>
>
> I filed https://bugs.openjdk.org/browse/JDK-8316398 for this already. As
> noted, it requires a somewhat complex computation for intersections and
> possibly for contains. If you would like to write these Mesh classes, like
> the current TriangleMesh, I can write the rest.
>
> removal of AWT
>>
>
> Isn't that *a lot* of work? All the image IO is AWT, no?
>
> On Wed, Nov 15, 2023 at 10:48 AM Dirk Lemmermann 
> wrote:
>
>> Hi guys,
>>
>> I already mentioned this at the JavaFX BOF at DEVOXX and also posted this
>> on Twitter but wanna make sure it gets the visibility it deserves:
>>
>> All I want for Christmas is … / what I think is needed for JavaFX going
>> forward ...
>>
>> - removal of AWT
>> - a tray API (tray icon)
>> - undecorated interactive stage style
>> - blur support for stages
>> - WebP image format support
>> - native embedded browser (Chromium)
>> - 3D line and point primitives
>> - injection support in FXML for custom controls
>> - TableView improvements, aka. TableView2
>>
>> (order of items does not imply priority)
>>
>> Dirk
>>
>>
>