functional/FXCssTests/src/test/css/controls/ComplexButtonCssTests.java

Print this page

        

*** 22,33 **** * or visit www.oracle.com if you need additional information or have any * questions. */ package test.css.controls; ! import javafx.scene.control.ButtonBuilder; ! import javafx.scene.control.ToolBarBuilder; import javafx.scene.layout.Pane; import test.javaclient.shared.BasicButtonChooserApp; import test.javaclient.shared.PageWithSlots; import test.javaclient.shared.ScrollablePageWithSlots; import test.javaclient.shared.TestNode; --- 22,33 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ package test.css.controls; ! import javafx.scene.control.Button; ! import javafx.scene.control.ToolBar; import javafx.scene.layout.Pane; import test.javaclient.shared.BasicButtonChooserApp; import test.javaclient.shared.PageWithSlots; import test.javaclient.shared.ScrollablePageWithSlots; import test.javaclient.shared.TestNode;
*** 67,87 **** private PageWithSlots getPageSlot(Pages page) { PageWithSlots pageWithSlot = new PageWithSlots(page.name(), WIDTH, HEIGHT); Pane slot = new Pane(); slot.setPrefSize(200, 200); if (page == Pages.IPHONE_TOOLBAR) { ! slot.getChildren().add(ToolBarBuilder.create() ! .id(page.name().toLowerCase()) ! .items( ! ButtonBuilder.create().text("iPhone").id("iphone").build()) ! .build()); } else { ! slot.getChildren().add(ButtonBuilder.create() ! .text("Button") ! .id(page.name().toLowerCase()) ! .minWidth(100) ! .build()); } pageWithSlot.add(new TestNodeLeaf(page.name(), slot)); return pageWithSlot; } --- 67,86 ---- private PageWithSlots getPageSlot(Pages page) { PageWithSlots pageWithSlot = new PageWithSlots(page.name(), WIDTH, HEIGHT); Pane slot = new Pane(); slot.setPrefSize(200, 200); if (page == Pages.IPHONE_TOOLBAR) { ! Button b = new Button("iPhone"); ! b.setId("iphone"); ! ToolBar temp = new ToolBar(b); ! temp.setId(page.name().toLowerCase()); ! slot.getChildren().add(temp); } else { ! Button temp = new Button("Button"); ! temp.setId(page.name().toLowerCase()); ! temp.setMinWidth(100); ! slot.getChildren().add(temp); } pageWithSlot.add(new TestNodeLeaf(page.name(), slot)); return pageWithSlot; }