Noel Grandin <[email protected]> wrote:
That is the same approach Swing uses.

No it's not, because Swing doesn't pass any events to the cell renderer. (Neither does Pivot.)

And it has the same problems - getting events into and out of the cell
is tricky and means that the cell component needs various bits of
tweaking to cope properly with things like focus gain/release.

True, it can be tricky. But the tricky part has been dealt with by the JavaFX team, so it is not left to the framework user.

Also saving/restoring the cell's state can lead to very odd things
happening when people forget to save or restore all of the state.

That's why they force the use of binding.

I'm in two minds about this. Personally, I try where-ever possible to
avoid using the Swing components that do this (JTable) in favour of
putting real components into real containers.

However, there are a very few use-cases (editable tables containing very
large numbers of rows) that can benefit from this approach.

I think using components in tables is a pretty common use case in modern applications. Examples:
- a link button, to navigate to detail panes
- an expander, to show additional row details
- a movie component, displaying a YouTube video (yes, I'm serious, and JavaFX is capable of this) - any input component (such as TextInput etc) that you want to show immediately without forcing the user to enter edit mode explicitly

Dirk.



Reply via email to