[announce] CodeAreaFX: text area with styled ranges of text
tomas.mikula at gmail.com
Tue Oct 8 16:39:18 PDT 2013
On Tue, Oct 8, 2013 at 9:08 PM, Jonathan Giles
<jonathan.giles at oracle.com> wrote:
> Very nice work! :-)
> The first step in the process to contribute features / bug fixes back
> into OpenJFX is to create a Jira issue (or find one that covers the
> topic). In the case of styled text ranges I don't believe a Jira issue
> exists, so feel free to open a new issue. This will be the way we can
> see what is popular and still outstanding in JavaFX, and of course
> discuss details.
> I'm not clear on how closely your approach is related to Tom's, but
> perhaps there is sufficient overlap there that you can collaborate.
I think the main differences are:
1. Tom's StyledTextArea assigns styles, while my CodeArea assigns
style classes. I think my approach is easier to work with, but less
powerful (you can only use styles pre-defined in a stylesheet, thus
you can't implement a rich text editor on top of CodeArea).
2. StyledTextArea's API assigns styles for the whole content at once,
CodeArea assigns one range at a time. I think both approaches have
their use and I plan to add support for batch assignment for
3. AFAIK, StyledTextArea does not support text selection.
4. Compared to TextArea, CodeArea supports detailed change events
(which part of text was replaced) via TextChangeListener
Not sure about StyledTextArea.
> may help to improve your API and implementation prior to it being
> considered for integration into OpenJFX, and will of course help to
> prevent duplication of effort.
I don't consider the API to be final, quite opposite, I expect changes
arising from the community and from my own needs. I'm open to feedback
> Keep up the great work and be sure to keep me in the loop of your
> progress :-)
> -- Jonathan
> On 8/10/2013 2:48 a.m., Tomas Mikula wrote:
>> Hi all,
>> I implemented a text control that supports assigning style classes to
>> portions of text. It is meant to be used for syntax highlighting.
>> The code is based on the original TextArea code. This implies the
>> license to be GPLv2 with the Classpath Exception. I would be happy to
>> contribute it back to the OpenJFX project.
>> The idea of using a ListView of TextFlows is borrowed from Tom
>> Schindl's StyledTextArea
>> Check out the demos and the APIs. Feedback really appreciated. Any
>> help with the issues
>> (https://github.com/TomasMikula/CodeAreaFX/wiki/Known-Issues) would be
More information about the openjfx-dev