1
0
Fork 0

Initial Commit

master
Ambrose Chua 2015-10-07 19:47:35 +08:00
commit 03b82d5973
22 changed files with 554 additions and 0 deletions

7
.idea/ant.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AntConfiguration">
<defaultAnt bundledAnt="true" />
</component>
</project>

23
.idea/compiler.xml Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<resourceExtensions />
<wildcardResourcePatterns>
<entry name="!?*.java" />
<entry name="!?*.form" />
<entry name="!?*.class" />
<entry name="!?*.groovy" />
<entry name="!?*.scala" />
<entry name="!?*.flex" />
<entry name="!?*.kt" />
<entry name="!?*.clj" />
</wildcardResourcePatterns>
<annotationProcessing>
<profile default="true" name="Default" enabled="false">
<processorPath useClasspath="true" />
</profile>
</annotationProcessing>
</component>
</project>

View File

@ -0,0 +1,3 @@
<component name="CopyrightManager">
<settings default="" />
</component>

2
.idea/description.html Normal file
View File

@ -0,0 +1,2 @@
<html>Simple <b>JavaFX 2.0</b> application that includes simple .fxml file with attached controller and Main class to quick start. Artifact to build JavaFX application is provided.
</html>

5
.idea/encodings.xml Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
</project>

2
.idea/gradle.xml Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4" />

50
.idea/misc.xml Normal file
View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ClientPropertiesManager">
<properties class="javax.swing.AbstractButton">
<property name="hideActionText" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JComponent">
<property name="html.disable" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JEditorPane">
<property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" />
<property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" />
<property name="charset" class="java.lang.String" />
</properties>
<properties class="javax.swing.JList">
<property name="List.isFileList" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JPasswordField">
<property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JSlider">
<property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" />
<property name="JSlider.isFilled" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JTable">
<property name="Table.isFileList" class="java.lang.Boolean" />
<property name="JTable.autoStartsEdit" class="java.lang.Boolean" />
<property name="terminateEditOnFocusLost" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JToolBar">
<property name="JToolBar.isRollover" class="java.lang.Boolean" />
</properties>
<properties class="javax.swing.JTree">
<property name="JTree.lineStyle" class="java.lang.String" />
</properties>
<properties class="javax.swing.text.JTextComponent">
<property name="caretAspectRatio" class="java.lang.Double" />
<property name="caretWidth" class="java.lang.Integer" />
</properties>
</component>
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
<component name="ProjectKey">
<option name="state" value="project://e79810c8-c5c8-43b1-b19c-90c1f4095425" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Undefined.iml" filepath="$PROJECT_DIR$/Undefined.iml" />
</modules>
</component>
</project>

125
.idea/uiDesigner.xml Normal file
View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

12
Undefined.iml Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

BIN
src/icons/next2.32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

BIN
src/icons/pause2.48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

BIN
src/icons/play3.48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

BIN
src/icons/previous2.32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

BIN
src/images/srw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 MiB

View File

@ -0,0 +1,46 @@
package io.makerforce.undefined;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import java.io.IOException;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class Main extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
Parent splashRoot = FXMLLoader.load(getClass().getResource("view/splash.fxml"));
Scene splashScene = new Scene(splashRoot, 300, 200);
primaryStage.initStyle(StageStyle.UNDECORATED);
primaryStage.setScene(splashScene);
primaryStage.show();
ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
executor.schedule(() -> {
Parent root = null;
try {
root = FXMLLoader.load(getClass().getResource("view/interface.fxml"));
} catch (IOException e) {
e.printStackTrace();
}
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(root, 640, 480));
primaryStage.show();
primaryStage.toFront();
executor.shutdown();
}, 2, TimeUnit.SECONDS);
}
}

View File

@ -0,0 +1,80 @@
package io.makerforce.undefined.view;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.VBox;
public class InterfaceController {
@FXML
private VBox leftPane;
@FXML
private VBox currentDetails;
@FXML
private ImageView currentImage;
@FXML
private Label currentTitle;
@FXML
private Label currentArtist;
@FXML
private ListView showList;
private ObservableList<String> showListItems = FXCollections.observableArrayList("Albums", "Artists", "Songs");
@FXML
private ScrollPane scrollPane;
private Image playIcon = new Image("/icons/play3.48.png");
private Image pauseIcon = new Image("/icons/pause2.48.png");
@FXML
private Button pausePlayButton;
@FXML
private ImageView pausePlayButtonIcon;
@FXML
private Button previousButton;
@FXML
private Button nextButton;
@FXML
private Slider playbackSlider;
@FXML
private Label playbackTimeLabel;
@FXML
private Label playbackLeftLabel;
@FXML
private ToggleButton muteToggle;
@FXML
private ImageView muteToggleIcon;
@FXML
private Slider volumeSlider;
@FXML
private ImageView statusIcon;
public InterfaceController() {
}
public void initialize() {
// UI Bindings
currentImage.fitWidthProperty().bind(leftPane.widthProperty());
currentImage.fitHeightProperty().bind(currentImage.fitWidthProperty());
// Raw bindings
showList.setItems(showListItems);
}
}

View File

