Skip to content

Commit

Permalink
Aggiunta icona e sistemato bug di mirko
Browse files Browse the repository at this point in the history
  • Loading branch information
NoeMurr committed Mar 2, 2018
1 parent 1d1cc6a commit df08f4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/it/teamunivr/powerstrips/UnivrPowerStripManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;

Expand All @@ -21,7 +22,7 @@ public void start(Stage primaryStage) {
this.primaryStage.setTitle("Ciabatte Univr");
this.primaryStage.setResizable(false);

//aggiungi spiegazione
primaryStage.getIcons().add(new Image(UnivrPowerStripManager.class.getResourceAsStream("resources/icon.png")));


initRootLayout();
Expand Down
6 changes: 6 additions & 0 deletions src/it/teamunivr/powerstrips/view/MainController.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ public void onAddButton() {
lastName.setStyle(null);
}

if (comboBoxTypes.getValue() == null || comboBoxIDs.getValue() == null) {
return;
}

Loan tmp = new Loan(name.getText(), lastName.getText(),
String.format("%s: %s", comboBoxTypes.getValue(), comboBoxIDs.getValue()));

Expand Down Expand Up @@ -152,6 +156,8 @@ private class ButtonCell extends TableCell<Record, Boolean> {

IDs.get(observableKeys.indexOf(parts[0])).add(parts[1]);
FXCollections.sort(IDs.get(observableKeys.indexOf(parts[0])));

comboBoxIDs.getSelectionModel().selectFirst();
}
);
}
Expand Down

0 comments on commit df08f4f

Please sign in to comment.