diff --git a/.classpath b/.classpath index a0b1bcc17fcae0d5d9653c26d4292a340e8b73e7..1eab1ce9b2dd0933f8b9fd93cba50029f679d079 100644 --- a/.classpath +++ b/.classpath @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry excluding="core/CreateMe.java|core/CurrentWork.java|userInterface/CopyOfUserInterfaceController.java|userInterface/Save.java" kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.fx.ide.jdt.core.JAVAFX_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/controlsfx"/> <classpathentry combineaccessrules="false" kind="src" path="/_Tools"/> <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/SQLite"/> diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 88854c4884b7ae2cda1319acf53897b2baf88230..cd92b94b74c73c34496d21d9baa40058d80b19cc 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,9 +5,14 @@ SMARTTIME ========= >>> start-date: 09.01.15 ->>> status-date: 04.02.16 +>>> status-date: 10.07.16 ____________________________________________________ +v.5.0.3 - (29) +=============== + +-Fixed issue where user have to press enter button in projectWindow (otherwise dropDown values would have been null) +>>> end-work: 04.02.16 v.5.0.2 - (28) =============== diff --git a/README.md b/README.md index 94896f442610a795aa95c08cf04b09a47ba0c4ab..3ae079e016d155c38343822708494027c2329b63 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # SmartTime - startdate: 09.01.15 -- current version: 5.0.2 (28) - 04.02.16 +- current version: 5.0.3 (29) - 10.07.16 ### Description diff --git a/build/SmartTime-v.5.0.3.jar b/build/SmartTime-v.5.0.3.jar new file mode 100644 index 0000000000000000000000000000000000000000..119ec05eb9f4d6580dd54b364a0aea0ff17b335e Binary files /dev/null and b/build/SmartTime-v.5.0.3.jar differ diff --git a/class/charts/PieChartGenerator$3.class b/class/charts/PieChartGenerator$1.class similarity index 91% rename from class/charts/PieChartGenerator$3.class rename to class/charts/PieChartGenerator$1.class index 8e1814eea79f4971e7e1a31330dd9ec3bdbb96bc..fa19cbd9c68f1a3ecb28e4f00fbe3d4d194d178d 100644 Binary files a/class/charts/PieChartGenerator$3.class and b/class/charts/PieChartGenerator$1.class differ diff --git a/class/charts/PieChartGenerator$4.class b/class/charts/PieChartGenerator$2.class similarity index 89% rename from class/charts/PieChartGenerator$4.class rename to class/charts/PieChartGenerator$2.class index f6c507847c0e33fe248892611590459367a4a170..585e1642e8feb00ace6d78295ce8993268f3bf9f 100644 Binary files a/class/charts/PieChartGenerator$4.class and b/class/charts/PieChartGenerator$2.class differ diff --git a/class/charts/PieChartGenerator.class b/class/charts/PieChartGenerator.class index 3d1d35813edd8a15cae004b05d8fc7dd28614dbc..c13b647bbea6e0caed705f6e531e076cb04d99d8 100644 Binary files a/class/charts/PieChartGenerator.class and b/class/charts/PieChartGenerator.class differ diff --git a/class/userInterface/ProjektFensterController.class b/class/userInterface/ProjektFensterController.class index 29217300b6d6d94500c86e17ed208b9e19814431..36c998a5453177ed6cd023b133a52f2edf7dc1c1 100644 Binary files a/class/userInterface/ProjektFensterController.class and b/class/userInterface/ProjektFensterController.class differ diff --git a/class/userInterface/_de.properties b/class/userInterface/_de.properties index 901dfe290c66fe57681714c14a4f44b0aa1f5d01..a3e72481213f74aaf179af72c3e48cdb62bcc72d 100644 --- a/class/userInterface/_de.properties +++ b/class/userInterface/_de.properties @@ -1,4 +1,4 @@ app.name=SmartTime -version.code=28 -version.name=5.0.2 -version.date=04.02.16 \ No newline at end of file +version.code=29 +version.name=5.0.3 +version.date=10.07.16 \ No newline at end of file diff --git a/src/userInterface/Main.java b/src/userInterface/Main.java index 921429578a82db51c93e89da35448134646cb7b8..8ed6bd784f2852e3efa846863f08b763832837fc 100644 --- a/src/userInterface/Main.java +++ b/src/userInterface/Main.java @@ -18,7 +18,7 @@ public class Main extends Application public void start(Stage stage) { try - { + { FXMLLoader loader = new FXMLLoader(getClass().getResource("userInterface.fxml")); Parent root = (Parent)loader.load(); diff --git a/src/userInterface/ProjektFensterController.java b/src/userInterface/ProjektFensterController.java index 85846fe48f025294d738ce718ffbf4a5e1aa8003..9fab71f682970c1d9fee3400887bc17228c4c069 100644 --- a/src/userInterface/ProjektFensterController.java +++ b/src/userInterface/ProjektFensterController.java @@ -3,6 +3,7 @@ package userInterface; import java.util.ArrayList; import java.util.Collections; +import core.SQL; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.event.ActionEvent; @@ -15,109 +16,116 @@ import javafx.scene.control.ComboBox; import javafx.scene.image.Image; import javafx.stage.Stage; import javafx.stage.WindowEvent; -import core.SQL; /** * Controllerklasse f�r das Projektfenster + * * @author Robert * */ public class ProjektFensterController implements EventHandler<WindowEvent> -{ - @FXML private Button abbrechenButton; - @FXML private ComboBox<String> dropdown; - @FXML private ComboBox<String> dropdownTasks; +{ + @FXML private Button abbrechenButton; + @FXML private ComboBox<String> dropdown; + @FXML private ComboBox<String> dropdownTasks; private Stage stage; - private UserInterfaceController controller; + private UserInterfaceController controller; private Image icon; - - + public void init(UserInterfaceController controller, String savePath, Image icon) - { - this.controller = controller; - this.icon = icon; - + { + this.controller = controller; + this.icon = icon; + ArrayList<String> objects = new ArrayList<String>(); - + SQL sql = new SQL(savePath); try - { - objects = sql.getProjectNames(); + { + objects = sql.getProjectNames(); Collections.sort(objects); } catch(Exception e) - { - } - - dropdown.getItems().addAll(objects); - dropdown.setStyle("-fx-font-family: \"Arial\";-fx-font-size: 18px;"); - dropdownTasks.setStyle("-fx-font-family: \"Arial\";-fx-font-size: 18px;"); - + { + } + + dropdown.getItems().addAll(objects); + dropdown.setStyle("-fx-font-family: \"Arial\";-fx-font-size: 18px;"); + dropdownTasks.setStyle("-fx-font-family: \"Arial\";-fx-font-size: 18px;"); + dropdown.valueProperty().addListener(new ChangeListener<String>() { @Override public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) { dropdownTasks.getItems().clear(); - - if(newValue != null && !newValue.equals("")) + + if(newValue != null && ! newValue.equals("")) { try { ArrayList<String> tasks = sql.getTaskNamesByProject(newValue); Collections.sort(tasks); - dropdownTasks.getItems().addAll(tasks); + dropdownTasks.getItems().addAll(tasks); } catch(Exception e) - { + { } } } - }); + }); + + dropdown.getEditor().textProperty().addListener((a, oldValue, newValue) -> { + dropdown.setValue(newValue); + }); + + dropdownTasks.getEditor().textProperty().addListener((a, oldValue, newValue) -> { + dropdownTasks.setValue(newValue); + }); } - + @Override - public void handle(WindowEvent arg0) + public void handle(WindowEvent arg0) { controller.projektExistiertFlag = false; stage.close(); - } - + } + public void setStage(Stage s) { stage = s; stage.setOnCloseRequest(this); - } - + } + public void okButton(ActionEvent e) { - String project = dropdown.getValue(); - - String task = dropdownTasks.getValue(); - - if (project == null || project.equals("") || task == null || task.equals("")) - { - Alert alert = new Alert(AlertType.WARNING); - alert.setTitle("Warnung"); - alert.setHeaderText(""); - alert.setContentText("Die Felder d�rfen nicht leer sein."); - alert.initOwner(stage); - Stage dialogStage = (Stage)alert.getDialogPane().getScene().getWindow(); - dialogStage.getIcons().add(icon); - alert.showAndWait(); - } - else - { - controller.setLabels(project,task); - controller.projektExistiertFlag = true; - controller.newProject(project, task); - stage.close(); - } - } + String project = dropdown.getValue(); + + String task = dropdownTasks.getValue(); + + if(project == null || project.equals("") || task == null || task.equals("")) + { + Alert alert = new Alert(AlertType.WARNING); + alert.setTitle("Warnung"); + alert.setHeaderText(""); + alert.setContentText("Die Felder d�rfen nicht leer sein."); + alert.initOwner(stage); + Stage dialogStage = (Stage)alert.getDialogPane().getScene().getWindow(); + dialogStage.getIcons().add(icon); + alert.showAndWait(); + } + else + { + controller.setLabels(project, task); + controller.projektExistiertFlag = true; + controller.newProject(project, task); + stage.close(); + } + } public void abbrechenButtond(ActionEvent e) { - stage.close(); + stage.close(); } } \ No newline at end of file diff --git a/src/userInterface/_de.properties b/src/userInterface/_de.properties index 901dfe290c66fe57681714c14a4f44b0aa1f5d01..a3e72481213f74aaf179af72c3e48cdb62bcc72d 100644 --- a/src/userInterface/_de.properties +++ b/src/userInterface/_de.properties @@ -1,4 +1,4 @@ app.name=SmartTime -version.code=28 -version.name=5.0.2 -version.date=04.02.16 \ No newline at end of file +version.code=29 +version.name=5.0.3 +version.date=10.07.16 \ No newline at end of file