Skip to content

Commit

Permalink
muutoksia toimivan releasen tekemiseksi
Browse files Browse the repository at this point in the history
  • Loading branch information
Veikkosuhonen committed Apr 21, 2020
1 parent f9d8247 commit 829072d
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 18 deletions.
3 changes: 3 additions & 0 deletions Audiziler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
</dependency>
</dependencies>
<build>
<resources>

</resources>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
Expand Down
1 change: 0 additions & 1 deletion Audiziler/src/main/java/audilizer/domain/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import audilizer.media.MPlayer;
import audilizer.media.Visualizer;
import java.io.File;
import javafx.beans.property.DoubleProperty;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;

Expand Down
33 changes: 16 additions & 17 deletions Audiziler/src/main/java/audilizer/ui/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class Player {
Scene scene;
BorderPane borderLayout;
StackPane finalLayout;
Button fileSelect;
Button addFile;
Button play;
Button previous;
ImageView playIcon;
Expand All @@ -68,19 +68,17 @@ public class Player {
finalLayout.setAlignment(Pos.CENTER);

//Controls
fileSelect = new Button("Add file");
addFile = new Button("Add file");
play = new Button();
previous = new Button();
play.setDisable(true);
previous.setDisable(true);

try {
playIcon = new ImageView(new Image(new File("src/main/java/audilizer/ui/icons/play-icon.png").toURI().toURL().toString()));
pauseIcon = new ImageView(new Image(new File("src/main/java/audilizer/ui/icons/pause-icon.png").toURI().toURL().toString()));
previousIcon = new ImageView(new Image(new File("src/main/java/audilizer/ui/icons/previous-icon.png").toURI().toURL().toString()));
} catch (MalformedURLException mue) {
System.out.println("mue: "+mue.getMessage());
}

playIcon = new ImageView(new Image(getClass().getResource("/icons/play-icon.png").toExternalForm()));
pauseIcon = new ImageView(new Image(getClass().getResource("/icons/pause-icon.png").toExternalForm()));
previousIcon = new ImageView(new Image(getClass().getResource("/icons/previous-icon.png").toExternalForm()));

play.setGraphic(playIcon);
previous.setGraphic(previousIcon);

Expand All @@ -93,7 +91,7 @@ public class Player {
//--SidePanes--
//-Left-
SidePane leftPane = new SidePane(Pos.CENTER_LEFT);
leftPane.add(fileSelect);
leftPane.add(addFile);
VBox fileItems = new VBox();
leftPane.add(fileItems);

Expand Down Expand Up @@ -138,12 +136,13 @@ public class Player {

//------Scene------
scene = new Scene(finalLayout, 1280,720);
File stylesheet = new File("src/main/java/audilizer/ui/style/UIStyle1.css");
try {
URL styleUrl = stylesheet.toURI().toURL();
scene.getStylesheets().add(styleUrl.toString());
}
catch (MalformedURLException mue) {System.out.println("could not find stylesheet");}



String style = getClass().getResource("/style/UIStyle1.css").toExternalForm();
System.out.println(style);
scene.getStylesheets().add(style);

Camera camera = new PerspectiveCamera(false);
scene.setCamera(camera);

Expand Down Expand Up @@ -171,7 +170,7 @@ public class Player {

previous.setOnAction((ActionEvent e) -> {playbackService.toStart();});

fileSelect.setOnAction((ActionEvent e) -> {
addFile.setOnAction((ActionEvent e) -> {
File file = filechooser.showOpenDialog(stage);
if (file == null) {
return;
Expand Down
Binary file added Audiziler/src/main/resources/icons/pause-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Audiziler/src/main/resources/icons/play-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Audiziler/src/main/resources/icons/previous-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions Audiziler/src/main/resources/style/UIStyle1.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/*
Created on : 30 Mar 2020, 23:43:26
Author : vesuvesu
*/
.root{
-fx-background-color: #0b2021;
-fx-font-family: "Helvetica-Light";
-fx-font-weight: lighter;
-fx-font-size: 20px;
-fx-text-fill: #ebe9d8;
}
.button{
-fx-text-fill: #e6efff;
-fx-background-color: #2b7a58;
-fx-border-color: #2b7a58;
-fx-display: inline-block;
-fx-cursor: hand;
-fx-transition-duration: 0.3s;
}
.button:hover{
-fx-background-color: #2aa36f;
-fx-border-color: #2aa36f;
-fx-display: inline-block;
}
.button:disabled{
-fx-background-color: #3e755e;
-fx-opacity: 0.6;
-fx-cursor: not-allowed;
}
.label{
-fx-text-fill: #e6efff;
/*-fx-background-color: #113436;*/
-fx-border-color: #133c3d;
-fx-border-width: 1px;
-fx-border-radius: 4px;
}
.toggle-button{
-fx-text-fill: #e6efff;
-fx-background-color: #0b2021;
-fx-border-color: #2b7a58;
-fx-display: inline-block;
-fx-cursor: hand;
}
.toggle-button:selected{
-fx-border-color: #29418f;
-fx-border-width: 2px;
}
.toggle-button:hover{
-fx-background-color: #2aa36f;
}
.opener{
-fx-background-color: #113638;
-fx-border-color: #125357;
}



0 comments on commit 829072d

Please sign in to comment.