Tagging UI control

Richard Bair richard.bair at oracle.com
Mon Sep 8 14:49:40 UTC 2014

I tried writing one once just using a TextField, but it ended up being very difficult. With the TextFlow as a basis instead, it might be easier. You can also do it out of a composite of controls as you mention here, depending on the user experience you are looking for with the control. I would probably look at a few JS/HTML implementations and see what they do, we have the same basic rules (scene graph) so the concepts should map pretty well across I expect.

On Sep 8, 2014, at 4:15 AM, Mike Hearn <mike at plan99.net> wrote:

> I've not encountered one, but building such a thing should be quite
> straightforward. You could use CSS to create a text-area like rectangle
> with an HBox inside it, and then have a no-border textedit that simply
> expands to fill the available space. When the user presses enter you create
> an appropriately styled label with the contained text and insert it to the
> left of the edit in the hbox. Tweak CSS and spacing and you have a basic
> tagging control.
> On Mon, Sep 8, 2014 at 10:02 AM, Robert Krüger <krueger at lesspain.de> wrote:
>> Hi,
>> how would one go about implementing (i.e. use which api) a tagging
>> control (e.g. like http://xoxco.com/projects/code/tagsinput/) in JFX
>> or is this already available in an existing extension library?
>> Is this easily done with a bit of text parsing and CSS magic or as
>> fiddely as building a rich text editor or does it even make sense to
>> build this by integrating a web component and using an existing
>> javascript-based solution (which feels a bit odd)?
>> Thanks in advance for any opinions/pointers.
>> Robert

More information about the openjfx-dev mailing list