spawn
hoi
This commit is contained in:
@@ -19,17 +19,18 @@ public class ControlPanel extends JPanel
|
||||
private static final long serialVersionUID = 6805244250902524351L;
|
||||
|
||||
private Panel p;
|
||||
JLabel timeLabel;
|
||||
|
||||
public ControlPanel(Panel p)
|
||||
public ControlPanel()
|
||||
{
|
||||
super();
|
||||
BoxLayout box = new BoxLayout(this, BoxLayout.X_AXIS);
|
||||
setLayout(box);
|
||||
this.p = p;
|
||||
|
||||
setPreferredSize(new Dimension(0,50));
|
||||
setBorder(BorderFactory.createLineBorder(new Color(180, 180, 180)));
|
||||
setBackground(new Color(220, 220, 220));
|
||||
|
||||
setFocusable(false);
|
||||
|
||||
JPanel simulatorPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||
simulatorPanel.setPreferredSize(new Dimension(350,50));
|
||||
@@ -41,6 +42,7 @@ public class ControlPanel extends JPanel
|
||||
simulatorPanel.add(simulatorLabel);
|
||||
|
||||
JButton playButton = new JButton("Play");
|
||||
playButton.setFocusable(false);
|
||||
playButton.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
||||
playButton.addActionListener(new ActionListener(){
|
||||
public void actionPerformed(ActionEvent e)
|
||||
@@ -51,6 +53,7 @@ public class ControlPanel extends JPanel
|
||||
simulatorPanel.add(playButton);
|
||||
|
||||
JButton pauseButton = new JButton("Pause");
|
||||
pauseButton.setFocusable(false);
|
||||
pauseButton.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
||||
pauseButton.addActionListener(new ActionListener(){
|
||||
public void actionPerformed(ActionEvent e)
|
||||
@@ -61,6 +64,7 @@ public class ControlPanel extends JPanel
|
||||
simulatorPanel.add(pauseButton);
|
||||
|
||||
JButton stopButton = new JButton("Stop");
|
||||
stopButton.setFocusable(false);
|
||||
stopButton.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
||||
stopButton.addActionListener(new ActionListener(){
|
||||
public void actionPerformed(ActionEvent e)
|
||||
@@ -74,15 +78,16 @@ public class ControlPanel extends JPanel
|
||||
add(Box.createRigidArea(new Dimension(10,50)));
|
||||
|
||||
JPanel timePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||
timePanel.setPreferredSize(new Dimension(280,50));
|
||||
timePanel.setMaximumSize(new Dimension(280,50));
|
||||
timePanel.setPreferredSize(new Dimension(300,50));
|
||||
timePanel.setMaximumSize(new Dimension(300,50));
|
||||
add(timePanel);
|
||||
{
|
||||
JLabel timeLabel = new JLabel("00:00 00-00-000");
|
||||
timeLabel = new JLabel("00:00 00-00-000");
|
||||
timeLabel.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
||||
timePanel.add(timeLabel);
|
||||
|
||||
JButton dateButton = new JButton("Pick Date");
|
||||
dateButton.setFocusable(false);
|
||||
dateButton.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
||||
dateButton.addActionListener(new ActionListener(){
|
||||
public void actionPerformed(ActionEvent e)
|
||||
@@ -105,11 +110,12 @@ public class ControlPanel extends JPanel
|
||||
peoplePanel.add(peopleLabel);
|
||||
|
||||
JButton peopleButton = new JButton("Set People");
|
||||
peopleButton.setFocusable(false);
|
||||
peopleButton.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
||||
peopleButton.addActionListener(new ActionListener(){
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
p.addVisitors(1);
|
||||
p.addVisitors();
|
||||
}
|
||||
});
|
||||
peoplePanel.add(peopleButton);
|
||||
@@ -128,4 +134,19 @@ public class ControlPanel extends JPanel
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setPanel(Panel p)
|
||||
{
|
||||
this.p = p;
|
||||
}
|
||||
|
||||
public void setTime(String time)
|
||||
{
|
||||
timeLabel.setText(time);
|
||||
}
|
||||
|
||||
public void setPeople(int people)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user