1
0
Fork 0
master
Ambrose Chua 2015-10-12 18:51:47 +08:00
parent 8c6c904632
commit 95372b84d4
3 changed files with 18 additions and 20 deletions

View File

@ -32,24 +32,22 @@ public class Main extends Application {
initStage.show();
ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
executor.schedule(() -> {
Platform.runLater(() -> {
initStage.close();
executor.schedule(() -> Platform.runLater(() -> {
initStage.close();
Parent root = null;
try {
root = FXMLLoader.load(getClass().getResource("view/interface.fxml"));
} catch (IOException e) {
e.printStackTrace();
System.exit(284);
}
mainStage = new Stage(StageStyle.DECORATED);
mainStage.setTitle("Undefined");
mainStage.setScene(new Scene(root, 640, 480));
mainStage.show();
executor.shutdown();
});
}, 1500, TimeUnit.MILLISECONDS);
Parent root = null;
try {
root = FXMLLoader.load(getClass().getResource("view/interface.fxml"));
} catch (IOException e) {
e.printStackTrace();
System.exit(284);
}
mainStage = new Stage(StageStyle.DECORATED);
mainStage.setTitle("Undefined");
mainStage.setScene(new Scene(root, 640, 480));
mainStage.show();
executor.shutdown();
}), 1500, TimeUnit.MILLISECONDS);
}
}

View File

@ -36,7 +36,7 @@ public class InterfaceController {
private Label currentArtist;
@FXML
private ListView showList;
private ListView<String> showList;
private ObservableList<String> showListItems = FXCollections.observableArrayList("Albums", "Artists", "Songs");
@FXML
@ -99,7 +99,7 @@ public class InterfaceController {
// Raw bindings
showList.setItems(showListItems);
((SelectionModel) showList.selectionModelProperty().get()).clearAndSelect(0);
(showList.selectionModelProperty().get()).clearAndSelect(0);
player.muteProperty().bind(muteToggle.selectedProperty());
player.volumeProperty().bind(volumeSlider.valueProperty());

View File

@ -9,7 +9,7 @@
xmlns="http://javafx.com/javafx/8.0.40">
<children>
<ImageView fx:id="imageView" fitHeight="180.0" fitWidth="180.0" pickOnBounds="true"
preserveRatio="true"></ImageView>
preserveRatio="true"/>
<VBox style="-fx-background-color: #0002, linear-gradient(#0000 0%, #0006 100%);" AnchorPane.bottomAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0">
<children>