Summary
Add constructors to SplitMenuButton to match its superclass MenuButton.
Problem
SplitMenuButton class, which extends MenuButton class and is rather similar, is missing constructors that allow for specifying the button text and/or graphic.
Solution
Solution is to add missing constructors.
Specification
+ /**
+ * Creates a new empty split menu button with the given text to display on the
+ * button. Use {@link #setGraphic(Node)} and {@link #getItems()} to set the
+ * content.
+ *
+ * @param text the text to display on the menu button
+ * @since 24
+ */
+ public SplitMenuButton(String text) {
+
+ /**
+ * Creates a new empty split menu button with the given text and graphic to
+ * display on the button. Use {@link #getItems()} to set the content.
+ *
+ * @param text the text to display on the menu button
+ * @param graphic the graphic to display on the menu button
+ * @since 24
+ */
+ public SplitMenuButton(String text, Node graphic) {
+
+ /**
+ * Creates a new split menu button with the given text and graphic to
+ * display on the button, and inserts the given items
+ * into the {@link #getItems() items} list.
+ *
+ * @param text the text to display on the menu button
+ * @param graphic the graphic to display on the menu button
+ * @param items the items to display in the popup menu
+ * @since 24
+ */
+ public SplitMenuButton(String text, Node graphic, MenuItem... items) {
- csr of
-
JDK-8338016 SplitMenuButton constructors should match MenuButton
-
- Resolved
-