@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<BorderPane xmlns:fx="http://javafx.com/fxml/1" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="400.0"
minWidth="600.0" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.40"
fx:controller="io.makerforce.undefined.view.InterfaceController">
<bottom>
<HBox alignment="CENTER_LEFT" spacing="7.0" BorderPane.alignment="CENTER_LEFT">
<BorderPane.margin>
<Insets/>
</BorderPane.margin>
<children>
<HBox alignment="CENTER" spacing="7.0">
<children>
<Button fx:id="previousButton" mnemonicParsing="false">
<graphic>
<ImageView fitHeight="16.0" fitWidth="16.0" opacity="0.75" pickOnBounds="true"
preserveRatio="true">
<image>
<Image url="@/icons/previous2.32.png"/>
</image>
</ImageView>
</graphic>
<padding>
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0"/>
</padding>
<font>
<Font size="1.0"/>
</font>
</Button>
<Button fx:id="pausePlayButton" mnemonicParsing="false">
<graphic>
<ImageView fx:id="pausePlayButtonIcon" fitHeight="24.0" fitWidth="24.0" opacity="0.75"
pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@/icons/play3.48.png"/>
</image>
</ImageView>
</graphic>
<padding>
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0"/>
</padding>
<font>
<Font size="1.0"/>
</font>
</Button>
<Button fx:id="nextButton" mnemonicParsing="false">
<graphic>
<ImageView fitHeight="16.0" fitWidth="16.0" opacity="0.75" pickOnBounds="true"
preserveRatio="true">
<image>
<Image url="@/icons/previous2.32.png"/>
</image>
</ImageView>
</graphic>
<padding>
<Insets bottom="8.0" left="8.0" right="8.0" top="8.0"/>
</padding>
<font>
<Font size="1.0"/>
</font>
</Button>
</children>
<HBox.margin>
<Insets left="7.0" right="7.0"/>
</HBox.margin>
</HBox>
<Separator orientation="VERTICAL"/>
<HBox alignment="CENTER" spacing="7.0" HBox.hgrow="ALWAYS">
<children>
<Label fx:id="playbackTimeLabel" text="1:50"/>
<Slider fx:id="playbackSlider" prefHeight="16.0" prefWidth="156.0" HBox.hgrow="ALWAYS"/>
<Label fx:id="playbackLeftLabel" text="-2:21"/>
</children>
<HBox.margin>
<Insets/>
</HBox.margin>
</HBox>
<Separator orientation="VERTICAL"/>
<HBox alignment="CENTER" spacing="7.0">
<children>
<ToggleButton fx:id="muteToggle" mnemonicParsing="false">
<graphic>
<ImageView fx:id="muteToggleIcon" fitHeight="12.0" fitWidth="12.0" opacity="0.75"
pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@/icons/volume-medium.24.png"/>
</image>
</ImageView>
</graphic>
<padding>
<Insets bottom="6.0" left="6.0" right="6.0" top="6.0"/>
</padding>
<font>
<Font size="1.0"/>
</font>
</ToggleButton>
<Slider fx:id="volumeSlider" prefHeight="16.0" prefWidth="64.0"/>
</children>
</HBox>
<Separator orientation="VERTICAL"/>
<HBox alignment="CENTER" prefWidth="16.0">
<children>
<ImageView fx:id="statusIcon" fitHeight="16.0" fitWidth="16.0" pickOnBounds="true"
preserveRatio="true"/>
</children>
</HBox>
</children>
<padding>
<Insets bottom="7.0" left="7.0" right="7.0" top="7.0"/>
</padding>
</HBox>
</bottom>
<center>
<SplitPane dividerPositions="0.2" BorderPane.alignment="CENTER">
<items>
<VBox fx:id="leftPane" maxWidth="240.0" minWidth="120.0">
<children>
<ListView fx:id="showList" prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS"/>
<VBox fx:id="currentDetails" alignment="BOTTOM_LEFT">
<children>
<ImageView fx:id="currentImage" fitHeight="120.0" fitWidth="120.0" pickOnBounds="true"
preserveRatio="true">
<image>
<Image url="@/images/srw.png"/>
</image>
</ImageView>
<VBox>
<children>
<Label fx:id="currentTitle" text="The People">
<font>
<Font name="System Bold" size="13.0"/>
</font>
</Label>
<Label fx:id="currentArtist" text="Suds"/>
</children>
<padding>
<Insets bottom="7.0" left="10.0" right="10.0" top="7.0"/>
</padding>
</VBox>
</children>
</VBox>
</children>
</VBox>
<ScrollPane fx:id="scrollPane" fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER">
<content>
<FlowPane/>
</content>
</ScrollPane>
</items>
</SplitPane>
</center>
</BorderPane>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ProgressIndicator?>
<?import javafx.scene.layout.AnchorPane?>
<?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="24.0" text="Undefined">
<font>
<Font name="System Bold" size="48.0"/>
</font>
</Label>
<Label layoutX="31.0" layoutY="83.0" text="Stream your music privately. ">
<font>
<Font size="18.0"/>
</font>
</Label>
<ProgressIndicator layoutX="134.0" layoutY="144.0" prefHeight="32.0" prefWidth="32.0"/>
<Label layoutX="92.0" layoutY="114.0" text="http://undefinedapp.com/">
<font>
<Font size="10.0"/>
</font>
</Label>
</children>
</AnchorPane>