Skip to content

Commit

Permalink
Merge branch 'release-v0.9.2-b'
Browse files Browse the repository at this point in the history
  • Loading branch information
octaviospain committed Feb 26, 2017
2 parents a810abc + 9db7761 commit 5b46225
Show file tree
Hide file tree
Showing 88 changed files with 7,522 additions and 6,789 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
Musicott-main-log.txt
.idea
*.iml
*.fxbuild
/build.fxbuild
/resources/config/config.properties
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Uses [JAudioTagger](https://bitbucket.org/ijabz/jaudiotagger "jAudioTagger") to
[TestFx](https://github.com/TestFX/TestFX "TestFx") for testing, and some components from
[ControlsFx](https://bitbucket.org/controlsfx/controlsfx/ "ControlsFx").

Next version 0.9 is almost prepared but it needs more tests (as always)! Community help is welcomed ;)
Testing with Junit 5, TestFX and maven is quite difficult, help is welcomed !

![Musicott screenshot 1](https://dl.dropboxusercontent.com/u/3596661/main.png)

Expand Down Expand Up @@ -77,6 +77,6 @@ the number of tracks and the size of the playlist
* Big refactor implementing better concurrent model

## Copyright
Copyright (c) 2015-2016 Octavio Calleya.
Copyright (c) 2015-2017 Octavio Calleya.

Musicott is free software under GNU GPL version 3 license. The license of Musicott and the licenses of the included libraries in this software are in the [LICENSE](https://github.com/octaviospain/Musicott/tree/master/license "License") folder
2 changes: 1 addition & 1 deletion build.fxbuild
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ASCII"?>
<anttasks:AntTask xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:anttasks="http://org.eclipse.fx.ide.jdt/1.0" buildDirectory="${project}/build" cssToBin="true">
<deploy packagingFormat="dmg">
<application name="Musicott" mainclass="com.transgressoft.musicott.MusicottApplication" version="0.9.1-b" toolkit="fx"/>
<application name="Musicott" mainclass="com.transgressoft.musicott.MusicottApplication" version="0.9.2-b" toolkit="fx"/>
<info title="Musicott" vendor="Transgressoft"/>
</deploy>
<signjar/>
Expand Down
27 changes: 20 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.transgressoft</groupId>
<artifactId>musicott</artifactId>
<version>0.9.1-b</version>
<version>0.9.2-b</version>
<name>Musicott</name>
<build>
<directory>target</directory>
Expand Down Expand Up @@ -99,25 +99,31 @@
</build>
<dependencies>

<dependency>
<groupId>org.jfxtras</groupId>
<artifactId>openjfx-monocle</artifactId>
<version>1.8.0_20</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.0.0-M2</version>
<scope>compile</scope>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<version>1.0.0-M2</version>
<scope>compile</scope>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.0.0-M2</version>
<scope>runtime</scope>
<scope>test</scope>
</dependency>

<dependency>
Expand Down Expand Up @@ -151,21 +157,21 @@
<dependency>
<groupId>org.testfx</groupId>
<artifactId>testfx-legacy</artifactId>
<version>4.0.4-alpha</version>
<version>4.0.5-alpha</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.testfx</groupId>
<artifactId>testfx-junit</artifactId>
<version>4.0.4-alpha</version>
<version>4.0.5-alpha</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.cedarsoftware</groupId>
<artifactId>json-io</artifactId>
<version>4.8.0</version>
<version>4.9.8</version>
<scope>compile</scope>
</dependency>

Expand Down Expand Up @@ -232,6 +238,13 @@
<scope>compile</scope>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>21.0</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>net.jthink</groupId>
<artifactId>jaudiotagger</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion resources/view/PreloaderLayout.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Image url="@../images/musicott-about-logo.png" />
</image>
</ImageView>
<Label fx:id="infoLabel" text="Label" VBox.vgrow="SOMETIMES">
<Label fx:id="infoLabel" VBox.vgrow="SOMETIMES">
<VBox.margin>
<Insets bottom="10.0" top="10.0" />
</VBox.margin>
Expand Down
154 changes: 77 additions & 77 deletions src/com/transgressoft/musicott/ErrorDemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with Musicott. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright (C) 2015, 2016 Octavio Calleya
* Copyright (C) 2015 - 2017 Octavio Calleya
*/

package com.transgressoft.musicott;
Expand All @@ -30,92 +30,92 @@
* the stack trace, or a text area with several error messages
*
* @author Octavio Calleya
* @version 0.9.1-b
* @version 0.9.2-b
*/
public class ErrorDemon {

private static ErrorDemon instance;
private ErrorDialogController errorAlertController;
private Stage alertStage;
private static ErrorDemon instance;
private ErrorDialogController errorAlertController;
private Stage alertStage;

private ErrorDemon() {}
private ErrorDemon() {}

void setErrorAlertStage(Stage stage) {
alertStage = stage;
}
void setErrorAlertStage(Stage stage) {
alertStage = stage;
}

void setErrorAlertController(ErrorDialogController errorAlertController) {
this.errorAlertController = errorAlertController;
}
void setErrorAlertController(ErrorDialogController errorAlertController) {
this.errorAlertController = errorAlertController;
}

public static ErrorDemon getInstance() {
if (instance == null)
instance = new ErrorDemon();
return instance;
}
public static ErrorDemon getInstance() {
if (instance == null)
instance = new ErrorDemon();
return instance;
}

/**
* Shows an error dialog with a message
*
* @param message The message to be shown
*/
public synchronized void showErrorDialog(String message) {
showErrorDialog(message, null);
}
/**
* Shows an error dialog with a message
*
* @param message The message to be shown
*/
public synchronized void showErrorDialog(String message) {
showErrorDialog(message, null);
}

/**
* Shows an error dialog with a message and a content text
*
* @param message The message to be shown
* @param content The content text of the error dialog
*/
public synchronized void showErrorDialog(String message, String content) {
showErrorDialog(message, content, null);
}
/**
* Shows an error dialog with a message and a content text
*
* @param message The message to be shown
* @param content The content text of the error dialog
*/
public synchronized void showErrorDialog(String message, String content) {
showErrorDialog(message, content, null);
}

/**
* Shows an error dialog with a message, a content text,
* and the stack trace of a exception
*
* @param message The message to be shown
* @param content The content text of the error dialog
* @param exception The exception error
*/
public synchronized void showErrorDialog(String message, String content, Exception exception) {
Platform.runLater(() -> {
errorAlertController.prepareDialog(message, content, exception);
StageDemon.getInstance().showStage(alertStage);
alertStage.sizeToScene();
});
}
/**
* Shows an error dialog with a message, a content text,
* and the stack trace of a exception
*
* @param message The message to be shown
* @param content The content text of the error dialog
* @param exception The exception error
*/
public synchronized void showErrorDialog(String message, String content, Exception exception) {
Platform.runLater(() -> {
errorAlertController.prepareDialog(message, content, exception);
StageDemon.getInstance().showStage(alertStage);
alertStage.sizeToScene();
});
}

/**
* Shows an error dialog with a message and a content text, and a collection of
* error messages inside an expandable text area.
*
* @param message The message to be shown
* @param content The content text of the error dialog
* @param errors The collection of error messages to be shown in the expandable area
*/
public synchronized void showExpandableErrorsDialog(String message, String content, Collection<String> errors) {
Platform.runLater(() -> {
errorAlertController.prepareDialogWithMessages(message, content, errors);
StageDemon.getInstance().showStage(alertStage);
alertStage.sizeToScene();
});
}
/**
* Shows an error dialog with a message and a content text, and a collection of
* error messages inside an expandable text area.
*
* @param message The message to be shown
* @param content The content text of the error dialog
* @param errors The collection of error messages to be shown in the expandable area
*/
public synchronized void showExpandableErrorsDialog(String message, String content, Collection<String> errors) {
Platform.runLater(() -> {
errorAlertController.prepareDialogWithMessages(message, content, errors);
StageDemon.getInstance().showStage(alertStage);
alertStage.sizeToScene();
});
}

/**
* Shows an error dialog with the logo of LastFM
*
* @param message The message of the error
* @param content The content text of the error dialog
*/
public synchronized void showLastFmErrorDialog(String message, String content) {
Platform.runLater(() -> {
errorAlertController.prepareLastFmDialog(message, content);
StageDemon.getInstance().showStage(alertStage);
alertStage.sizeToScene();
});
}
/**
* Shows an error dialog with the logo of LastFM
*
* @param message The message of the error
* @param content The content text of the error dialog
*/
public synchronized void showLastFmErrorDialog(String message, String content) {
Platform.runLater(() -> {
errorAlertController.prepareLastFmDialog(message, content);
StageDemon.getInstance().showStage(alertStage);
alertStage.sizeToScene();
});
}
}
Loading

0 comments on commit 5b46225

Please sign in to comment.