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

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(); MusicController controller = loader.getController();
controller.musicsListView.getItems().addAll( controller.musicsListView.getItems().addAll(
new Song("Blinding Lights", "The Weeknd"), new Song("Blinding Lights", "The Weeknd","/musics/The-Weeknd-Blinding-Lights-128.mp3"),
new Song("Flowers", "Miley Cyrus"), new Song("Comme des enfants", "Coert De Pirate","/musics/Coeur-De-Pirate-Comme-des-enfants-128.pm3"),
new Song("As It Was", "Harry Styles"), new Song("Slow Down", "GRAE", "/musics/GRAE-Slow-Down-128.mp3"),
new Song("Comme des enfants", "Coert De Pirate"), new Song("Cigarettes out the Window", "TV Girl", "/music/TV-Girl-Cigarettes-out-the-Window-128.mp3"),
new Song("Slow Down", "GRAE"), new Song("deja vu", "Olivia Rodirgo", "/musics/Olivia-Rodrigo-deja-vu-320.mp3"),
new Song("Cigarettes out the window", "TV Girl"), new Song("The Line", "Twoenty One Pilots", "/musics/Twenty-One-Pilots-The-Line-128.mp3"),
new Song("Shape of My Heart", "Sting"), new Song("Bones", "Imagine Dragons", "/musics/Imagine-Dragons-Bones-128.mp3"),
new Song("deja vu", "Olivia Rodirgo"), new Song("Bunker", "Balthazar", "/musics/Balthazar-Bunker-128.mp3"),
new Song("Do It To It", "Acraze"), new Song("As It Was", "Harry Styles", "/musics/Harry-Styles-As-It-Was-320.mp3")
new Song("Bones", "Imagine Dragons"),
new Song("Bunker", "Balthazar")
); );
controller.setupListView(controller.musicsListView); controller.setupListView(controller.musicsListView);
@@ -184,7 +184,7 @@ public class MusicController {
@FXML @FXML
public void mute(ActionEvent e){ public void mute(ActionEvent e){
isMute=!isMute; isMute=!isMute;
if(isMute){ if(!isMute){
audioBtn.setGraphic(audioIcon); audioBtn.setGraphic(audioIcon);
}else{ }else{
audioBtn.setGraphic(muteIcon); audioBtn.setGraphic(muteIcon);
+4 -1
View File
@@ -3,10 +3,12 @@ package sbu.javafx;
public class Song { public class Song {
private String name; private String name;
private String singer; private String singer;
public Song(String name, String singer) private String path;
public Song(String name, String singer, String path)
{ {
this.name=name; this.name=name;
this.singer=singer; this.singer=singer;
this.path=path;
} }
@Override @Override
@@ -20,4 +22,5 @@ public class Song {
public String getSinger() { public String getSinger() {
return singer; 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" /> <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" onAction="#mute"
styleClass="circle-button"> styleClass="circle-button">
@@ -93,13 +100,17 @@
</ImageView> </ImageView>
</graphic> </graphic>
</Button> </Button>
</HBox>
</center>
<right>
<Button fx:id="openPlaylistBtn" <Button fx:id="openPlaylistBtn"
onAction="#openPlaylistWindow" onAction="#openPlaylistWindow"
text="Open Playlist" text="Open Playlist"
style="-fx-background-radius: 15px;" /> style="-fx-background-radius: 15px;" />
</right>
</BorderPane>
</HBox> </VBox>
</VBox>
</VBox> </VBox>