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

Reduce node count in skin hierarchy for Labeled controls.

    Details

      Description

      A typical Labeled control, such as a text button, adds a hierarchy of five nodes to the scene graph. These are:

      - Button (extends Labeled)
      -- ButtonSkin (extends SkinBase)
      --- Label (extends Labeled)
      ---- LabelSkin (extends BaseSkin)
      ----- Text

      This can be reduced by two nodes by making the various skins for Labeled controls extend a LabeledSkinBase class, which directly manages the text and graphic nodes. The new hierarchy for the text button now becomes:

      - Button (extends Labeled)
      -- ButtonSkin (extends LabeledSkin)
      --- Text

      A new property "labelPadding" is needed on Labeled to manage the padding around the "label" part of composite Labeled controls, such as CheckBox, RadioButton, MenuButton, and SplitMenuButton. This property can be limited to be settable only from CSS with a key "-fx-label-padding", and can be made private in Labeled.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                leifs Leif Samuelsson (Inactive)
                Reporter:
                leifs Leif Samuelsson (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: