}
throw new NoSuchFuelTypeError("This fuel station does not have fuel of the given type");
}
+
+ public String getSimpleName() {
+ return null;
+ }
}
\ No newline at end of file
public String getSupermarket_company() {
return supermarket_company;
}
+
+ public String getSimpleName() {
+ return "large fuel station";
+ }
}
public float getRetail_space() {
return retail_space;
}
+
+ public String getSimpleName() {
+ return "medium fuel station";
+ }
}
public short getNumber_of_vending_machines() {
return number_of_vending_machines;
}
+
+ public String getSimpleName() {
+ return "small fuel station";
+ }
}
@FXML
private HBox resultTabContainer;
@FXML
- private GridPane priceTabContainer;
+ private VBox priceTabContainer;
@FXML
- private GridPane stockTabContainer;
+ private VBox stockTabContainer;
@FXML
private HBox searchTabContainer;
@FXML
- // private GridPane newStationTabContainer;
private VBox newStationTabContainer;
@FXML
private BorderPane overviewTabContainer;
public String getDisplayName(FuelStation fs) {
int index = Main.fuelStations.indexOf(fs);
if (index >= 0) {
- return "Station " + (index + 1) + " (" + fs.getClass().getSimpleName() + ")";
+ return "Station " + (index + 1) + " (" + fs.getSimpleName() + ")";
}
- return fs.getClass().getSimpleName();
+ return fs.getSimpleName();
}
public void appendOutput(String text) {
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
<Label text="Fuel station:" />
- <ComboBox fx:id="comboFuelStations" prefWidth="200" />
+ <ComboBox fx:id="comboFuelStations" />
<Label text="Fuel type:" />
- <ComboBox fx:id="comboFuelTypes" prefWidth="150" />
+ <ComboBox fx:id="comboFuelTypes" />
</HBox>
</top>
<HBox fx:id="resultTabContainer" />
</Tab>
<Tab text="Change price" closable="false">
- <GridPane fx:id="priceTabContainer" />
+ <VBox fx:id="priceTabContainer" />
</Tab>
<Tab text="Change stock" closable="false">
- <GridPane fx:id="stockTabContainer" />
+ <VBox fx:id="stockTabContainer" />
</Tab>
<Tab text="Search" closable="false">
<HBox fx:id="searchTabContainer" />
<fx:define>
<ToggleGroup fx:id="group" />
</fx:define>
- <RadioButton fx:id="rbSmall" text="Small" selected="true"
+ <RadioButton fx:id="rbSmall" text="Small " selected="true"
toggleGroup="$group"
onAction="#setAttributeTypeFromSmallStation" />
- <RadioButton fx:id="rbMedium" text="Medium"
+ <RadioButton fx:id="rbMedium" text="Medium "
toggleGroup="$group"
onAction="#setAttributeTypeFromMediumStation" />
- <RadioButton fx:id="rbLarge" text="Large"
+ <RadioButton fx:id="rbLarge" text="Large "
toggleGroup="$group"
onAction="#setAttributeTypeFromLargeStation" />
<?import javafx.scene.layout.*?>
<?import javafx.scene.control.*?>
-<GridPane xmlns:fx="http://javafx.com/fxml"
- fx:controller="de.diejungsvondertanke.tankstelle.controllers.PriceTabController"
- hgap="10" vgap="10">
- <padding>
- <Insets top="15" right="15" bottom="15" left="15"/>
- </padding>
+<VBox xmlns:fx="http://javafx.com/fxml"
+ fx:controller="de.diejungsvondertanke.tankstelle.controllers.PriceTabController">
+ <HBox VBox.vgrow="ALWAYS" spacing="10">
- <Label text="New price (€/L):" GridPane.rowIndex="0" GridPane.columnIndex="0" />
- <TextField fx:id="txtPrice" GridPane.rowIndex="0" GridPane.columnIndex="1" />
+ <padding>
+ <Insets top="15" right="15" bottom="15" left="15" />
+ </padding>
- <Button text="Change price" onAction="#save"
- GridPane.rowIndex="1" GridPane.columnIndex="0" GridPane.columnSpan="2" />
+ <Label text="New price (€ / L):" />
+ <TextField fx:id="txtPrice" />
-</GridPane>
\ No newline at end of file
+ <Button text="Change price" onAction="#save" />
+ </HBox>
+
+</VBox>
\ No newline at end of file
<HBox xmlns:fx="http://javafx.com/fxml"
fx:controller="de.diejungsvondertanke.tankstelle.controllers.ResultTabController"
- spacing="20">
+ spacing="20" HBox.hgrow="ALWAYS">
<padding>
<Insets top="15" right="15" bottom="15" left="15" />
</padding>
<Button text="Total stock (selection)" onAction="#handleTotalStock" />
</VBox>
- <VBox spacing="10">
+ <VBox spacing="10" HBox.hgrow="ALWAYS">
<Label text="Fuel station selection (multiple):" />
- <ListView fx:id="listFuelStations" prefWidth="220" />
+ <ListView fx:id="listFuelStations" HBox.hgrow="ALWAYS" />
</VBox>
</HBox>
\ No newline at end of file
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
-<GridPane xmlns:fx="http://javafx.com/fxml"
- fx:controller="de.diejungsvondertanke.tankstelle.controllers.StockTabController"
- hgap="10" vgap="10">
+<VBox xmlns:fx="http://javafx.com/fxml"
+ fx:controller="de.diejungsvondertanke.tankstelle.controllers.StockTabController" spacing="10">
<padding>
- <Insets top="15" right="15" bottom="15" left="15"/>
+ <Insets top="15" right="15" bottom="15" left="15" />
</padding>
+ <HBox>
+ <Label text="Amount (L): " />
+ <TextField fx:id="txtAmount" />
+ </HBox>
- <Label text="Amount (L):" GridPane.rowIndex="0" GridPane.columnIndex="0" />
- <TextField fx:id="txtAmount" GridPane.rowIndex="0" GridPane.columnIndex="1" />
+ <RadioButton fx:id="rbAbsolute" text="Set absolute" selected="true" />
+ <RadioButton fx:id="rbDelta" text="Change (+/-)" />
- <RadioButton fx:id="rbAbsolute" text="Set absolute" selected="true"
- GridPane.rowIndex="1" GridPane.columnIndex="0" GridPane.columnSpan="2" />
- <RadioButton fx:id="rbDelta" text="Change (+/-)"
- GridPane.rowIndex="2" GridPane.columnIndex="0" GridPane.columnSpan="2" />
-
- <Button text="Change stock" onAction="#save"
- GridPane.rowIndex="3" GridPane.columnIndex="0" GridPane.columnSpan="2" />
-</GridPane>
\ No newline at end of file
+ <Button text="Change stock" onAction="#save" />
+</VBox>
\ No newline at end of file