Removing the location text field. Not needed for server+browser packaged application
1.1 --- a/rt/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/impl/FXBrwsr.java Wed Mar 20 08:41:40 2013 +0100
1.2 +++ b/rt/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/impl/FXBrwsr.java Wed Mar 20 08:48:06 2013 +0100
1.3 @@ -76,31 +76,12 @@
1.4 view.setMinSize(500, 400);
1.5 view.setPrefSize(500, 400);
1.6 final WebEngine eng = view.getEngine();
1.7 - final TextField locationField = new TextField();
1.8 LOG.log(Level.FINE, "params : {0}", params);
1.9 if (params.size() > 0) {
1.10 LOG.log(Level.FINE, "loading page {0}", params.get(0));
1.11 eng.load(params.get(0));
1.12 LOG.fine("done loading page ");
1.13 - locationField.setText(params.get(0));
1.14 }
1.15 - locationField.setMaxHeight(Double.MAX_VALUE);
1.16 - Button goButton = new Button("Go");
1.17 - goButton.setDefaultButton(true);
1.18 - EventHandler<ActionEvent> goAction = new EventHandler<ActionEvent>() {
1.19 - @Override
1.20 - public void handle(ActionEvent event) {
1.21 - eng.load(locationField.getText().startsWith("http://") ? locationField.getText() : "http://" + locationField.getText());
1.22 - }
1.23 - };
1.24 - goButton.setOnAction(goAction);
1.25 - locationField.setOnAction(goAction);
1.26 - eng.locationProperty().addListener(new ChangeListener<String>() {
1.27 - @Override
1.28 - public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {
1.29 - locationField.setText(newValue);
1.30 - }
1.31 - });
1.32 eng.setOnAlert(new EventHandler<WebEvent<String>>() {
1.33 @Override
1.34 public void handle(WebEvent<String> t) {
1.35 @@ -139,11 +120,9 @@
1.36 GridPane grid = new GridPane();
1.37 grid.setVgap(5);
1.38 grid.setHgap(5);
1.39 - GridPane.setConstraints(locationField, 0, 0, 1, 1, HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.SOMETIMES);
1.40 - GridPane.setConstraints(goButton, 1, 0);
1.41 GridPane.setConstraints(view, 0, 1, 2, 1, HPos.CENTER, VPos.CENTER, Priority.ALWAYS, Priority.ALWAYS);
1.42 grid.getColumnConstraints().addAll(new ColumnConstraints(100, 100, Double.MAX_VALUE, Priority.ALWAYS, HPos.CENTER, true), new ColumnConstraints(40, 40, 40, Priority.NEVER, HPos.CENTER, true));
1.43 - grid.getChildren().addAll(locationField, goButton, view);
1.44 + grid.getChildren().addAll(view);
1.45 getChildren().add(grid);
1.46 }
1.47