@Override
public void buildUI() {
albumSongsList = FXCollections.observableArrayList();
songDataSortedList = new SortedList<>(albumSongsList, new SongDataComparator());
songListTable.getStylesheets().clear();
songListTable.getStylesheets().add(Constants.getCssMainFilePath());
songListTableTitle.setCellValueFactory(cellData -> cellData.getValue().titleProperty());
songListTableArtist.setCellValueFactory(cellData -> cellData.getValue().artistProperty());
songListTableAlbum.setCellValueFactory(cellData -> cellData.getValue().albumTitleProperty());
songListTableYear.setCellValueFactory(cellData -> cellData.getValue().yearProperty());
songListTableGenre.setCellValueFactory(cellData -> cellData.getValue().gerneProperty());
songListTableLength.setCellValueFactory(cellData -> cellData.getValue().lengthStrProperty());
songListTableLength.setStyle("-fx-alignment: CENTER-RIGHT;");
songListTable.setItems(songDataSortedList);
songListTable.setOnMouseClicked(event -> {
if (event.getClickCount() == 2) {
mainPlayerController.playSong(songListTable.getSelectionModel().getSelectedItem());
mainPlayerController.setViewId(Constants.VIEWS_ID.ALBUMS);
buildPlaylist();
}
});
songListTable.setFixedCellSize(48.0);
}
AlbumsViewSpecificController.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:MusicHub
作者:
评论列表
文章目录