قبل جا به جا کردن اوپن پلی لیست

This commit is contained in:
2026-05-28 20:30:42 +03:30
parent 0a1a707ab9
commit 06fc183025
13 changed files with 30 additions and 18 deletions
+9 -11
View File
@@ -16,17 +16,15 @@ public class Main extends Application {
MusicController controller = loader.getController();
controller.musicsListView.getItems().addAll(
new Song("Blinding Lights", "The Weeknd"),
new Song("Flowers", "Miley Cyrus"),
new Song("As It Was", "Harry Styles"),
new Song("Comme des enfants", "Coert De Pirate"),
new Song("Slow Down", "GRAE"),
new Song("Cigarettes out the window", "TV Girl"),
new Song("Shape of My Heart", "Sting"),
new Song("deja vu", "Olivia Rodirgo"),
new Song("Do It To It", "Acraze"),
new Song("Bones", "Imagine Dragons"),
new Song("Bunker", "Balthazar")
new Song("Blinding Lights", "The Weeknd","/musics/The-Weeknd-Blinding-Lights-128.mp3"),
new Song("Comme des enfants", "Coert De Pirate","/musics/Coeur-De-Pirate-Comme-des-enfants-128.pm3"),
new Song("Slow Down", "GRAE", "/musics/GRAE-Slow-Down-128.mp3"),
new Song("Cigarettes out the Window", "TV Girl", "/music/TV-Girl-Cigarettes-out-the-Window-128.mp3"),
new Song("deja vu", "Olivia Rodirgo", "/musics/Olivia-Rodrigo-deja-vu-320.mp3"),
new Song("The Line", "Twoenty One Pilots", "/musics/Twenty-One-Pilots-The-Line-128.mp3"),
new Song("Bones", "Imagine Dragons", "/musics/Imagine-Dragons-Bones-128.mp3"),
new Song("Bunker", "Balthazar", "/musics/Balthazar-Bunker-128.mp3"),
new Song("As It Was", "Harry Styles", "/musics/Harry-Styles-As-It-Was-320.mp3")
);
controller.setupListView(controller.musicsListView);
@@ -184,7 +184,7 @@ public class MusicController {
@FXML
public void mute(ActionEvent e){
isMute=!isMute;
if(isMute){
if(!isMute){
audioBtn.setGraphic(audioIcon);
}else{
audioBtn.setGraphic(muteIcon);
+4 -1
View File
@@ -3,10 +3,12 @@ package sbu.javafx;
public class Song {
private String name;
private String singer;
public Song(String name, String singer)
private String path;
public Song(String name, String singer, String path)
{
this.name=name;
this.singer=singer;
this.path=path;
}
@Override
@@ -20,4 +22,5 @@ public class Song {
public String getSinger() {
return singer;
}
public String getPath(){return path;}
}
Binary file not shown.
Binary file not shown.
+16 -5
View File
@@ -38,9 +38,16 @@
<Label fx:id="nowPlayingLabel" style="-fx-font-weight: bold; -fx-font-size: 14px;" text="No song playing" />
<!-- دکمه‌های جلو عقب -->
<HBox alignment="CENTER" spacing="20">
<BorderPane>
<Button fx:id="audioBtn"
<center>
<HBox alignment="CENTER" spacing="20">
<padding>
<Insets top="0" right="0" bottom="0" left="65"/>
</padding>
<!-- دکمه‌های اصلی -->
<Button fx:id="audioBtn"
onAction="#mute"
styleClass="circle-button">
@@ -93,13 +100,17 @@
</ImageView>
</graphic>
</Button>
</HBox>
</center>
<right>
<Button fx:id="openPlaylistBtn"
onAction="#openPlaylistWindow"
text="Open Playlist"
style="-fx-background-radius: 15px;" />
</right>
</BorderPane>
</HBox>
</VBox>
</VBox>
</VBox>