Skip to content

Commit

Permalink
Commiting ancient work and fixed some maven shit
Browse files Browse the repository at this point in the history
  • Loading branch information
Veikkosuhonen committed Nov 25, 2021
1 parent 6098e69 commit 6507ef8
Show file tree
Hide file tree
Showing 7 changed files with 146 additions and 21 deletions.
116 changes: 116 additions & 0 deletions Audiziler/dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>vesuvesu</groupId>
<artifactId>Audiziler</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.3</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>audiziler/ui/*</exclude>
<exclude>audiziler/ui/components/*</exclude>
<exclude>audiziler/media/*</exclude>
<exclude>audiziler/media/visualizer/*</exclude>
<exclude>audiziler/Main.*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
<source>8</source>
<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
</configuration>
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.3</version>
<configuration>
<mainClass>org.openjfx.App</mainClass>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer>
<mainClass>audiziler.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>xuggle repo</id>
<url>https://files.liferay.com/mirrors/xuggle.googlecode.com/svn/trunk/repo/share/java/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.testfx</groupId>
<artifactId>testfx-junit5</artifactId>
<version>4.0.16-alpha</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>testfx-core</artifactId>
<groupId>org.testfx</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
4 changes: 2 additions & 2 deletions Audiziler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.6</version>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -109,7 +109,7 @@
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.urce.ManifestResourceTransformer">
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>audiziler.Main</mainClass>
</transformer>
</transformers>
Expand Down
14 changes: 6 additions & 8 deletions Audiziler/src/main/java/audiziler/media/visualizer/Areas.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
package audiziler.media.visualizer;

import audiziler.ui.WindowSize;
import java.util.ArrayList;
import java.util.Random;
import javafx.scene.paint.Color;

/**
Expand All @@ -17,14 +15,14 @@
public class Areas extends Visualization {

float[] heights;
int length;
final int length;
int startingOffset;
float width;
float rootHeight;
float centerX;
final float width;
final float rootHeight;
final float centerX;
float[] controls;
int areaCount;
int areaLength;
final int areaCount;
final int areaLength;
public Areas(WindowSize windowSize) {
super(windowSize);
length = 256;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,15 @@ public Visualization(WindowSize windowSize) {
reflection.setTopOpacity(1.0);
reflection.setBottomOpacity(0.0);
reflection.setFraction(0.9);
/**
map = displacementMap();
map.setInput(reflection);
this.setEffect(map);
**/
this.setEffect(reflection);
canvas.translateXProperty().bind(windowSize.widthProperty().subtract(canvas.getWidth()).divide(2));
canvas.translateYProperty().bind(windowSize.heightProperty().subtract(canvas.getHeight()).divide(2));

/**
Image image = new Image(getClass().getResource("/images/sunset.jpg").toExternalForm());
ImageView imageView = new ImageView(image);
imageView.setCache(true);
Expand All @@ -66,6 +69,8 @@ public Visualization(WindowSize windowSize) {
imageView.fitWidthProperty().bind(windowSize.widthProperty());
super.getChildren().addAll(imageView, canvas);
**/
super.getChildren().add(canvas);
}

public abstract void update(float[] magnitudes);
Expand Down
7 changes: 5 additions & 2 deletions Audiziler/src/main/java/audiziler/ui/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public class Player {
Label help;

FPSCounter fpsLabel;

WindowSize windowSize;
/**
* Constructs the main UI-scene
* @param playbackService
Expand All @@ -81,6 +83,7 @@ public class Player {

this.fileService = fileService;
this.playbackService = playbackService;
this.windowSize = windowSize;

// --------------Layout----------

Expand Down Expand Up @@ -282,8 +285,8 @@ private void initRightPane() {
*/
public void showPopup() {
Popup helpPopup = new Popup();
helpPopup.setX(300);
helpPopup.setY(200);
helpPopup.setX(windowSize.width.get()/2);
helpPopup.setY(windowSize.height.get()/2);
Label helptext = new Label("Hover mouse over left opener to access file manager and select an audiofile to be played"
+ "\nPress f to go fullscreen"
+ "\nControl playback from bottom opener or click screen"
Expand Down
12 changes: 6 additions & 6 deletions Audiziler/src/main/java/audiziler/ui/components/SidePane.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ public class SidePane extends StackPane {
private Rectangle opener;
private VBox vbox;
private HBox hbox;

private boolean vertical;

private final PauseTransition openerShowingTime;
private PauseTransition menuShowingTime;
private final PauseTransition menuShowingTime;
/**
* Creates the component with different layout depending on the <code>Pos</code> given.
* Can be Left, Right, Bottom or Top.
Expand All @@ -38,7 +37,7 @@ public SidePane(Pos pos) {
super();
determineAlignment(pos);

openerShowingTime = new PauseTransition(Duration.seconds(4));
openerShowingTime = new PauseTransition(Duration.seconds(3));
openerShowingTime.setOnFinished((ActionEvent e) -> {
if (opener.isVisible()) {
super.setVisible(false);
Expand All @@ -60,11 +59,12 @@ public SidePane(Pos pos) {
opener = new Rectangle(40, 100);
vbox = new VBox();
vbox.setAlignment(pos);
vbox.setSpacing(4);
vbox.setVisible(false);
vbox.setSpacing(8);
vbox.setOnMouseExited((MouseEvent e) -> {
menuShowingTime.playFromStart();
});


super.getChildren().addAll(opener, vbox);
super.setAlignment(pos);
} else {
Expand Down Expand Up @@ -118,7 +118,7 @@ private void determineAlignment(Pos pos) {
vertical = false;
break;
default:
System.out.println("Illegal alignment for SidePane: " + pos);
System.out.println("Illegal alignment for SidePane: " + pos.name());
break;
}
}
Expand Down
7 changes: 5 additions & 2 deletions Audiziler/src/main/java/audiziler/ui/style/UIStyle1.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,8 @@ and open the template in the editor.
-fx-background-color: #2b7a58;
}



.scroll-pane{
-fx-text-fill: #e6efff;
-fx-background-color: #2b7a58;
-fx-border-color: #2b7a58;
}

0 comments on commit 6507ef8

Please sign in to comment.