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

Print this page

        

*** 90,110 **** axis1 = new NumberAxis(0, 100, 10); axis2 = new NumberAxis(0, 100, 10); testedBubbleChart = getNewChart(); testedBubbleChart.setId(TESTED_CHART_ID); ! Button hardResetButton = ButtonBuilder.create().id(HARD_RESET_BUTTON_ID).text("Hard reset").build(); 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(); softResetButton.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent t) { //throw new UnsupportedOperationException("Not supported yet."); } }); --- 90,112 ---- axis1 = new NumberAxis(0, 100, 10); axis2 = new NumberAxis(0, 100, 10); testedBubbleChart = getNewChart(); testedBubbleChart.setId(TESTED_CHART_ID); ! 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 = 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."); } });
*** 124,135 **** } 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 serie!").id(REMOVE_BUTTON_ID).build(); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); testedBubbleChart.getData().remove(index); } --- 126,140 ---- } public HBox getRemoveDataDialog() { HBox hb = new HBox(); Label lb = new Label("From position"); ! final TextField tf = new TextField("0"); ! tf.setPrefWidth(50); ! tf.setId(REMOVE_ITEM_POS_TEXT_FIELD_ID); ! Button bt = new Button("Remove serie!"); ! bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int index = Integer.parseInt(tf.getText()); testedBubbleChart.getData().remove(index); }
*** 139,154 **** } public HBox getRemoveDataFromSerieDialog() { HBox hb = new HBox(); Label lb1 = new Label("From serie"); ! final TextField tf1 = TextFieldBuilder.create().text("0").prefWidth(50).build(); Label lb2 = new Label("from index"); ! final TextField tf2 = TextFieldBuilder.create().text("0").prefWidth(50).build(); ! Button bt = ButtonBuilder.create().text("remove bubble!").id(REMOVE_BUTTON_ID).build(); bt.setOnAction(new EventHandler() { public void handle(Event t) { int serie = Integer.parseInt(tf1.getText()); int index = Integer.parseInt(tf2.getText()); ((Series) testedBubbleChart.getData().get(serie)).getData().remove(index); --- 144,162 ---- } public HBox getRemoveDataFromSerieDialog() { HBox hb = new HBox(); Label lb1 = new Label("From serie"); ! final TextField tf1 = new TextField("0"); ! tf1.setPrefWidth(50); Label lb2 = new Label("from index"); ! final TextField tf2 = new TextField("0"); ! tf2.setPrefWidth(50); ! Button bt = new Button("remove bubble!"); ! bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int serie = Integer.parseInt(tf1.getText()); int index = Integer.parseInt(tf2.getText()); ((Series) testedBubbleChart.getData().get(serie)).getData().remove(index);
*** 159,183 **** } public HBox getAddBubbleToSerieDialog() { HBox hb = new HBox(); Label lb1 = new Label("To serie"); ! final TextField tf1 = TextFieldBuilder.create().text("0").prefWidth(50).build(); Label lb2 = new Label("to index"); ! final TextField tf2 = TextFieldBuilder.create().text("0").prefWidth(50).build(); Label lb3 = new Label("X"); ! final TextField tf3 = TextFieldBuilder.create().text("0").prefWidth(50).build(); Label lb4 = new Label("Y"); ! final TextField tf4 = TextFieldBuilder.create().text("0").prefWidth(50).build(); Label lb5 = new Label("R"); ! final TextField tf5 = TextFieldBuilder.create().text("0").prefWidth(50).build(); ! Button bt = ButtonBuilder.create().text("add bubble!").id(REMOVE_BUTTON_ID).build(); bt.setOnAction(new EventHandler() { public void handle(Event t) { int serie = Integer.parseInt(tf1.getText()); int index = Integer.parseInt(tf2.getText()); double X = Double.parseDouble(tf3.getText()); --- 167,197 ---- } public HBox getAddBubbleToSerieDialog() { HBox hb = new HBox(); Label lb1 = new Label("To serie"); ! final TextField tf1 = new TextField("0"); ! tf1.setPrefWidth(50); Label lb2 = new Label("to index"); ! final TextField tf2 = new TextField("0"); ! tf2.setPrefWidth(50); Label lb3 = new Label("X"); ! final TextField tf3 = new TextField("0"); ! tf3.setPrefWidth(50); Label lb4 = new Label("Y"); ! final TextField tf4 = new TextField("0"); ! tf4.setPrefWidth(50); Label lb5 = new Label("R"); ! final TextField tf5 = new TextField("0"); ! tf5.setPrefWidth(50); ! Button bt = new Button("add bubble!"); ! bt.setId(REMOVE_BUTTON_ID); bt.setOnAction(new EventHandler() { public void handle(Event t) { int serie = Integer.parseInt(tf1.getText()); int index = Integer.parseInt(tf2.getText()); double X = Double.parseDouble(tf3.getText());
*** 197,218 **** } 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(); Label minLabel = new Label(" min X,Y "); ! final TextField minText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID).build(); Label maxLabel = new Label(" max X,Y "); ! final TextField maxText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID).build(); Label amountLabel = new Label(" add "); ! final TextField amountText = TextFieldBuilder.create().prefWidth(50).id(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID).build(); ! Button bt = ButtonBuilder.create().text(" bubbles!").id(ADD_SERIES_COMMAND_BUTTON_ID).build(); 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()); --- 211,241 ---- } public HBox getAddItemHBox() { HBox hb = new HBox(); Label lb = new Label("Add series named "); ! final TextField tf = new TextField(); ! tf.setPrefWidth(50); ! tf.setId(ADDED_SERIES_NAME_TEXTFIELD_ID); Label minLabel = new Label(" min X,Y "); ! final TextField minText = new TextField(); ! minText.setPrefWidth(50); ! minText.setId(ADDED_SERIES_MIN_VALUE_TEXTFIELD_ID); Label maxLabel = new Label(" max X,Y "); ! final TextField maxText = new TextField(); ! maxText.setPrefWidth(50); ! maxText.setId(ADDED_SERIES_MAX_VALUE_TEXTFIELD_ID); Label amountLabel = new Label(" add "); ! final TextField amountText = new TextField(); ! amountText.setPrefWidth(50); ! amountText.setId(ADDED_SERIES_DOTS_COUNT_TEXTFIELD_ID); ! Button bt = new Button(" bubbles!"); ! 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());