1
0
Fork 0

Interface updates

master
Ambrose Chua 2015-10-12 17:55:28 +08:00
parent 4cf46e4f3a
commit cc6c65cab1
11 changed files with 87 additions and 15 deletions

12
.idea/artifacts/build.xml Normal file
View File

@ -0,0 +1,12 @@
<component name="ArtifactManager">
<artifact type="jar" name="build">
<output-path>$PROJECT_DIR$/out/artifacts/build</output-path>
<root id="archive" name="build.jar">
<element id="module-output" name="Undefined" />
<element id="library" level="project" name="org.json:json:20150729" />
<element id="directory" name="META-INF">
<element id="file-copy" path="$PROJECT_DIR$/META-INF/MANIFEST.MF" />
</element>
</root>
</artifact>
</component>

View File

@ -0,0 +1,10 @@
<component name="libraryTable">
<library name="org.json:json:20150729" type="repository">
<properties maven-id="org.json:json:20150729" />
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/org/json/json/20150729/json-20150729.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>

4
META-INF/MANIFEST.MF Normal file
View File

@ -0,0 +1,4 @@
Manifest-Version: 1.0
Class-Path: io.makerforce.undefined
Main-Class: io.makerforce.undefined.Main

View File

@ -7,6 +7,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="org.json:json:20150729" level="project" />
</component>
</module>
</module>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 MiB

View File

@ -38,7 +38,7 @@ public class Main extends Application {
Parent root = null;
try {
root = FXMLLoader.load(getClass().getResource("view/interface.fxml"));
root = FXMLLoader.load(getClass().getResource("view/interface-test.fxml"));
} catch (IOException e) {
e.printStackTrace();
System.exit(284);

View File

@ -0,0 +1,4 @@
package io.makerforce.undefined.model;
public class Playlist {
}

View File

@ -0,0 +1,34 @@
package io.makerforce.undefined.model;
import org.json.JSONObject;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Spliterator;
import java.util.Spliterators;
import java.util.stream.StreamSupport;
public class Track {
private URL file;
private URL picture;
private String artist;
private String album;
private String year;
private int trackNumber; // track.no OR number
private int totalTracks;
private String[] genre;
public Track(JSONObject track) throws MalformedURLException {
file = new URL(track.getString("file"));
picture = new URL(track.getString("picture"));
artist = track.getString("artist");
album = track.getString("album");
year = track.getString("year");
trackNumber = track.getInt("number"); // track.getJSONObject("track").getInt("no");
totalTracks = track.getJSONObject("track").getInt("of");
genre = (String[]) StreamSupport.stream(Spliterators.spliteratorUnknownSize(track.getJSONArray("genre").iterator(), Spliterator.ORDERED), false).toArray();
}
}

View File

@ -76,7 +76,7 @@ public class InterfaceController {
public InterfaceController() {
player = new MediaPlayer(new Media("http://ambrose.makerforce.io/audio.mp3"));
player = new MediaPlayer(new Media("http://ambrose.makerforce.io:8080/tracks/Alan%20Walker/Fade/Fade.mp3"));
}
@ -101,6 +101,10 @@ public class InterfaceController {
player.muteProperty().bind(muteToggle.selectedProperty());
player.volumeProperty().bind(volumeSlider.valueProperty());
// Temporary stuff
currentImage.setImage(new Image("http://ambrose.makerforce.io:8080/art/Alan%20Walker/Fade/1"));
// Player events
// Playback status

View File

@ -72,10 +72,11 @@
<Separator orientation="VERTICAL"/>
<HBox alignment="CENTER" spacing="7.0" HBox.hgrow="ALWAYS">
<children>
<Label fx:id="playbackTimeLabel" text="0:00"/>
<Slider fx:id="playbackSlider" prefHeight="16.0" prefWidth="156.0" HBox.hgrow="ALWAYS" min="0.0"
max="1.0"/>
<Label fx:id="playbackLeftLabel" text="-0:00"/>
<Label fx:id="playbackTimeLabel" minWidth="42.0" prefHeight="24.0" text="01:00"/>
<Slider fx:id="playbackSlider" max="1.0" min="0.0" prefHeight="16.0" prefWidth="156.0"
HBox.hgrow="ALWAYS"/>
<Label fx:id="playbackLeftLabel" alignment="CENTER_RIGHT" minWidth="42.0" prefHeight="24.0"
text="-01:00"/>
</children>
<HBox.margin>
<Insets/>
@ -133,12 +134,12 @@
</ImageView>
<VBox>
<children>
<Label fx:id="currentTitle" text="The People">
<Label fx:id="currentTitle" text="Fade">
<font>
<Font name="System Bold" size="13.0"/>
</font>
</Label>
<Label fx:id="currentArtist" text="Suds"/>
<Label fx:id="currentArtist" text="Alan Walker"/>
</children>
<padding>
<Insets bottom="7.0" left="10.0" right="10.0" top="7.0"/>

View File

@ -2,23 +2,26 @@
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ProgressIndicator?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?>
<AnchorPane xmlns:fx="http://javafx.com/fxml/1" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
minWidth="-Infinity" prefHeight="200.0" prefWidth="300.0" xmlns="http://javafx.com/javafx/8.0.40">
<children>
<Label layoutX="31.0" layoutY="20.0" text="Undefined">
<Label alignment="CENTER" layoutX="4.0" layoutY="20.0" prefHeight="60.0" prefWidth="278.0" text="Undefined"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
<font>
<Font name="System Bold" size="48.0"/>
</font>
</Label>
<Label layoutX="28.0" layoutY="79.0" text="Stream and host your music privately. ">
<Label alignment="CENTER" layoutY="83.0" text="Stream and host your music privately. "
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
<font>
<Font size="14.0"/>
</font>
</Label>
<ProgressIndicator layoutX="134.0" layoutY="138.0" prefHeight="32.0" prefWidth="32.0"/>
<Label layoutX="89.0" layoutY="105.0" text="https://undefinedapp.com/">
<ProgressIndicator layoutX="134.0" layoutY="139.0" prefHeight="32.0" prefWidth="32.0"/>
<Label alignment="CENTER" layoutY="106.0" text="https://undefinedapp.com/" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0">
<font>
<Font size="10.0"/>
</font>