functional/ControlsTests/src/javafx/scene/control/test/chart/apps/NewStackedBarChartApp.java

Print this page

        

@@ -93,21 +93,23 @@
             axis1 = new CategoryAxis(existingCategories);
             axis2 = new NumberAxis(0, 100, 10);
             testedStackedBarChart = getNewChart();
             testedStackedBarChart.setId(TESTED_CHART_ID);
 
-            Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build();
+            Button hardResetButton = new Button("Hard reset");

+            hardResetButton.setId(HARD_RESET_BUTTON_ID);

             hardResetButton.setOnAction(new EventHandler<ActionEvent>() {
                 public void handle(ActionEvent t) {
                     HBox hb = (HBox) getRoot();
                     hb.getChildren().clear();
                     prepareMainSceneStructure();
                     prepareScene();
                 }
             });
 
-            Button softResetButton = ButtonBuilder.create().id(SOFT_RESET_BUTTON_ID).text("Soft reset").build();
+            Button softResetButton = new Button("Soft reset");

+            softResetButton.setId(SOFT_RESET_BUTTON_ID);

             softResetButton.setOnAction(new EventHandler<ActionEvent>() {
                 public void handle(ActionEvent t) {
                     //throw new UnsupportedOperationException("Not supported yet.");
                 }
             });

@@ -127,12 +129,15 @@
         }
 
         public HBox getRemoveDataDialog() {
             HBox hb = new HBox();
             Label lb = new Label("From position");
-            final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).id(REMOVE_ITEM_POS_TEXT_FIELD_ID).build();
-            Button bt = ButtonBuilder.create().text("Remove!").id(REMOVE_BUTTON_ID).build();
+            final TextField tf = new TextField("0");

+            tf.setPrefWidth(50);

+            tf.setId(REMOVE_ITEM_POS_TEXT_FIELD_ID);

+            Button bt = new Button("Remove!");

+            bt.setId(REMOVE_BUTTON_ID);

             bt.setOnAction(new EventHandler() {
                 public void handle(Event t) {
                     int index = Integer.parseInt(tf.getText());
                     testedStackedBarChart.getData().remove(index);
                 }

@@ -142,12 +147,13 @@
         }
 
         public HBox getRemoveCategoryDialog() {
             HBox hb = new HBox();
             Label lb = new Label("From index");
-            final TextField tf = TextFieldBuilder.create().text("0").prefWidth(50).build();
-            Button bt = ButtonBuilder.create().text("Remove category!").build();
+            final TextField tf = new TextField("0");

+            tf.setPrefWidth(50);

+            Button bt = new Button("Remove category!");

             bt.setOnAction(new EventHandler() {
                 public void handle(Event t) {
                     int index = Integer.parseInt(tf.getText());
                     existingCategories.remove(index);
                     axis1.getCategories().remove(index);

@@ -158,16 +164,18 @@
         }
 
         public HBox getAddCategoryDialog() {
             HBox hb = new HBox();
             Label lb = new Label("Category");
-            final TextField tf = TextFieldBuilder.create().text("").prefWidth(50).build();
+            final TextField tf = new TextField("");

+            tf.setPrefWidth(50);

 
             Label lind = new Label("to index");
-            final TextField tfind = TextFieldBuilder.create().text("0").prefWidth(50).build();
+            final TextField tfind = new TextField("0");

+            tfind.setPrefWidth(50);

 
-            Button bt = ButtonBuilder.create().text("Add!").build();
+            Button bt = new Button("Add!");

             bt.setOnAction(new EventHandler() {
                 public void handle(Event t) {
                     int index = Integer.parseInt(tfind.getText());
                     existingCategories.add(index, tf.getText());
                     axis1.getCategories().add(index, tf.getText());

@@ -178,22 +186,31 @@
         }
 
         public HBox getAddItemHBox() {
             HBox hb = new HBox();
             Label lb = new Label("Add series named ");
-            final TextField tf = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_NAME_TEXTFIELD_ID).build();
+            final TextField tf = new TextField();

+            tf.setPrefWidth(50);

+            tf.setId(ADDED_SERIES_NAME_TEXTFIELD_ID);

 
             Label minLabel = new Label(" min ");
-            final TextField minText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID).build();
+            final TextField minText = new TextField();

+            minText.setPrefWidth(50);

+            minText.setId(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID);

 
             Label maxLabel = new Label(" max ");
-            final TextField maxText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID).build();
+            final TextField maxText = new TextField();

+            maxText.setPrefWidth(50);

+            maxText.setId(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID);

 
             Label amountLabel = new Label(" amount ");
-            final TextField amountText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID).build();
+            final TextField amountText = new TextField();

+            amountText.setPrefWidth(50);

+            amountText.setId(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID);

 
-            Button bt = ButtonBuilder.create().text("Add!").id(ADD_SERIES_COMMAND_BUTTON_ID).build();
+            Button bt = new Button("Add!");

+            bt.setId(ADD_SERIES_COMMAND_BUTTON_ID);

             bt.setOnAction(new EventHandler() {
                 public void handle(Event t) {
                     String serieName = tf.getText();
                     double min = Double.parseDouble(minText.getText());
                     double max = Double.parseDouble(maxText.getText());