Introduce Generics to Tab / TabPane

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: fx2.0.2
    • Component/s: 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.

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

              Created:
              Updated:
              Imported: