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

Introduce Generics to Tab / TabPane

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: fx2.0.2
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Imported: