]> Git Server - tankstelle.git/commitdiff
Working better, many Bugfixes
authorRobin Cheney <cheneyr@eternal.ddnss.de>
Fri, 21 Nov 2025 10:25:19 +0000 (11:25 +0100)
committerRobin Cheney <cheneyr@eternal.ddnss.de>
Fri, 21 Nov 2025 10:25:19 +0000 (11:25 +0100)
16 files changed:
src/main/java/de/diejungsvondertanke/tankstelle/FuelType.java
src/main/java/de/diejungsvondertanke/tankstelle/Main.java
src/main/java/de/diejungsvondertanke/tankstelle/controllers/ControllerRegistry.java.old [deleted file]
src/main/java/de/diejungsvondertanke/tankstelle/controllers/FuelStationUIController.java
src/main/java/de/diejungsvondertanke/tankstelle/controllers/NewStationTabController.java
src/main/java/de/diejungsvondertanke/tankstelle/controllers/OverviewTabController.java
src/main/java/de/diejungsvondertanke/tankstelle/controllers/PriceTabController.java
src/main/java/de/diejungsvondertanke/tankstelle/controllers/ResultTabController.java
src/main/java/de/diejungsvondertanke/tankstelle/controllers/SearchTabController.java
src/main/java/de/diejungsvondertanke/tankstelle/controllers/StockTabController.java
src/main/java/de/diejungsvondertanke/tankstelle/ui/JFX.java
src/main/resources/icon/gasstation_4334.ico [new file with mode: 0644]
src/main/resources/icon/gasstation_4334.png [new file with mode: 0644]
src/main/resources/ui/NewStationTab.fxml
src/main/resources/ui/OverviewTab.fxml
src/main/resources/ui/ResultTab.fxml

index 24c36b093da520869bd8cd982246be1ca66294d7..31e1fde1de23d264868988edde1f5b69beb52f3e 100644 (file)
@@ -9,22 +9,28 @@ public enum FuelType {
     /**
      * Classic Super 95 gasoline
      */
-    SUPER,
+    SUPER("Super 95"),
     /**
      * Diesel (hopefully lead-free)
      */
-    DIESEL,
+    DIESEL("Diesel"),
     /**
      * If you want to feel like saving the planet: Now with at most 10% ethanol in
      * your gasoline
      */
-    SUPER_E10,
+    SUPER_E10("Super E10"),
     /**
      * Fancy premium diesel
      */
-    PREMIUM_DIESEL,
+    PREMIUM_DIESEL("Premium Diesel"),
     /**
      * Gas, Gas, Gas, I'm gonna step on the gas
      */
-    AUTOGAS
+    AUTOGAS("Car gas");
+
+    public String name;
+
+    private FuelType(String name) {
+        this.name = name;
+    }
 }
index 0ab25e4e2ced467a69f6a53fc3492b159c82d10e..ed8c8bcdb104cd8cb5edca3cffa92b8bd6c46e75 100644 (file)
@@ -31,18 +31,6 @@ public class Main {
      */
     public static ArrayList<FuelStation> fuelStations = new ArrayList<FuelStation>(Arrays.asList(initialFuelStations));
 
-    /**
-     * Main method
-     * 
-     * @param args Program arguments (not in use)
-     */
-    public static void main(String[] args) {
-        // javax.swing.SwingUtilities.invokeLater(() -> {
-        //     FuelStationUI ui = new FuelStationUI();
-        //     ui.setVisible(true);
-        // });
-    }
-
     /**
      * Get an array of fuel stations which have a number of vending machines
      * that is equal to {@code number_of_vending_machines}
diff --git a/src/main/java/de/diejungsvondertanke/tankstelle/controllers/ControllerRegistry.java.old b/src/main/java/de/diejungsvondertanke/tankstelle/controllers/ControllerRegistry.java.old
deleted file mode 100644 (file)
index 010b211..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-package de.diejungsvondertanke.tankstelle.controllers;
-
-public class ControllerRegistry {
-    private static FuelStationUIController main;
-
-    public static void registerMain(FuelStationUIController controller) {
-        main = controller;
-    }
-
-    public static FuelStationUIController getMain() {
-        return main;
-    }
-}
index 5b51804876f1d8766a609dd0e1e6a26eff173373..557253562f4d0c1c0bb4affa1d38229f710cd17b 100644 (file)
@@ -7,45 +7,21 @@ import de.diejungsvondertanke.tankstelle.*;
 import javafx.fxml.FXML;
 import javafx.fxml.FXMLLoader;
 import javafx.scene.Parent;
-import javafx.scene.control.*;
+import javafx.scene.control.Alert;
+import javafx.scene.control.ComboBox;
+import javafx.scene.control.ScrollPane;
+import javafx.scene.control.TabPane;
+import javafx.scene.control.TextArea;
 import javafx.scene.layout.BorderPane;
 import javafx.scene.layout.GridPane;
 import javafx.scene.layout.HBox;
 import javafx.scene.layout.Pane;
 
+/**
+ * Main controller class
+ */
 public class FuelStationUIController {
 
-    // @FXML
-    // public ComboBox<String> comboFuelStations;
-
-    // @FXML
-    // public ComboBox<FuelType> comboFuelTypes;
-
-    // @FXML
-    // private TabPane tabPane;
-
-    // // child controllers
-    // @FXML
-    // private HBox resultTab;
-
-    // @FXML
-    // private HBox priceTab;
-
-    // @FXML
-    // private HBox stockTab;
-
-    // @FXML
-    // private HBox searchTab;
-
-    // @FXML
-    // private HBox newStationTab;
-
-    // @FXML
-    // private HBox overviewTab;
-
-    // @FXML
-    // private TextArea outputArea;
-
     @FXML
     public ComboBox<String> comboFuelStations;
     @FXML
@@ -77,6 +53,19 @@ public class FuelStationUIController {
     private NewStationTabController newStationTabController;
     private OverviewTabController overviewTabController;
 
+    /**
+     * Automatically called initialize() function.
+     * 
+     * This is the "main" UI setup routine. For timing reasons, this will/must load
+     * every subtab manually to get the controller object and set the
+     * {@link FuelStationUIController} controller in every subtab controller
+     * element.
+     * 
+     * If not done correctly, using the controller in the subtabs WILL FAIL.
+     * 
+     * USING THE CONTROLLER OBJECT INSIDE THE {@code initialize()} FUNCTION OF THE
+     * SUBTABS IS NOT PERMITTED AND WILL ALWAYS BE {@code null} DUE TO TIMING
+     */
     @FXML
     public void initialize() {
         // Load all tabs manually and keep controllers
@@ -86,6 +75,7 @@ public class FuelStationUIController {
             loadTab("/ui/ResultTab.fxml", resultTabContainer, (ResultTabController c) -> {
                 resultTabController = c;
                 resultTabController.setParentController(this);
+                resultTabController.refreshList();
             });
             loadTab("/ui/PriceTab.fxml", priceTabContainer, (PriceTabController c) -> {
                 priceTabController = c;
@@ -108,7 +98,7 @@ public class FuelStationUIController {
                     (OverviewTabController c) -> {
                         overviewTabController = c;
                         overviewTabController.setParentController(this);
-                        overviewTabController.refresh();
+                        // overviewTabController.refresh();
                     });
 
         } catch (Exception e) {
@@ -118,32 +108,31 @@ public class FuelStationUIController {
         refreshStationNames();
     }
 
-    // Generic loader helper
-    // private <T> void loadTab(String fxmlPath, Parent placeholder,
-    // java.util.function.Consumer<T> controllerSetter) {
-    // try {
-    // FXMLLoader loader = new FXMLLoader(getClass().getResource(fxmlPath));
-    // Parent content = loader.load();
-    // T controller = loader.getController();
-    // controllerSetter.accept(controller);
-    // placeholder.getChildren().setAll(content);
-    // } catch (IOException e) {
-    // e.printStackTrace();
-    // }
-    // }
-
+    /**
+     * Generic tab loader helper
+     * 
+     * @param <T>                I have no idea what this does other than generalise
+     *                           the type for the consumer
+     * @param fxmlPath           Path to the .fxml resource file
+     * @param container          A container that inherits from {@link Parent}, for
+     *                           example {@link GridPane}, {@link HBoc} or
+     *                           {@link BorderPane}
+     * @param controllerConsumer A {@link Consumer} to
+     * @throws IOException If loading the Tab failed because the .fxml file was not
+     *                     found
+     */
     private <T> void loadTab(String fxmlPath, Parent container, Consumer<T> controllerConsumer) throws IOException {
         FXMLLoader loader = new FXMLLoader(getClass().getResource(fxmlPath));
         Parent loaded = loader.load();
         T controller = loader.getController();
 
         // Add loaded node to the container
-        if (container instanceof Pane pane) {
-            pane.getChildren().setAll(loaded);
+        if (container instanceof BorderPane border) {
+            border.setCenter(loaded);
         } else if (container instanceof ScrollPane scroll) {
             scroll.setContent(loaded);
-        } else if (container instanceof BorderPane border) {
-            border.setCenter(loaded);
+        } else if (container instanceof Pane pane) {
+            pane.getChildren().setAll(loaded);
         } else {
             throw new IllegalArgumentException("Unsupported container type: " + container.getClass());
         }
@@ -158,13 +147,23 @@ public class FuelStationUIController {
         return Main.fuelStations.get(idx);
     }
 
+    @FXML
     public void refreshStationNames() {
         comboFuelStations.getItems().setAll(
                 Main.fuelStations.stream()
                         .map(this::getDisplayName)
                         .toList());
+
+        resultTabController.refreshList();
+        overviewTabController.refresh();
     }
 
+    /**
+     * Create some display String for the fuel station lists in the UI
+     * 
+     * @param fs a {@link FuelStation} object to get the display name for
+     * @return the display name string
+     */
     public String getDisplayName(FuelStation fs) {
         int index = Main.fuelStations.indexOf(fs);
         if (index >= 0) {
index 7b7a7cec4650ca006ba2c4b5ed71fffbe2fbc0c4..d709f9afbc47c51df734cff3fded0ba883cf175b 100644 (file)
@@ -2,7 +2,8 @@ package de.diejungsvondertanke.tankstelle.controllers;
 
 import de.diejungsvondertanke.tankstelle.Main;
 import javafx.fxml.FXML;
-import javafx.scene.control.*;
+import javafx.scene.control.RadioButton;
+import javafx.scene.control.TextField;
 
 public class NewStationTabController {
 
index 799c57c65de11166b4bd04d1a11b7dcf2314109e..529caa85376ff00c83758761975f9ae7676bb98e 100644 (file)
@@ -1,10 +1,15 @@
 package de.diejungsvondertanke.tankstelle.controllers;
 
-import de.diejungsvondertanke.tankstelle.*;
+import de.diejungsvondertanke.tankstelle.Fuel;
+import de.diejungsvondertanke.tankstelle.FuelStation;
+import de.diejungsvondertanke.tankstelle.Main;
+import javafx.application.Platform;
 import javafx.beans.property.SimpleFloatProperty;
 import javafx.beans.property.SimpleIntegerProperty;
 import javafx.beans.property.SimpleStringProperty;
 import javafx.fxml.FXML;
+import javafx.scene.Node;
+import javafx.scene.Parent;
 import javafx.scene.control.TableColumn;
 import javafx.scene.control.TableView;
 
@@ -35,20 +40,33 @@ public class OverviewTabController {
 
     @FXML
     public void initialize() {
-        colStation.setCellValueFactory(data -> new SimpleStringProperty(data.getValue().station()));
-        colType.setCellValueFactory(data -> new SimpleStringProperty(data.getValue().type()));
-        colFuel.setCellValueFactory(data -> new SimpleStringProperty(data.getValue().fuel()));
-        colAmount.setCellValueFactory(data -> new SimpleFloatProperty(data.getValue().amount()).asObject());
-        colCapacity.setCellValueFactory(data -> new SimpleIntegerProperty(data.getValue().capacity()).asObject());
-        colPrice.setCellValueFactory(data -> new SimpleFloatProperty(data.getValue().price()).asObject());
+        colStation.setCellValueFactory(data -> new SimpleStringProperty(data.getValue().getStation()));
+        colType.setCellValueFactory(data -> new SimpleStringProperty(data.getValue().getType()));
+        colFuel.setCellValueFactory(data -> new SimpleStringProperty(data.getValue().getFuel()));
+        colAmount.setCellValueFactory(data -> new SimpleFloatProperty(data.getValue().getAmount()).asObject());
+        colCapacity.setCellValueFactory(data -> new SimpleIntegerProperty(data.getValue().getCapacity()).asObject());
+        colPrice.setCellValueFactory(data -> new SimpleFloatProperty(data.getValue().getPrice()).asObject());
     }
 
     @FXML
     public void refresh() {
         table.getItems().clear();
+        // ObservableList<FuelRow> list = FXCollections.observableArrayList();
+        // table.getItems().add(new FuelRow("TestStation", "TestType", "Diesel", 123,
+
+        // 999, 1.23f));
+        System.out.println("On FX thread? " + Platform.isFxApplicationThread());
 
         for (FuelStation station : Main.fuelStations) {
             for (Fuel f : station.fuels) {
+                // System.out.println("Row: " +
+                // parentController.getDisplayName(station) + " | " +
+                // station.getClass().getSimpleName() + " | " +
+                // f.FUEL_TYPE + " | " +
+                // f.getStored_amount() + " | " +
+                // f.CAPACITY + " | " +
+                // f.getPrice());
+
                 table.getItems().add(
                         new FuelRow(
                                 parentController.getDisplayName(station),
@@ -57,16 +75,94 @@ public class OverviewTabController {
                                 f.getStored_amount(),
                                 f.CAPACITY,
                                 f.getPrice()));
+                // System.out.println("Processed " + f.toString());
             }
         }
+        // System.out.print(list);
+        // table.setItems(list);
     }
 
-    public record FuelRow(
-            String station,
-            String type,
-            String fuel,
-            float amount,
-            int capacity,
-            float price) {
+    public static void printNodeTree(Node node, int depth) {
+        // Indentation
+        String indent = "  ".repeat(depth);
+
+        // Print this node
+        System.out.println(indent + node.getClass().getSimpleName()
+                + (node.getId() != null ? " [id=" + node.getId() + "]" : ""));
+
+        // If the node is a Parent, get its children and recurse
+        if (node instanceof Parent parent) {
+            for (Node child : parent.getChildrenUnmodifiable()) {
+                printNodeTree(child, depth + 1);
+            }
+        }
+    }
+
+    public class FuelRow {
+
+        String station;
+        String type;
+        String fuel;
+        float amount;
+        int capacity;
+        float price;
+
+        public String getStation() {
+            return station;
+        }
+
+        public void setStation(String station) {
+            this.station = station;
+        }
+
+        public String getType() {
+            return type;
+        }
+
+        public void setType(String type) {
+            this.type = type;
+        }
+
+        public String getFuel() {
+            return fuel;
+        }
+
+        public void setFuel(String fuel) {
+            this.fuel = fuel;
+        }
+
+        public float getAmount() {
+            return amount;
+        }
+
+        public void setAmount(float amount) {
+            this.amount = amount;
+        }
+
+        public int getCapacity() {
+            return capacity;
+        }
+
+        public void setCapacity(int capacity) {
+            this.capacity = capacity;
+        }
+
+        public float getPrice() {
+            return price;
+        }
+
+        public void setPrice(float price) {
+            this.price = price;
+        }
+
+        public FuelRow(String station, String type, String fuel, float amount, int capacity, float price) {
+            this.station = station;
+            this.type = type;
+            this.fuel = fuel;
+            this.amount = amount;
+            this.capacity = capacity;
+            this.price = price;
+        }
+
     }
 }
index 1201e9beb7af4219c1dc93d251f043ea582b2cf2..4a4df4e212dd629fc92381785d86c8fa188bab80 100644 (file)
@@ -36,6 +36,7 @@ public class PriceTabController {
                     .formatted(type, parentController.getDisplayName(station), price));
 
             txtPrice.clear();
+            parentController.refreshStationNames();
 
         } catch (NumberFormatException ex) {
             parentController.showError("Invalid number.");
index ffcbc125eda05957c7bfe45f91d440683382c475..194fe68d4bee0050e9921c350aa1e69d624183f6 100644 (file)
@@ -1,9 +1,12 @@
 package de.diejungsvondertanke.tankstelle.controllers;
 
-import de.diejungsvondertanke.tankstelle.*;
+import de.diejungsvondertanke.tankstelle.FuelStation;
+import de.diejungsvondertanke.tankstelle.FuelType;
+import de.diejungsvondertanke.tankstelle.Main;
 import de.diejungsvondertanke.tankstelle.error.NoSuchFuelTypeError;
 import javafx.fxml.FXML;
 import javafx.scene.control.ListView;
+import javafx.scene.control.SelectionMode;
 
 public class ResultTabController {
 
@@ -11,6 +14,11 @@ public class ResultTabController {
     private ListView<String> listFuelStations;
     private FuelStationUIController parentController;
 
+    @FXML
+    public void initialize() {
+        listFuelStations.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
+    }
+
     public void setParentController(FuelStationUIController parentController) {
         this.parentController = parentController;
     }
index 65e5bf62ff3f3b01bcb3902ef1c398b6ab728fe8..0feddfb58dc7fcb4b3896dc0289e335af55ab855 100644 (file)
@@ -1,6 +1,8 @@
 package de.diejungsvondertanke.tankstelle.controllers;
 
-import de.diejungsvondertanke.tankstelle.*;
+import de.diejungsvondertanke.tankstelle.FuelStation;
+import de.diejungsvondertanke.tankstelle.FuelType;
+import de.diejungsvondertanke.tankstelle.Main;
 import de.diejungsvondertanke.tankstelle.error.NoSuchFuelTypeError;
 import javafx.fxml.FXML;
 
index 2a8aa96c4183eb867667f03dd6d155cbe4da54be..01562ac6bead073d9dd8f6446720fcf508d55ca7 100644 (file)
@@ -1,9 +1,12 @@
 package de.diejungsvondertanke.tankstelle.controllers;
 
-import de.diejungsvondertanke.tankstelle.*;
+import de.diejungsvondertanke.tankstelle.Fuel;
+import de.diejungsvondertanke.tankstelle.FuelStation;
+import de.diejungsvondertanke.tankstelle.FuelType;
 import de.diejungsvondertanke.tankstelle.error.NoSuchFuelTypeError;
 import javafx.fxml.FXML;
-import javafx.scene.control.*;
+import javafx.scene.control.RadioButton;
+import javafx.scene.control.TextField;
 
 public class StockTabController {
 
@@ -50,6 +53,7 @@ public class StockTabController {
                     return;
                 }
                 station.set_stored_amount(value, type);
+                parentController.refreshStationNames();
                 parentController.appendOutput("Stock of %s at %s set to %.2f L"
                         .formatted(type, parentController.getDisplayName(station), value));
             } else {
@@ -59,6 +63,7 @@ public class StockTabController {
                     return;
                 }
                 station.add_stored_amount(value, type);
+                parentController.refreshStationNames();
                 parentController.appendOutput("Stock of %s at %s changed by %.2f L"
                         .formatted(type, parentController.getDisplayName(station), value));
             }
index 5e2d1cf1fb3d8401bffb1c8768b4f5316eeda32b..659572a5d08ed51179c12b892bd7cea04c83b067 100644 (file)
@@ -8,6 +8,7 @@ import javafx.application.Application;
 import javafx.fxml.FXMLLoader;
 import javafx.scene.Parent;
 import javafx.scene.Scene;
+import javafx.scene.image.Image;
 import javafx.stage.Stage;
 
 public class JFX extends Application {
@@ -17,15 +18,18 @@ public class JFX extends Application {
     public static FuelStationUIController controller;
 
     static Parent parent;
+    static Scene scene;
 
     @Override
     public void start(Stage s) throws Exception {
         stage = s;
         Parent parent = loadFXML("FuelStationUI");
-        Scene scene = new Scene(parent);
+        scene = new Scene(parent);
 
         stage.setScene(scene);
         stage.setTitle("Fuel Station Management System");
+        stage.getIcons().add(new Image(getClass().getResourceAsStream("/icon/gasstation_4334.png")));
+        initializeKeybinds();
         stage.show();
     }
 
@@ -39,4 +43,60 @@ public class JFX extends Application {
         controller = fxmlLoader.getController();
         return parent;
     }
+
+    /**
+     * Set the keybinds and set the default closing behaviour to run the quit()
+     * function
+     */
+    private void initializeKeybinds() {
+        // Override the default close behaviour
+        stage.setOnCloseRequest((e) -> {
+            exit();
+        });
+        stage.setFullScreenExitKeyCombination(null);
+
+        // register keybinds here
+        scene.setOnKeyPressed((e) -> {
+            switch (e.getCode()) {
+                case ENTER:
+                    if (e.isAltDown()) {
+                        if (stage.isFullScreen())
+                            stage.setFullScreen(false);
+                        else
+                            stage.setFullScreen(true);
+
+                    }
+                    break;
+                case F11:
+
+                    if (stage.isFullScreen())
+                        stage.setFullScreen(false);
+                    else
+                        stage.setFullScreen(true);
+                    break;
+
+                case F12:
+                    if (stage.isMaximized())
+                        stage.setMaximized(false);
+                    else
+                        stage.setMaximized(true);
+                    break;
+
+                default:
+                    break;
+            }
+        });
+    }
+
+    void exit() {
+        System.exit(0);
+    }
+
+    void exit(int status) {
+        System.exit(status);
+    }
+
+    private void quit() {
+        System.out.println("Exiting program, have a nice day :)");
+    }
 }
diff --git a/src/main/resources/icon/gasstation_4334.ico b/src/main/resources/icon/gasstation_4334.ico
new file mode 100644 (file)
index 0000000..e2d0d80
Binary files /dev/null and b/src/main/resources/icon/gasstation_4334.ico differ
diff --git a/src/main/resources/icon/gasstation_4334.png b/src/main/resources/icon/gasstation_4334.png
new file mode 100644 (file)
index 0000000..484cc27
Binary files /dev/null and b/src/main/resources/icon/gasstation_4334.png differ
index 6d91c64881ec27ae304866d682dc0b6e870bfe82..b89ca723252b029d3cf8c0207c2ccb0bab862cb8 100644 (file)
@@ -7,12 +7,14 @@
        fx:controller="de.diejungsvondertanke.tankstelle.controllers.NewStationTabController"
        hgap="10" vgap="10">
        <padding>
-              <Insets top="15" right="15" bottom="15" left="15"/>
+              <Insets top="15" right="15" bottom="15" left="15" />
        </padding>
 
        <Label text="Type:" GridPane.rowIndex="0" GridPane.columnIndex="0" />
 
-       <ToggleGroup fx:id="group" />
+       <fx:define>
+              <ToggleGroup fx:id="group" />
+       </fx:define>
        <RadioButton fx:id="rbSmall" text="Small" selected="true"
               toggleGroup="$group"
               GridPane.rowIndex="1" GridPane.columnIndex="0" />
index 22f89d1eb018ce3b1a331d95e3d61c0d20d801d2..174f1cee6028634db1814806ae54ce04fd134b00 100644 (file)
@@ -5,28 +5,32 @@
 
 <BorderPane xmlns:fx="http://javafx.com/fxml"
     fx:controller="de.diejungsvondertanke.tankstelle.controllers.OverviewTabController"
+    fx:id="overviewTabContainer"
 >
     <padding>
-        <Insets top="15" right="15" bottom="15" left="15"/>
+        <Insets top="15" right="15" bottom="15" left="15" />
     </padding>
 
     <top>
-        <HBox spacing="10">
+        <HBox spacing="10" HBox.hgrow="ALWAYS">
             <Label text="Overview of all fuels" />
             <Button text="Refresh" onAction="#refresh" />
         </HBox>
     </top>
 
     <center>
-        <TableView fx:id="table">
-            <columns>
-                <TableColumn fx:id="colStation" text="Fuel Station" />
-                <TableColumn fx:id="colType" text="Station Type" />
-                <TableColumn fx:id="colFuel" text="Fuel" />
-                <TableColumn fx:id="colAmount" text="Amount (L)" />
-                <TableColumn fx:id="colCapacity" text="Capacity (L)" />
-                <TableColumn fx:id="colPrice" text="Price (€/L)" />
-            </columns>
-        </TableView>
+        <VBox spacing="10" VBox.vgrow="ALWAYS">
+
+            <TableView fx:id="table" VBox.vgrow="ALWAYS">
+                <columns>
+                    <TableColumn fx:id="colStation" text="Fuel Station" />
+                    <TableColumn fx:id="colType" text="Station Type" />
+                    <TableColumn fx:id="colFuel" text="Fuel" />
+                    <TableColumn fx:id="colAmount" text="Amount (L)" />
+                    <TableColumn fx:id="colCapacity" text="Capacity (L)" />
+                    <TableColumn fx:id="colPrice" text="Price (€/L)" />
+                </columns>
+            </TableView>
+        </VBox>
     </center>
 </BorderPane>
\ No newline at end of file
index 4720bc71038516b33814be51371cc28879a83c7e..9ca23f00405e4df2b9ec3107e7f05de8c3cf89b2 100644 (file)
@@ -7,7 +7,7 @@
     fx:controller="de.diejungsvondertanke.tankstelle.controllers.ResultTabController"
     spacing="20">
     <padding>
-        <Insets top="15" right="15" bottom="15" left="15"/>
+        <Insets top="15" right="15" bottom="15" left="15" />
     </padding>
 
     <VBox spacing="10">
@@ -20,7 +20,7 @@
 
     <VBox spacing="10">
         <Label text="Fuel station selection (multiple):" />
-        <ListView fx:id="listFuelStations" prefWidth="220" />
+        <ListView fx:id="listFuelStations" prefWidth="220" multiple="true" />
     </VBox>
 
 </HBox>
\ No newline at end of file