Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8091854

Introduce Generics to Tab / TabPane

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx2.0.2
    • javafx

      It would be nice to have the Tabs being Tab<T extends Node> where T specifies the content node.

      Of course, this would influence TabPane also, especially in
      ObjectProperty<SingleSelectionModel<Tab>> selectionModel property, which I would expect to be an ObjectProperty<SingleSelectionModel<Tab<T extends Node>>.

      Part of the discussion will propably be why the container of the tabs (TabPane) needs to have knowledge about the content of contained tabs, especially as it is treatened like a black box. Though, benefits would mostly influence missing typecast which could be avoided then, especially by a

      T Tab#getContent()

      call.
      Having the need for different tab contents which can't be fused to one T within a TabPane won't let us loose anything as T as at least a Node anyway.

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported: