final edit
This commit is contained in:
Generated
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -12,29 +12,21 @@ import javafx.stage.Stage;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class MusicController {
|
||||
;
|
||||
public Button PlayListButton;
|
||||
|
||||
public Label Name1;
|
||||
public Label Singer1;
|
||||
public Label Duration1;
|
||||
public Button AddToPlaylist1;
|
||||
public Button play1;
|
||||
|
||||
public Label Name2;
|
||||
public Label Singer2;
|
||||
public Label Duration2;
|
||||
public Button AddToPlaylist2;
|
||||
public Button play2;
|
||||
|
||||
public Label Name3;
|
||||
public Label Singer3;
|
||||
public Label Duration3;
|
||||
public Button AddToPlaylist3;
|
||||
public Button play3;
|
||||
public Label nowPlayingLabel;
|
||||
public Label nowPlayingSong;
|
||||
public Button themeToggle;
|
||||
|
||||
public HBox song1;
|
||||
public HBox song2;
|
||||
@@ -44,6 +36,9 @@ public class MusicController {
|
||||
|
||||
boolean isDark = false;
|
||||
Button currentPlayingSong = null;
|
||||
public Label nowPlayingSong;
|
||||
public Button themeToggle;
|
||||
public Button PlayListButton;
|
||||
|
||||
ArrayList<HBox> playlist = new ArrayList<>();
|
||||
boolean onPlaylist1 = false;
|
||||
@@ -90,14 +85,17 @@ public class MusicController {
|
||||
if(button == AddToPlaylist1 && !onPlaylist1) {
|
||||
playlist.add(song1);
|
||||
AddToPlaylist1.setText("On Playlist");
|
||||
onPlaylist1 = true;
|
||||
}
|
||||
else if(button == AddToPlaylist2 && !onPlaylist2) {
|
||||
playlist.add(song2);
|
||||
AddToPlaylist2.setText("On Playlist");
|
||||
onPlaylist2 = true;
|
||||
}
|
||||
else if(button == AddToPlaylist3 && !onPlaylist3) {
|
||||
playlist.add(song3);
|
||||
AddToPlaylist3.setText("On Playlist");
|
||||
onPlaylist3 = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<HBox styleClass="track-row" alignment="CENTER_LEFT" fx:id="song1">
|
||||
<Label fx:id="Name1" text="Song of Dawn" minWidth="180" prefWidth="180"/>
|
||||
<Label fx:id="Singer1" text="Alice Johnson" minWidth="200" prefWidth="200"/>
|
||||
<Label fx:id="Duration1" text="03:45" minWidth="100" prefWidth="100"/>
|
||||
<Label text="03:45" minWidth="100" prefWidth="100"/>
|
||||
<Button fx:id="play1" text="Play" onAction="#handlePlayAction" minWidth="90" prefWidth="90"/>
|
||||
<Button fx:id="AddToPlaylist1" text="Add to Playlist" onAction="#addToPlaylist" minWidth="150" prefWidth="150"/>
|
||||
</HBox>
|
||||
@@ -27,7 +27,7 @@
|
||||
<HBox styleClass="track-row" alignment="CENTER_LEFT" fx:id="song2">
|
||||
<Label fx:id="Name2" text="Echoes of You" minWidth="180" prefWidth="180"/>
|
||||
<Label fx:id="Singer2" text="Luna Sky" minWidth="200" prefWidth="200"/>
|
||||
<Label fx:id="Duration2" text="05:08" minWidth="100" prefWidth="100"/>
|
||||
<Label text="05:08" minWidth="100" prefWidth="100"/>
|
||||
<Button fx:id="play2" text="Play" onAction="#handlePlayAction" minWidth="90" prefWidth="90"/>
|
||||
<Button fx:id="AddToPlaylist2" text="Add to Playlist" onAction="#addToPlaylist" minWidth="150" prefWidth="150"/>
|
||||
</HBox>
|
||||
@@ -35,13 +35,13 @@
|
||||
<HBox styleClass="track-row" alignment="CENTER_LEFT" fx:id="song3">
|
||||
<Label fx:id="Name3" text="Midnight Drive" minWidth="180" prefWidth="180"/>
|
||||
<Label fx:id="Singer3" text="The Night Owls" minWidth="200" prefWidth="200"/>
|
||||
<Label fx:id="Duration3" text="04:12" minWidth="100" prefWidth="100"/>
|
||||
<Label text="04:12" minWidth="100" prefWidth="100"/>
|
||||
<Button fx:id="play3" text="Play" onAction="#handlePlayAction" minWidth="90" prefWidth="90"/>
|
||||
<Button fx:id="AddToPlaylist3" text="Add to Playlist" onAction="#addToPlaylist" minWidth="150" prefWidth="150"/>
|
||||
</HBox>
|
||||
|
||||
<HBox styleClass="footer-row" alignment="CENTER_LEFT" fx:id="playingBox">
|
||||
<Label text = "Playing: " fx:id="nowPlayingLabel" minWidth="300" prefWidth="300"/> <!-- تنظیم عرض برای همترازی -->
|
||||
<Label text = "Playing: " minWidth="300" prefWidth="300"/>
|
||||
<Label fx:id="nowPlayingSong" text = " " prefWidth="300"/>
|
||||
</HBox>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user