mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 10:19:46 +02:00
Merge branch 'master' of github.com:jokerx3/prp
This commit is contained in:
@@ -7,8 +7,6 @@ import java.awt.Font;
|
|||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JProgressBar;
|
import javax.swing.JProgressBar;
|
||||||
import javax.swing.border.LineBorder;
|
|
||||||
|
|
||||||
import de.heatup.ui.statusPanel.Score;
|
import de.heatup.ui.statusPanel.Score;
|
||||||
import de.heatup.ui.statusPanel.Temperature;
|
import de.heatup.ui.statusPanel.Temperature;
|
||||||
import de.heatup.ui.statusPanel.Timer;
|
import de.heatup.ui.statusPanel.Timer;
|
||||||
@@ -19,8 +17,8 @@ public class StatusPanelAdder{
|
|||||||
private Score score;
|
private Score score;
|
||||||
private Timer timer;
|
private Timer timer;
|
||||||
private static JPanel panel;
|
private static JPanel panel;
|
||||||
private static int hgap=75;
|
private static int hgap=30;
|
||||||
private static int vgap=7;
|
private static int vgap=9;
|
||||||
|
|
||||||
public int getTemp(){
|
public int getTemp(){
|
||||||
return temp.getTemp();
|
return temp.getTemp();
|
||||||
@@ -41,9 +39,8 @@ public class StatusPanelAdder{
|
|||||||
|
|
||||||
|
|
||||||
JLabel labelTemp= new JLabel("temperature");
|
JLabel labelTemp= new JLabel("temperature");
|
||||||
labelTemp.setFont(new Font("Arial", Font.CENTER_BASELINE, 16));
|
labelTemp.setFont(new Font("emulogic", Font.CENTER_BASELINE, 16));
|
||||||
labelTemp.setBorder(new LineBorder(Color.BLACK, 1));
|
labelTemp.setForeground(Color.YELLOW);
|
||||||
|
|
||||||
JProgressBar tempBar= new JProgressBar(30,90);
|
JProgressBar tempBar= new JProgressBar(30,90);
|
||||||
tempBar.setValue(45);
|
tempBar.setValue(45);
|
||||||
|
|
||||||
@@ -51,50 +48,47 @@ public class StatusPanelAdder{
|
|||||||
tempPanel.setLayout(new BorderLayout(0,vgap));
|
tempPanel.setLayout(new BorderLayout(0,vgap));
|
||||||
tempPanel.add(labelTemp, BorderLayout.NORTH);
|
tempPanel.add(labelTemp, BorderLayout.NORTH);
|
||||||
tempPanel.add(tempBar, BorderLayout.SOUTH);
|
tempPanel.add(tempBar, BorderLayout.SOUTH);
|
||||||
|
tempPanel.setBackground(Color.BLACK);
|
||||||
|
|
||||||
|
|
||||||
JLabel labelScore= new JLabel("score");
|
JLabel labelScore= new JLabel("score");
|
||||||
labelScore.setFont(new Font("Arial", Font.CENTER_BASELINE, 16));
|
labelScore.setFont(new Font("emulogic", Font.CENTER_BASELINE, 16));
|
||||||
//labelScore.setBorder(new LineBorder(Color.BLACK, 1));
|
labelScore.setForeground(Color.YELLOW);
|
||||||
|
|
||||||
JLabel scoreLabel= new JLabel("new Score Label");
|
JLabel scoreLabel= new JLabel("new Score Label");
|
||||||
//scoreLabel.setBorder(new LineBorder(Color.BLACK, 1));
|
scoreLabel.setFont(new Font("emulogic", Font.CENTER_BASELINE, 12));
|
||||||
|
scoreLabel.setForeground(Color.YELLOW);
|
||||||
JPanel scorePanel=new JPanel();
|
JPanel scorePanel=new JPanel();
|
||||||
scorePanel.setLayout(new BorderLayout(0,vgap));
|
scorePanel.setLayout(new BorderLayout(0,vgap));
|
||||||
scorePanel.add(labelScore, BorderLayout.NORTH);
|
scorePanel.add(labelScore, BorderLayout.NORTH);
|
||||||
scorePanel.add(scoreLabel, BorderLayout.SOUTH);
|
scorePanel.add(scoreLabel, BorderLayout.SOUTH);
|
||||||
|
scorePanel.setBackground(Color.BLACK);
|
||||||
|
|
||||||
JLabel labelPowerUp = new JLabel("PowerUp");
|
JLabel labelPowerUp = new JLabel("PowerUp");
|
||||||
labelPowerUp.setFont(new Font("Arial", Font.CENTER_BASELINE, 16));
|
labelPowerUp.setFont(new Font("emulogic", Font.CENTER_BASELINE, 16));
|
||||||
//labelPowerUp.setBorder(new LineBorder(Color.BLACK, 1));
|
labelPowerUp.setForeground(Color.YELLOW);
|
||||||
|
|
||||||
JLabel powerUpLabel = new JLabel(/*new ImageIcon("path_to_image.png")*/"powerUpLabel");
|
JLabel powerUpLabel = new JLabel(/*new ImageIcon("path_to_image.png")*/"powerUpLabel");
|
||||||
//powerUpLabel.setBorder(new LineBorder(Color.BLACK, 1));
|
powerUpLabel.setFont(new Font("emulogic", Font.CENTER_BASELINE, 12));
|
||||||
|
powerUpLabel.setForeground(Color.YELLOW);
|
||||||
|
|
||||||
JPanel powerUpPanel=new JPanel();
|
JPanel powerUpPanel=new JPanel();
|
||||||
powerUpPanel.setLayout(new BorderLayout(0,vgap));
|
powerUpPanel.setLayout(new BorderLayout(0,vgap));
|
||||||
powerUpPanel.add(labelPowerUp, BorderLayout.NORTH);
|
powerUpPanel.add(labelPowerUp, BorderLayout.NORTH);
|
||||||
powerUpPanel.add(powerUpLabel, BorderLayout.SOUTH);
|
powerUpPanel.add(powerUpLabel, BorderLayout.SOUTH);
|
||||||
|
powerUpPanel.setBackground(Color.BLACK);
|
||||||
|
|
||||||
|
|
||||||
JLabel labelTime=new JLabel("Time");
|
JLabel labelTime=new JLabel("Time");
|
||||||
labelTime.setFont(new Font("Arial", Font.CENTER_BASELINE, 16));
|
labelTime.setFont(new Font("emulogic", Font.CENTER_BASELINE, 16));
|
||||||
//labelTime.setBorder(new LineBorder(Color.BLACK, 1));
|
|
||||||
labelTime.setSize(100,10);
|
labelTime.setSize(100,10);
|
||||||
//labelTime.setHorizontalTextPosition(SwingConstants.CENTER);
|
labelTime.setForeground(Color.YELLOW);
|
||||||
|
|
||||||
JLabel timeLabel = new JLabel("123456789");
|
JLabel timeLabel = new JLabel("123456789");
|
||||||
//timeLabel.setBorder(new LineBorder(Color.BLACK, 1));
|
timeLabel.setFont(new Font("emulogic", Font.CENTER_BASELINE, 12));
|
||||||
timeLabel.setFont(new Font("Arial", Font.ITALIC, 12));
|
timeLabel.setForeground(Color.YELLOW);
|
||||||
|
|
||||||
JPanel timePanel=new JPanel();
|
JPanel timePanel=new JPanel();
|
||||||
timePanel.setLayout(new BorderLayout(0,vgap));
|
timePanel.setLayout(new BorderLayout(0,vgap));
|
||||||
timePanel.add(labelTime, BorderLayout.NORTH);
|
timePanel.add(labelTime, BorderLayout.NORTH);
|
||||||
timePanel.add(timeLabel, BorderLayout.SOUTH);
|
timePanel.add(timeLabel, BorderLayout.SOUTH);
|
||||||
|
timePanel.setBackground(Color.BLACK);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -102,7 +96,7 @@ public class StatusPanelAdder{
|
|||||||
panel.add(scorePanel);
|
panel.add(scorePanel);
|
||||||
panel.add(tempPanel);
|
panel.add(tempPanel);
|
||||||
panel.add(powerUpPanel);
|
panel.add(powerUpPanel);
|
||||||
|
panel.setBackground(Color.BLACK);
|
||||||
panel.setVisible(false);
|
panel.setVisible(false);
|
||||||
panel.setVisible(true);
|
panel.setVisible(true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user