added corret license
/*
- * Copyright 2006-2018 The MZmine 2 Development Team
+ * Copyright 2006-2020 The MZmine Development Team
*
- * This file is part of MZmine 2.
+ * This file is part of MZmine.
*
- * MZmine 2 is free software; you can redistribute it and/or modify it under the terms of the GNU
+ * MZmine is free software; you can redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
- * MZmine 2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * MZmine is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+ * Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with MZmine 2; if not,
+ * You should have received a copy of the GNU General Public License along with MZmine; if not,
* write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
@@ -38,15 +38,11 @@ public class ElementsTableComponent extends FlowPane {
private final ObservableList<ElementsValue> elementsValues = FXCollections.observableArrayList();
private final TableView<ElementsValue> elementsValueTable = new TableView();
-
public ElementsTableComponent() {
elementsValueTable.setEditable(true);
elementsValueTable.prefHeightProperty().bind(Bindings.size(elementsValueTable.getItems()).
multiply(elementsValueTable.getFixedCellSize()).add(300));
- for (TableColumn<ElementsValue, ?> column : elementsValueTable.getColumns()) {
- column.setPrefWidth(elementsValueTable.getWidth() / elementsValueTable.getColumns().size());
- }
// allows the individual cells to be selected
@@ -55,7 +51,7 @@ public class ElementsTableComponent extends FlowPane {
TableColumn<ElementsValue, String> maxCol = new TableColumn("Max");
TableColumn<ElementsValue, String> minCol = new TableColumn("Min");
- // Make Column editibale
+ // Make Column editable
maxCol.setCellFactory(TextFieldTableCell.forTableColumn());
maxCol.setOnEditCommit(event -> event.getTableView().getItems().get(event.getTablePosition().
getRow()).setMax(event.getNewValue()));
@@ -96,14 +92,14 @@ public class ElementsTableComponent extends FlowPane {
});
this.setPadding(new Insets(5, 0, 0, 5));
- this.setHgap(10d);
elementsValueTable.getColumns().addAll(elementCol, minCol, maxCol);
HBox hBox = new HBox();
hBox.getChildren().addAll(addButton, removeButton);
- hBox.setSpacing(5);
+ hBox.setSpacing(10);
this.getChildren().addAll(elementsValueTable,hBox);
+ this.setHgap(10d);
this.setAlignment(Pos.BASELINE_RIGHT);
}
