summaryrefslogtreecommitdiffstats
path: root/src/de/fhswf/in/inf/se/projektthemenvergabe/view
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/fhswf/in/inf/se/projektthemenvergabe/view')
-rw-r--r--src/de/fhswf/in/inf/se/projektthemenvergabe/view/ProjektHinzufuegen.fxml8
-rw-r--r--src/de/fhswf/in/inf/se/projektthemenvergabe/view/ProjektHinzufuegenController.java22
2 files changed, 26 insertions, 4 deletions
diff --git a/src/de/fhswf/in/inf/se/projektthemenvergabe/view/ProjektHinzufuegen.fxml b/src/de/fhswf/in/inf/se/projektthemenvergabe/view/ProjektHinzufuegen.fxml
index 1ce4cf7..d7c5fb2 100644
--- a/src/de/fhswf/in/inf/se/projektthemenvergabe/view/ProjektHinzufuegen.fxml
+++ b/src/de/fhswf/in/inf/se/projektthemenvergabe/view/ProjektHinzufuegen.fxml
@@ -95,7 +95,7 @@
</GridPane.margin>
<children>
<ComboBox fx:id="ansprechpartnerComboBox" prefHeight="25.0" prefWidth="500.0" />
- <Button mnemonicParsing="false" onAction="#handleResetAnsprechpartner" prefWidth="400.0" text="Zurücksetzen" />
+ <Button fx:id="ansprechpartnerComboBoxReset" mnemonicParsing="false" onAction="#handleResetAnsprechpartner" prefWidth="400.0" text="Zurücksetzen" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" GridPane.columnIndex="1" GridPane.rowIndex="5">
@@ -104,7 +104,7 @@
</GridPane.margin>
<children>
<ComboBox fx:id="student1ComboBox" prefHeight="25.0" prefWidth="500.0" />
- <Button mnemonicParsing="false" onAction="#handleResetStudent1" prefWidth="400.0" text="Zurücksetzen" />
+ <Button fx:id="student1ComboBoxReset" mnemonicParsing="false" onAction="#handleResetStudent1" prefWidth="400.0" text="Zurücksetzen" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" GridPane.columnIndex="1" GridPane.rowIndex="6">
@@ -113,7 +113,7 @@
</GridPane.margin>
<children>
<ComboBox fx:id="student2ComboBox" prefHeight="25.0" prefWidth="500.0" />
- <Button mnemonicParsing="false" onAction="#handleResetStudent2" prefWidth="400.0" text="Zurücksetzen" />
+ <Button fx:id="student2ComboBoxReset" mnemonicParsing="false" onAction="#handleResetStudent2" prefWidth="400.0" text="Zurücksetzen" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" GridPane.columnIndex="1" GridPane.rowIndex="7">
@@ -122,7 +122,7 @@
</GridPane.margin>
<children>
<ComboBox fx:id="student3ComboBox" minHeight="-Infinity" prefHeight="25.0" prefWidth="500.0" />
- <Button mnemonicParsing="false" onAction="#handleResetStudent3" prefWidth="400.0" text="Zurücksetzen" />
+ <Button fx:id="student3ComboBoxReset" mnemonicParsing="false" onAction="#handleResetStudent3" prefWidth="400.0" text="Zurücksetzen" />
</children>
</HBox>
<TextField fx:id="projektthemaTextField" prefWidth="500.0" GridPane.columnIndex="1">
diff --git a/src/de/fhswf/in/inf/se/projektthemenvergabe/view/ProjektHinzufuegenController.java b/src/de/fhswf/in/inf/se/projektthemenvergabe/view/ProjektHinzufuegenController.java
index 65fa98c..1ed5f8e 100644
--- a/src/de/fhswf/in/inf/se/projektthemenvergabe/view/ProjektHinzufuegenController.java
+++ b/src/de/fhswf/in/inf/se/projektthemenvergabe/view/ProjektHinzufuegenController.java
@@ -38,15 +38,27 @@ public class ProjektHinzufuegenController
private ComboBox<Ansprechpartner> ansprechpartnerComboBox;
@FXML
+ private Button ansprechpartnerComboBoxReset;
+
+ @FXML
private ComboBox<Student> student1ComboBox;
@FXML
+ private Button student1ComboBoxReset;
+
+ @FXML
private ComboBox<Student> student2ComboBox;
@FXML
+ private Button student2ComboBoxReset;
+
+ @FXML
private ComboBox<Student> student3ComboBox;
@FXML
+ private Button student3ComboBoxReset;
+
+ @FXML
private TextArea dozentenkommentar;
@FXML
@@ -94,6 +106,16 @@ public class ProjektHinzufuegenController
.and(student2ComboBox.valueProperty().isNull().and(
student3ComboBox.valueProperty().isNull())))));
+ // Bind reset button disabled state to combobox
+ ansprechpartnerComboBoxReset.disableProperty()
+ .bind(ansprechpartnerComboBox.disabledProperty());
+ student1ComboBoxReset.disableProperty()
+ .bind(student1ComboBox.disabledProperty());
+ student2ComboBoxReset.disableProperty()
+ .bind(student2ComboBox.disabledProperty());
+ student3ComboBoxReset.disableProperty()
+ .bind(student3ComboBox.disabledProperty());
+
if (projekt != null)
{
if (!projekt.getStatus().equals(Projekt.StatusTypes.IN_BEARBEITUNG)