Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a92a7a571 | ||
|
|
1563368bf8 | ||
|
|
eab4aedc1d | ||
|
|
be53c1f138 | ||
|
|
a7d811f956 | ||
|
|
f2f0b36d0e | ||
|
|
04fa453e49 | ||
|
|
9d88f92a98 | ||
|
|
d3e9b578eb | ||
|
|
8ba874bec6 | ||
|
|
4c11d4ad2f | ||
|
|
77dae9741e | ||
|
|
19f48ad3e9 | ||
|
|
26265b5a3e | ||
|
|
457da54a5c | ||
|
|
c3973cc4e4 | ||
|
|
d0baf5673f | ||
|
|
8167fec369 | ||
|
|
bdcc40f00f | ||
|
|
d0c0b16585 | ||
|
|
6f265063b4 | ||
|
|
89036d27af | ||
|
|
b5cf44b44c | ||
|
|
7a6bca5ed3 | ||
|
|
9d853babdc | ||
|
|
547ebfbf6a | ||
|
|
d75016f9a9 | ||
|
|
13ab1900d2 | ||
|
|
7ffc00110f | ||
|
|
fc16b4c019 | ||
|
|
ab91a7f1aa | ||
|
|
07b083453c | ||
|
|
867486f6ad | ||
|
|
a82809c959 | ||
|
|
f571189849 | ||
|
|
7c66edad14 | ||
|
|
a6eb4578da | ||
|
|
420e596590 | ||
|
|
7c28dd3a16 | ||
|
|
b50c4d2c33 | ||
|
|
a03463442c | ||
|
|
a360286c48 | ||
|
|
9066d0212f | ||
|
|
1e5d95733f | ||
|
|
e1f88aba2d | ||
|
|
4e277e7d5f | ||
|
|
9cce659329 | ||
|
|
3d0324e80b | ||
|
|
2dcdc954ae | ||
|
|
ad62094ee7 | ||
|
|
0c9d41585c | ||
|
|
701f2aed4b | ||
|
|
e31b44d43f | ||
|
|
82a94ba456 | ||
|
|
2a8ff8e29a | ||
|
|
33bb880018 | ||
|
|
a164f7b781 | ||
|
|
8ed04d356a | ||
|
|
1f6811332e | ||
|
|
f2c1544d71 | ||
|
|
32de28204c | ||
|
|
98af73b15e | ||
|
|
0c59eb5dd3 | ||
|
|
5ec737e707 | ||
|
|
d6b511bab5 | ||
|
|
d60924a05b | ||
|
|
ad4eacc20c | ||
|
|
65f428c572 | ||
|
|
284823c28b | ||
|
|
41b4c5db8f | ||
|
|
cba61d4dc5 | ||
|
|
050493a70b | ||
|
|
5a0def924a | ||
|
|
ea7ecfcd56 | ||
|
|
2d56ac1b89 | ||
|
|
1684976a47 | ||
|
|
5a9c3f259a | ||
|
|
3920354ae2 | ||
|
|
b2b2388f6f | ||
|
|
bcbc9b1027 | ||
|
|
6f58084554 | ||
|
|
c8c1d85eba | ||
|
|
a138807c2a | ||
|
|
fe5a8a5c2d | ||
|
|
24790d8d19 | ||
|
|
7e5c09da58 | ||
|
|
30192ec4aa | ||
|
|
65cd07af6f | ||
|
|
a45d37a4d5 | ||
|
|
040859ac2a | ||
|
|
df8fdd803b | ||
|
|
10951fe225 | ||
|
|
34bc4526fc | ||
|
|
8131464be7 | ||
|
|
d0c92db9f7 | ||
|
|
f289bec571 | ||
|
|
6dec40e70a | ||
|
|
c21af8db1a | ||
|
|
a0a0e604a9 | ||
|
|
297026bf11 | ||
|
|
140d5803ef | ||
|
|
8bf08d4e1d | ||
|
|
ddf5e4e908 | ||
|
|
fd6e334649 | ||
|
|
47345f70c4 | ||
|
|
583e447b81 | ||
|
|
1eb4f8df41 | ||
|
|
ecdb50320a | ||
|
|
b551f91b90 | ||
|
|
fe8fb76759 | ||
|
|
ea487bd24f | ||
|
|
47f04ee68f | ||
|
|
fa146df5a6 | ||
|
|
f1e6abae76 | ||
|
|
c00a542ffc | ||
|
|
01b538b3b4 | ||
|
|
b9eb9965dc | ||
|
|
f6bb5a8f44 | ||
|
|
dfee405657 | ||
|
|
d08e226650 | ||
|
|
99e52ebc1a | ||
|
|
c3ca87ad8f | ||
|
|
87fb690de7 | ||
|
|
ceaabb37c7 | ||
|
|
836f058c85 | ||
|
|
d31272622c | ||
|
|
dccdccb573 | ||
|
|
388021d93d | ||
|
|
23020d03b6 | ||
|
|
7e51fe541a | ||
|
|
fefffeef19 | ||
|
|
fa726f062e | ||
|
|
d0f9601737 | ||
|
|
33f0105337 | ||
|
|
be6aba1e38 | ||
|
|
ae35416cf9 | ||
|
|
08c411070d | ||
|
|
be342a5976 |
@@ -51,7 +51,20 @@ public class Agenda implements Serializable {
|
|||||||
{
|
{
|
||||||
return stages;
|
return stages;
|
||||||
}
|
}
|
||||||
|
public ArrayList<Event> eventsForStage(AgendaStage st)
|
||||||
|
{
|
||||||
|
ArrayList<Event> stageEvents = new ArrayList<Event>();
|
||||||
|
for(Event e: events)
|
||||||
|
{
|
||||||
|
if(e.getStage() == st)
|
||||||
|
{
|
||||||
|
stageEvents.add(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return stageEvents;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
public void saveAgenda()
|
public void saveAgenda()
|
||||||
{
|
{
|
||||||
JFileChooser fileChooser = new JFileChooser();
|
JFileChooser fileChooser = new JFileChooser();
|
||||||
@@ -179,7 +192,7 @@ public class Agenda implements Serializable {
|
|||||||
{
|
{
|
||||||
boolean exists = false;
|
boolean exists = false;
|
||||||
String name = e.getStage().getName();
|
String name = e.getStage().getName();
|
||||||
for (AgendaStage s : stages)
|
for (Stage s : stages)
|
||||||
{
|
{
|
||||||
if ( s.getName().equals(name) ) {
|
if ( s.getName().equals(name) ) {
|
||||||
exists = true;
|
exists = true;
|
||||||
@@ -202,7 +215,8 @@ public class Agenda implements Serializable {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
public void clearAgenda()
|
public void clearAgenda()
|
||||||
{
|
{
|
||||||
@@ -211,10 +225,12 @@ public class Agenda implements Serializable {
|
|||||||
artists.clear();
|
artists.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
public void fillAllLists()
|
public void fillAllLists()
|
||||||
{
|
{
|
||||||
loadAgenda();
|
loadAgenda();
|
||||||
fillStages();
|
fillStages();
|
||||||
fillArtists();
|
fillArtists();
|
||||||
}
|
}
|
||||||
}
|
*/
|
||||||
|
}
|
||||||
@@ -19,7 +19,7 @@ public class EditArtistPanel extends JFrame {
|
|||||||
|
|
||||||
public EditArtistPanel(Agenda agenda, Artist art, TabbedPane tab)
|
public EditArtistPanel(Agenda agenda, Artist art, TabbedPane tab)
|
||||||
{
|
{
|
||||||
super("Artist editscreen!");
|
super("Artist editscreen");
|
||||||
setDefaultCloseOperation(HIDE_ON_CLOSE);
|
setDefaultCloseOperation(HIDE_ON_CLOSE);
|
||||||
JPanel content = new JPanel(new BorderLayout());
|
JPanel content = new JPanel(new BorderLayout());
|
||||||
JPanel south = new JPanel(new FlowLayout());
|
JPanel south = new JPanel(new FlowLayout());
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class EditEventPanel extends JFrame{
|
|||||||
|
|
||||||
public EditEventPanel(Agenda agenda, Event e, TabbedPane tab)
|
public EditEventPanel(Agenda agenda, Event e, TabbedPane tab)
|
||||||
{
|
{
|
||||||
super("Event editscreen!");
|
super("Event editscreen");
|
||||||
setDefaultCloseOperation(HIDE_ON_CLOSE);
|
setDefaultCloseOperation(HIDE_ON_CLOSE);
|
||||||
JPanel content = new JPanel(new BorderLayout());
|
JPanel content = new JPanel(new BorderLayout());
|
||||||
JPanel south = new JPanel(new FlowLayout());
|
JPanel south = new JPanel(new FlowLayout());
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class EditStagePanel extends JFrame{
|
|||||||
|
|
||||||
public EditStagePanel(Agenda agenda, AgendaStage sta)
|
public EditStagePanel(Agenda agenda, AgendaStage sta)
|
||||||
{
|
{
|
||||||
super("Stage editscreen!");
|
super("Stage editscreen");
|
||||||
setDefaultCloseOperation(HIDE_ON_CLOSE);
|
setDefaultCloseOperation(HIDE_ON_CLOSE);
|
||||||
JPanel content = new JPanel(new BorderLayout());
|
JPanel content = new JPanel(new BorderLayout());
|
||||||
JPanel south = new JPanel(new FlowLayout());
|
JPanel south = new JPanel(new FlowLayout());
|
||||||
|
|||||||
@@ -55,11 +55,11 @@ public class Event implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getStart(){
|
public int getStart(){
|
||||||
return (startHour * 100) + startMinute;
|
return (startHour * 60) + startMinute;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getStop(){
|
public int getStop(){
|
||||||
return (stopHour * 100) + stopMinute;
|
return (stopHour * 60) + stopMinute;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getStopHour(){
|
public int getStopHour(){
|
||||||
|
|||||||
@@ -63,7 +63,8 @@ public class MenuBar extends JMenuBar {
|
|||||||
open.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK));
|
open.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK));
|
||||||
open.addActionListener(new ActionListener() {
|
open.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
w.getAgenda().loadAgenda();
|
Applicatie.SaveLoad.load(w.getPanel());
|
||||||
|
w.setAgenda(w.getPanel().getAgenda());
|
||||||
Window.updatePanel();
|
Window.updatePanel();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -72,7 +73,7 @@ public class MenuBar extends JMenuBar {
|
|||||||
save.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));
|
save.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));
|
||||||
save.addActionListener(new ActionListener() {
|
save.addActionListener(new ActionListener() {
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
w.getAgenda().saveAgenda();
|
Applicatie.SaveLoad.save(w.getPanel());
|
||||||
Window.updatePanel();
|
Window.updatePanel();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -133,4 +134,4 @@ public class MenuBar extends JMenuBar {
|
|||||||
view.add(art_sta);
|
view.add(art_sta);
|
||||||
add(view);
|
add(view);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package Agenda;
|
package Agenda;
|
||||||
|
|
||||||
|
|
||||||
import java.awt.BorderLayout;
|
import java.awt.BorderLayout;
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.awt.Dimension;
|
import java.awt.Dimension;
|
||||||
@@ -36,14 +35,16 @@ public class Window extends JFrame {
|
|||||||
private static GregorianCalendar date;
|
private static GregorianCalendar date;
|
||||||
private static Agenda agenda;
|
private static Agenda agenda;
|
||||||
private static String currentPanel = "table";
|
private static String currentPanel = "table";
|
||||||
|
private Applicatie.Panel ap;
|
||||||
|
|
||||||
public Window()
|
public Window(Applicatie.Panel ap)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Initialize window
|
* Initialize window
|
||||||
*/
|
*/
|
||||||
super("Agenda");
|
super("Agenda");
|
||||||
agenda = new Agenda();
|
this.ap = ap;
|
||||||
|
agenda = ap.getAgenda();
|
||||||
|
|
||||||
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
|
||||||
addWindowListener(new WindowAdapter() {
|
addWindowListener(new WindowAdapter() {
|
||||||
@@ -181,7 +182,7 @@ public class Window extends JFrame {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void changePanel(String panel)
|
public static void changePanel(String panel)
|
||||||
{
|
{
|
||||||
currentPanel = panel;
|
currentPanel = panel;
|
||||||
@@ -231,7 +232,13 @@ public class Window extends JFrame {
|
|||||||
public void setAgenda(Agenda a)
|
public void setAgenda(Agenda a)
|
||||||
{
|
{
|
||||||
agenda = a;
|
agenda = a;
|
||||||
|
ap.setAgenda(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Applicatie.Panel getPanel()
|
||||||
|
{
|
||||||
|
return ap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -46,9 +46,8 @@ public class Action
|
|||||||
{
|
{
|
||||||
return duration;
|
return duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Waypoint getWaypoint(){
|
public Waypoint getWaypoint(){
|
||||||
return waypoint;
|
return waypoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
package Applicatie;
|
||||||
|
|
||||||
|
import java.awt.BorderLayout;
|
||||||
|
import java.awt.Color;
|
||||||
|
import java.awt.Dimension;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.awt.event.KeyEvent;
|
||||||
|
import java.awt.event.KeyListener;
|
||||||
|
|
||||||
|
import javax.swing.JButton;
|
||||||
|
import javax.swing.JFrame;
|
||||||
|
import javax.swing.JLabel;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
import javax.swing.JPanel;
|
||||||
|
import javax.swing.JTextField;
|
||||||
|
|
||||||
|
public class AddPeoplePanel extends JFrame {
|
||||||
|
|
||||||
|
public AddPeoplePanel(Panel topPanel) {
|
||||||
|
super("Adding people");
|
||||||
|
setDefaultCloseOperation(HIDE_ON_CLOSE);
|
||||||
|
setResizable(false);
|
||||||
|
|
||||||
|
JPanel mainPanel = new JPanel(new BorderLayout());
|
||||||
|
JLabel label;
|
||||||
|
JButton button;
|
||||||
|
|
||||||
|
//Top:
|
||||||
|
JPanel panel = new JPanel();
|
||||||
|
label = new JLabel("Enter the amount of people you want to add: ");
|
||||||
|
panel.add(label);
|
||||||
|
mainPanel.add(panel,BorderLayout.NORTH);
|
||||||
|
//Center:
|
||||||
|
panel = new JPanel();
|
||||||
|
JTextField amountOfPeopleField = new JTextField("0");
|
||||||
|
amountOfPeopleField.setPreferredSize(new Dimension(100,20));
|
||||||
|
amountOfPeopleField.addKeyListener(new KeyListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyTyped(KeyEvent e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyReleased(KeyEvent e) {
|
||||||
|
try {
|
||||||
|
amountOfPeopleField.setBackground(Color.WHITE);
|
||||||
|
int amountOfPeople = Integer.parseInt(amountOfPeopleField.getText());
|
||||||
|
amountOfPeopleField.setText(amountOfPeople + "");
|
||||||
|
}
|
||||||
|
catch(NumberFormatException nf) {
|
||||||
|
amountOfPeopleField.setBackground(Color.RED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyPressed(KeyEvent e) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
label = new JLabel("people ");
|
||||||
|
panel.add(amountOfPeopleField);
|
||||||
|
panel.add(label);
|
||||||
|
mainPanel.add(panel,BorderLayout.CENTER);
|
||||||
|
//Bottom:
|
||||||
|
panel = new JPanel();
|
||||||
|
button = new JButton("Cancel");
|
||||||
|
button.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
AddPeoplePanel.this.dispose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
panel.add(button);
|
||||||
|
button = new JButton("Apply");
|
||||||
|
button.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e) {
|
||||||
|
if(amountOfPeopleField.getBackground() != Color.RED) {
|
||||||
|
topPanel.addVisitors(Integer.parseInt(amountOfPeopleField.getText()));
|
||||||
|
AddPeoplePanel.this.dispose();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
JOptionPane.showMessageDialog(topPanel, "Only numbers are accepted");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
panel.add(button);
|
||||||
|
mainPanel.add(panel,BorderLayout.SOUTH);
|
||||||
|
|
||||||
|
add(mainPanel);
|
||||||
|
|
||||||
|
//Finishing off
|
||||||
|
pack();
|
||||||
|
setSize(290,150);
|
||||||
|
setLocationRelativeTo(null);
|
||||||
|
setVisible(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,13 +19,17 @@ public class ControlPanel extends JPanel
|
|||||||
private static final long serialVersionUID = 6805244250902524351L;
|
private static final long serialVersionUID = 6805244250902524351L;
|
||||||
|
|
||||||
private Panel p;
|
private Panel p;
|
||||||
|
private int people;
|
||||||
JLabel timeLabel;
|
JLabel timeLabel;
|
||||||
|
JLabel peopleLabel;
|
||||||
|
JLabel runningLabel;
|
||||||
|
|
||||||
public ControlPanel()
|
public ControlPanel()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
BoxLayout box = new BoxLayout(this, BoxLayout.X_AXIS);
|
BoxLayout box = new BoxLayout(this, BoxLayout.X_AXIS);
|
||||||
setLayout(box);
|
setLayout(box);
|
||||||
|
people = 0;
|
||||||
|
|
||||||
setPreferredSize(new Dimension(0,50));
|
setPreferredSize(new Dimension(0,50));
|
||||||
setBorder(BorderFactory.createLineBorder(new Color(180, 180, 180)));
|
setBorder(BorderFactory.createLineBorder(new Color(180, 180, 180)));
|
||||||
@@ -33,8 +37,8 @@ public class ControlPanel extends JPanel
|
|||||||
setFocusable(false);
|
setFocusable(false);
|
||||||
|
|
||||||
JPanel simulatorPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
JPanel simulatorPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||||
simulatorPanel.setPreferredSize(new Dimension(350,50));
|
simulatorPanel.setPreferredSize(new Dimension(290,50));
|
||||||
simulatorPanel.setMaximumSize(new Dimension(350,50));
|
simulatorPanel.setMaximumSize(new Dimension(290,50));
|
||||||
add(simulatorPanel);
|
add(simulatorPanel);
|
||||||
{
|
{
|
||||||
JLabel simulatorLabel = new JLabel("Simulator: ");
|
JLabel simulatorLabel = new JLabel("Simulator: ");
|
||||||
@@ -48,21 +52,11 @@ public class ControlPanel extends JPanel
|
|||||||
public void actionPerformed(ActionEvent e)
|
public void actionPerformed(ActionEvent e)
|
||||||
{
|
{
|
||||||
p.getT().start();
|
p.getT().start();
|
||||||
|
runningLabel.setText("Simulation Started");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
simulatorPanel.add(playButton);
|
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)
|
|
||||||
{
|
|
||||||
p.getT().stop();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
simulatorPanel.add(pauseButton);
|
|
||||||
|
|
||||||
JButton stopButton = new JButton("Stop");
|
JButton stopButton = new JButton("Stop");
|
||||||
stopButton.setFocusable(false);
|
stopButton.setFocusable(false);
|
||||||
stopButton.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
stopButton.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
||||||
@@ -70,6 +64,7 @@ public class ControlPanel extends JPanel
|
|||||||
public void actionPerformed(ActionEvent e)
|
public void actionPerformed(ActionEvent e)
|
||||||
{
|
{
|
||||||
p.getT().stop();
|
p.getT().stop();
|
||||||
|
runningLabel.setText("Simulation Stopped");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
simulatorPanel.add(stopButton);
|
simulatorPanel.add(stopButton);
|
||||||
@@ -105,7 +100,7 @@ public class ControlPanel extends JPanel
|
|||||||
peoplePanel.setMaximumSize(new Dimension(285,50));
|
peoplePanel.setMaximumSize(new Dimension(285,50));
|
||||||
add(peoplePanel);
|
add(peoplePanel);
|
||||||
{
|
{
|
||||||
JLabel peopleLabel = new JLabel("0/0 People");
|
peopleLabel = new JLabel(people + " People");
|
||||||
peopleLabel.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
peopleLabel.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
||||||
peoplePanel.add(peopleLabel);
|
peoplePanel.add(peopleLabel);
|
||||||
|
|
||||||
@@ -115,7 +110,7 @@ public class ControlPanel extends JPanel
|
|||||||
peopleButton.addActionListener(new ActionListener(){
|
peopleButton.addActionListener(new ActionListener(){
|
||||||
public void actionPerformed(ActionEvent e)
|
public void actionPerformed(ActionEvent e)
|
||||||
{
|
{
|
||||||
p.addVisitors();
|
new AddPeoplePanel(p);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
peoplePanel.add(peopleButton);
|
peoplePanel.add(peopleButton);
|
||||||
@@ -128,7 +123,7 @@ public class ControlPanel extends JPanel
|
|||||||
runningPanel.setMaximumSize(new Dimension(195,50));
|
runningPanel.setMaximumSize(new Dimension(195,50));
|
||||||
add(runningPanel);
|
add(runningPanel);
|
||||||
{
|
{
|
||||||
JLabel runningLabel = new JLabel("Simulation stopped");
|
runningLabel = new JLabel("Simulation stopped");
|
||||||
runningLabel.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
runningLabel.setFont(new Font("Segoe UI", Font.PLAIN, 20));
|
||||||
runningPanel.add(runningLabel);
|
runningPanel.add(runningLabel);
|
||||||
}
|
}
|
||||||
@@ -147,6 +142,7 @@ public class ControlPanel extends JPanel
|
|||||||
|
|
||||||
public void setPeople(int people)
|
public void setPeople(int people)
|
||||||
{
|
{
|
||||||
|
this.people = people;
|
||||||
|
peopleLabel.setText(people + " People");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package Applicatie;
|
|||||||
|
|
||||||
public class Main
|
public class Main
|
||||||
{
|
{
|
||||||
|
|
||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
new Window();
|
new Window();
|
||||||
|
|||||||
@@ -33,11 +33,13 @@ public class MenuBar extends JMenuBar
|
|||||||
{
|
{
|
||||||
public void actionPerformed(ActionEvent e)
|
public void actionPerformed(ActionEvent e)
|
||||||
{
|
{
|
||||||
new Agenda.Window();
|
new Agenda.Window(w.getPanel());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
file.add(agenda);
|
file.add(agenda);
|
||||||
|
|
||||||
|
file.addSeparator();
|
||||||
|
|
||||||
item = new JMenuItem("Open");
|
item = new JMenuItem("Open");
|
||||||
item.addActionListener(new ActionListener() {
|
item.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
@@ -60,22 +62,12 @@ public class MenuBar extends JMenuBar
|
|||||||
|
|
||||||
file.addSeparator();
|
file.addSeparator();
|
||||||
|
|
||||||
item = new JMenuItem("Load agenda");
|
|
||||||
item.addActionListener(new ActionListener() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void actionPerformed(ActionEvent e) {
|
|
||||||
w.getPanel().agenda.loadAgenda();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
file.add(item);
|
|
||||||
|
|
||||||
item = new JMenuItem("Agenda");
|
item = new JMenuItem("Agenda");
|
||||||
item.addActionListener(new ActionListener()
|
item.addActionListener(new ActionListener()
|
||||||
{
|
{
|
||||||
public void actionPerformed(ActionEvent e)
|
public void actionPerformed(ActionEvent e)
|
||||||
{
|
{
|
||||||
new Agenda.Window();
|
new Agenda.Window(w.getPanel());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
file.add(item);
|
file.add(item);
|
||||||
@@ -87,8 +79,7 @@ public class MenuBar extends JMenuBar
|
|||||||
{
|
{
|
||||||
public void actionPerformed(ActionEvent e)
|
public void actionPerformed(ActionEvent e)
|
||||||
{
|
{
|
||||||
w.setVisible(false);
|
System.exit(0);
|
||||||
w.dispose();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ public class Panel extends JPanel implements ActionListener
|
|||||||
addMouseWheelListener(new MouseWheel(this));
|
addMouseWheelListener(new MouseWheel(this));
|
||||||
|
|
||||||
addFocusListener(new WindowFocusListener(this));
|
addFocusListener(new WindowFocusListener(this));
|
||||||
t = new Timer(1000 / 10, this);
|
t = new Timer(1000 / 50, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPanelInfoLength()
|
public int getPanelInfoLength()
|
||||||
@@ -229,7 +229,16 @@ public class Panel extends JPanel implements ActionListener
|
|||||||
return waypoints;
|
return waypoints;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addVisitors()
|
public void addVisitors(ArrayList<DrawObject> entrances)
|
||||||
|
{
|
||||||
|
|
||||||
|
DrawObject entrance = entrances.get((int) Math.floor(Math.random()*entrances.size()));
|
||||||
|
Point point = new Point((int)entrance.getPosition().getX(),(int)entrance.getPosition().getY());
|
||||||
|
visitors.add(new Visitor("visitor",point, agenda, objects, waypoints, date));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void addVisitors(int count)
|
||||||
{
|
{
|
||||||
ArrayList<DrawObject> entrances = new ArrayList<>();
|
ArrayList<DrawObject> entrances = new ArrayList<>();
|
||||||
for(DrawObject object : objects) {
|
for(DrawObject object : objects) {
|
||||||
@@ -238,21 +247,14 @@ public class Panel extends JPanel implements ActionListener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!entrances.isEmpty()) {
|
if(!entrances.isEmpty()) {
|
||||||
DrawObject entrance = entrances.get((int) Math.floor(Math.random()*entrances.size()));
|
for (int i = 0; i < count; i++)
|
||||||
Point point = new Point((int)entrance.getPosition().getX(),(int)entrance.getPosition().getY());
|
{
|
||||||
visitors.add(new Visitor("visitor",point, agenda, objects, waypoints, date));
|
addVisitors(entrances);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
JOptionPane.showMessageDialog(this, "You don't have an entrance");
|
JOptionPane.showMessageDialog(this, "You don't have an entrance");
|
||||||
}
|
cp.setPeople(visitors.size());
|
||||||
}
|
|
||||||
|
|
||||||
public void addVisitors(int count)
|
|
||||||
{
|
|
||||||
for (int i = 0; i < count; i++)
|
|
||||||
{
|
|
||||||
addVisitors();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void paintComponent(Graphics g)
|
public void paintComponent(Graphics g)
|
||||||
@@ -387,6 +389,9 @@ public class Panel extends JPanel implements ActionListener
|
|||||||
public void clearObjects()
|
public void clearObjects()
|
||||||
{
|
{
|
||||||
objects.clear();
|
objects.clear();
|
||||||
|
visitors.clear();
|
||||||
|
waypoints.clear();
|
||||||
|
paths.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Point getLastMousePosition()
|
public Point getLastMousePosition()
|
||||||
@@ -637,7 +642,6 @@ public class Panel extends JPanel implements ActionListener
|
|||||||
currentTime++;
|
currentTime++;
|
||||||
date.setTimeInMillis(date.getTimeInMillis() + 1000);
|
date.setTimeInMillis(date.getTimeInMillis() + 1000);
|
||||||
cp.setTime(formatter.format(date.getTime()));
|
cp.setTime(formatter.format(date.getTime()));
|
||||||
System.out.println(currentTime);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Visitor v : visitors)
|
for (Visitor v : visitors)
|
||||||
@@ -669,6 +673,7 @@ public class Panel extends JPanel implements ActionListener
|
|||||||
this.height = height;
|
this.height = height;
|
||||||
paths.clear();
|
paths.clear();
|
||||||
objects.clear();
|
objects.clear();
|
||||||
|
visitors.clear();
|
||||||
cameraScale = 1;
|
cameraScale = 1;
|
||||||
switch (terrainIndex)
|
switch (terrainIndex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package Applicatie;
|
package Applicatie;
|
||||||
|
|
||||||
import java.awt.BorderLayout;
|
|
||||||
import java.awt.FlowLayout;
|
import java.awt.FlowLayout;
|
||||||
import java.awt.GridLayout;
|
import java.awt.Font;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
|
||||||
|
import javax.swing.BoxLayout;
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JFrame;
|
import javax.swing.JFrame;
|
||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
@@ -21,20 +21,21 @@ public class PathPopup extends JFrame
|
|||||||
|
|
||||||
public PathPopup(Path p, Panel panel)
|
public PathPopup(Path p, Panel panel)
|
||||||
{
|
{
|
||||||
super("Artist editscreen!");
|
super("");
|
||||||
setDefaultCloseOperation(HIDE_ON_CLOSE);
|
setDefaultCloseOperation(HIDE_ON_CLOSE);
|
||||||
JPanel content = new JPanel(new BorderLayout());
|
JPanel content = new JPanel();
|
||||||
|
content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS));
|
||||||
JPanel south = new JPanel(new FlowLayout());
|
JPanel south = new JPanel(new FlowLayout());
|
||||||
JPanel center = new JPanel(new GridLayout(5, 2));
|
JPanel center = new JPanel();
|
||||||
content.add(south, BorderLayout.SOUTH);
|
|
||||||
content.add(center, BorderLayout.CENTER);
|
|
||||||
|
|
||||||
JPanel panel1 = new JPanel();
|
JPanel panel1 = new JPanel();
|
||||||
JLabel name = new JLabel("Path");
|
JLabel name = new JLabel("Add WayPoint");
|
||||||
|
name.setFont(new Font("Dialog", Font.BOLD, 20));
|
||||||
panel1.add(name);
|
panel1.add(name);
|
||||||
center.add(panel1);
|
content.add(panel1);
|
||||||
|
content.add(center);
|
||||||
|
content.add(south);
|
||||||
|
|
||||||
JTextField tf = new JTextField(5);
|
JTextField tf = new JTextField(10);
|
||||||
center.add(tf);
|
center.add(tf);
|
||||||
|
|
||||||
JButton edit = new JButton("Done");
|
JButton edit = new JButton("Done");
|
||||||
@@ -47,11 +48,22 @@ public class PathPopup extends JFrame
|
|||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
JButton cancel = new JButton("Cancel");
|
||||||
|
cancel.addActionListener(new ActionListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e)
|
||||||
|
{
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
|
});
|
||||||
south.add(edit);
|
south.add(edit);
|
||||||
|
south.add(cancel);
|
||||||
|
|
||||||
setContentPane(content);
|
setContentPane(content);
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
setSize(500, 320);
|
setSize(200, 150);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import java.awt.event.ActionListener;
|
|||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
import java.awt.event.KeyListener;
|
import java.awt.event.KeyListener;
|
||||||
import java.awt.geom.Point2D;
|
import java.awt.geom.Point2D;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
import javax.swing.BorderFactory;
|
import javax.swing.BorderFactory;
|
||||||
import javax.swing.Box;
|
import javax.swing.Box;
|
||||||
@@ -20,8 +22,11 @@ import javax.swing.JLabel;
|
|||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
import javax.swing.JTextField;
|
import javax.swing.JTextField;
|
||||||
|
|
||||||
|
import Agenda.AgendaStage;
|
||||||
|
import Agenda.Event;
|
||||||
import Objects.DrawObject;
|
import Objects.DrawObject;
|
||||||
import Objects.Path;
|
import Objects.Path;
|
||||||
|
import Objects.Stage;
|
||||||
|
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
public class PropertiesPanel extends JPanel
|
public class PropertiesPanel extends JPanel
|
||||||
@@ -36,6 +41,7 @@ public class PropertiesPanel extends JPanel
|
|||||||
|
|
||||||
JLabel nameLabel;
|
JLabel nameLabel;
|
||||||
JPanel areaPanel;
|
JPanel areaPanel;
|
||||||
|
JPanel agendaPanel;
|
||||||
Component rigidArea;
|
Component rigidArea;
|
||||||
|
|
||||||
JTextField locationXField;
|
JTextField locationXField;
|
||||||
@@ -500,12 +506,9 @@ public class PropertiesPanel extends JPanel
|
|||||||
add(Box.createRigidArea(spacerDimension));
|
add(Box.createRigidArea(spacerDimension));
|
||||||
|
|
||||||
// AGENDA
|
// AGENDA
|
||||||
JPanel agendaPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
agendaPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||||
JLabel agendaLabel = new JLabel("Agenda");
|
agendaPanel.setVisible(false);
|
||||||
agendaLabel.setFont(new Font("Segoe UI", Font.ITALIC, 20));
|
|
||||||
agendaPanel.setPreferredSize(new Dimension(200, 100));
|
|
||||||
agendaPanel.setMaximumSize(new Dimension(200, 100));
|
|
||||||
agendaPanel.add(agendaLabel);
|
|
||||||
add(agendaPanel);
|
add(agendaPanel);
|
||||||
|
|
||||||
enableComponents(this, false);
|
enableComponents(this, false);
|
||||||
@@ -566,12 +569,19 @@ public class PropertiesPanel extends JPanel
|
|||||||
nameLabel.setText("No Selection");
|
nameLabel.setText("No Selection");
|
||||||
areaPanel.setVisible(false);
|
areaPanel.setVisible(false);
|
||||||
rigidArea.setVisible(false);
|
rigidArea.setVisible(false);
|
||||||
|
agendaPanel.setVisible(false);
|
||||||
|
agendaPanel.removeAll();
|
||||||
|
agendaPanel.validate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillFields()
|
private void fillFields()
|
||||||
{
|
{
|
||||||
|
|
||||||
nameLabel.setText(selectedObject.getName());
|
nameLabel.setText(selectedObject.getName());
|
||||||
|
|
||||||
|
agendaPanel.removeAll();
|
||||||
|
agendaPanel.validate();
|
||||||
|
agendaPanel.setVisible(false);
|
||||||
|
|
||||||
locationXField.setText(Math.round(selectedObject.getPosition().getX()) + "");
|
locationXField.setText(Math.round(selectedObject.getPosition().getX()) + "");
|
||||||
locationYField.setText(Math.round(selectedObject.getPosition().getY()) + "");
|
locationYField.setText(Math.round(selectedObject.getPosition().getY()) + "");
|
||||||
@@ -582,7 +592,31 @@ public class PropertiesPanel extends JPanel
|
|||||||
areaBottomField.setText(selectedObject.getAreaBottom() + "");
|
areaBottomField.setText(selectedObject.getAreaBottom() + "");
|
||||||
areaLeftField.setText(selectedObject.getAreaLeft() + "");
|
areaLeftField.setText(selectedObject.getAreaLeft() + "");
|
||||||
areaRightField.setText(selectedObject.getAreaRight() + "");
|
areaRightField.setText(selectedObject.getAreaRight() + "");
|
||||||
|
|
||||||
|
if(selectedObject instanceof Stage)
|
||||||
|
{
|
||||||
|
|
||||||
|
agendaPanel.setVisible(true);
|
||||||
|
JLabel agendaLabel = new JLabel("Agenda");
|
||||||
|
agendaLabel.setFont(new Font("Segoe UI", Font.ITALIC, 20));
|
||||||
|
agendaPanel.add(agendaLabel);
|
||||||
|
|
||||||
|
AgendaStage st = ((Stage) selectedObject).getStage();
|
||||||
|
nameLabel.setText("Stage: " + st.getName());
|
||||||
|
ArrayList<Event> events = p.getAgenda().eventsForStage(st);
|
||||||
|
agendaPanel.setPreferredSize(new Dimension(200, ((30*events.size())+50) ));
|
||||||
|
agendaPanel.setMaximumSize(new Dimension(200, ((30*events.size())+50) ));
|
||||||
|
for(Event e : events)
|
||||||
|
{
|
||||||
|
JPanel eventPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||||
|
JLabel eventLabel = new JLabel(e.getEventName() + " - " + e.getArtist().getName());
|
||||||
|
eventLabel.setFont(new Font("Segoe UI", Font.PLAIN, 15));
|
||||||
|
eventPanel.setPreferredSize(new Dimension(200, 30));
|
||||||
|
eventPanel.setMaximumSize(new Dimension(200, 30));
|
||||||
|
eventPanel.add(eventLabel);
|
||||||
|
agendaPanel.add(eventPanel);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPanel(Panel p)
|
public void setPanel(Panel p)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
package Applicatie;
|
package Applicatie;
|
||||||
|
|
||||||
import java.io.EOFException;
|
import java.io.EOFException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
@@ -7,48 +8,62 @@ import java.io.IOException;
|
|||||||
import java.io.ObjectInputStream;
|
import java.io.ObjectInputStream;
|
||||||
import java.io.ObjectOutputStream;
|
import java.io.ObjectOutputStream;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.filechooser.FileFilter;
|
import javax.swing.filechooser.FileFilter;
|
||||||
|
|
||||||
|
import Agenda.Agenda;
|
||||||
import Objects.DrawObject;
|
import Objects.DrawObject;
|
||||||
|
import Objects.Path;
|
||||||
|
|
||||||
public class SaveLoad {
|
public class SaveLoad
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
public static void save(Panel panel)
|
public static void save(Panel panel)
|
||||||
{
|
{
|
||||||
JFileChooser fileChooser = new JFileChooser();
|
JFileChooser fileChooser = new JFileChooser();
|
||||||
|
|
||||||
fileChooser.setFileFilter(new FileFilter() {
|
|
||||||
@Override
|
|
||||||
public boolean accept(File pathname) {
|
|
||||||
if(pathname.isFile() && pathname.getName().endsWith(".agn"))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}else if(pathname.isDirectory()){return true;}else{return false;}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
fileChooser.setFileFilter(new FileFilter()
|
||||||
public String getDescription() {
|
{
|
||||||
return ".agn";
|
@Override
|
||||||
|
public boolean accept(File pathname)
|
||||||
|
{
|
||||||
|
if (pathname.isFile() && pathname.getName().endsWith(".agn"))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (pathname.isDirectory())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
return ".agn";
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
fileChooser.setDialogTitle("Choose save location");
|
fileChooser.setDialogTitle("Choose save location");
|
||||||
int userSelection = fileChooser.showSaveDialog(null);
|
int userSelection = fileChooser.showSaveDialog(null);
|
||||||
|
|
||||||
if(userSelection == JFileChooser.APPROVE_OPTION)
|
if (userSelection == JFileChooser.APPROVE_OPTION)
|
||||||
{
|
{
|
||||||
File file = fileChooser.getSelectedFile();
|
File file = fileChooser.getSelectedFile();
|
||||||
if(!file.getName().endsWith(".agn"))
|
if (!file.getName().endsWith(".agn"))
|
||||||
{
|
{
|
||||||
file = new File(file.getAbsolutePath() + ".agn");
|
file = new File(file.getAbsolutePath() + ".agn");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(file.exists())
|
if (file.exists())
|
||||||
{
|
{
|
||||||
if(JOptionPane.showConfirmDialog(null, "Are you sure you want to overwrite: " + file.getName(), "Overwrite", JOptionPane.YES_NO_OPTION) == JOptionPane.OK_OPTION)
|
if (JOptionPane.showConfirmDialog(null, "Are you sure you want to overwrite: " + file.getName(), "Overwrite", JOptionPane.YES_NO_OPTION) == JOptionPane.OK_OPTION)
|
||||||
{
|
{
|
||||||
saveTerrain(file, panel);
|
saveTerrain(file, panel);
|
||||||
}
|
}
|
||||||
@@ -59,49 +74,70 @@ public class SaveLoad {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void saveTerrain(File file, Panel panel) {
|
|
||||||
|
|
||||||
try {
|
public static void saveTerrain(File file, Panel panel)
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
FileOutputStream fos = new FileOutputStream(file);
|
FileOutputStream fos = new FileOutputStream(file);
|
||||||
ObjectOutputStream oos = new ObjectOutputStream(fos);
|
ObjectOutputStream oos = new ObjectOutputStream(fos);
|
||||||
for (DrawObject object : panel.objects) {
|
oos.writeObject(panel.getAgenda());
|
||||||
|
for (DrawObject object : panel.objects)
|
||||||
|
{
|
||||||
|
object.setSelected(false);
|
||||||
oos.writeObject(object);
|
oos.writeObject(object);
|
||||||
}
|
}
|
||||||
|
for(Path p : panel.paths)
|
||||||
|
{
|
||||||
|
oos.writeObject(p);
|
||||||
|
}
|
||||||
oos.close();
|
oos.close();
|
||||||
JOptionPane.showMessageDialog(null, "Saved succesfully");
|
JOptionPane.showMessageDialog(null, "Saved succesfully");
|
||||||
} catch (IOException e) {
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void load(Panel panel)
|
public static void load(Panel panel)
|
||||||
{
|
{
|
||||||
JFileChooser fileChooser = new JFileChooser();
|
JFileChooser fileChooser = new JFileChooser();
|
||||||
fileChooser.setFileFilter(new FileFilter() {
|
fileChooser.setFileFilter(new FileFilter()
|
||||||
|
{
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(File pathname) {
|
public boolean accept(File pathname)
|
||||||
if(pathname.isFile() && pathname.getName().endsWith(".agn"))
|
{
|
||||||
|
if (pathname.isFile() && pathname.getName().endsWith(".agn"))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}else if(pathname.isDirectory()){return true;}else{return false;}
|
}
|
||||||
|
else if (pathname.isDirectory())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription()
|
||||||
|
{
|
||||||
return ".agn";
|
return ".agn";
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
fileChooser.setDialogTitle("Choose file");
|
fileChooser.setDialogTitle("Choose file");
|
||||||
int userSelection = fileChooser.showOpenDialog(null);
|
int userSelection = fileChooser.showOpenDialog(null);
|
||||||
|
|
||||||
if(userSelection == JFileChooser.APPROVE_OPTION)
|
if (userSelection == JFileChooser.APPROVE_OPTION)
|
||||||
{
|
{
|
||||||
File file = fileChooser.getSelectedFile();
|
File file = fileChooser.getSelectedFile();
|
||||||
if(!file.exists())
|
if (!file.exists())
|
||||||
{
|
{
|
||||||
JOptionPane.showMessageDialog(null, "This file does not exist: " + file.getName());
|
JOptionPane.showMessageDialog(null, "This file does not exist: " + file.getName());
|
||||||
}
|
}
|
||||||
@@ -112,33 +148,54 @@ public class SaveLoad {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void fillTerrain(File file, Panel panel)
|
||||||
public static void fillTerrain(File file, Panel panel) {
|
{
|
||||||
FileInputStream fis = null;
|
FileInputStream fis = null;
|
||||||
ObjectInputStream ois = null;
|
ObjectInputStream ois = null;
|
||||||
|
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
|
|
||||||
fis = new FileInputStream(file);
|
fis = new FileInputStream(file);
|
||||||
ois = new ObjectInputStream(fis);
|
ois = new ObjectInputStream(fis);
|
||||||
|
|
||||||
Object object;
|
Object object;
|
||||||
object = ois.readObject();
|
Agenda a = (Agenda) ois.readObject();
|
||||||
try {
|
panel.setAgenda(a);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
object = ois.readObject();
|
||||||
panel.clearObjects();
|
panel.clearObjects();
|
||||||
while (object != null) {
|
while (object != null)
|
||||||
panel.objects.add((DrawObject) object);
|
{
|
||||||
|
if (object instanceof Waypoint)
|
||||||
|
{
|
||||||
|
panel.addWaypoint((Waypoint) object);
|
||||||
|
panel.objects.add((DrawObject) object);
|
||||||
|
}
|
||||||
|
if (object instanceof Path)
|
||||||
|
{
|
||||||
|
Path p = (Path) object;
|
||||||
|
p.updateImage();
|
||||||
|
panel.paths.add((Path) object);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
panel.objects.add((DrawObject) object);
|
||||||
|
}
|
||||||
object = ois.readObject();
|
object = ois.readObject();
|
||||||
}
|
}
|
||||||
} catch (EOFException e) {
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
catch (EOFException e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
panel.update();
|
panel.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
@@ -19,7 +19,8 @@ import Objects.Entrance;
|
|||||||
import Objects.Path;
|
import Objects.Path;
|
||||||
import Objects.Stage;
|
import Objects.Stage;
|
||||||
|
|
||||||
public class Visitor {
|
public class Visitor
|
||||||
|
{
|
||||||
|
|
||||||
Point2D position;
|
Point2D position;
|
||||||
double rotation;
|
double rotation;
|
||||||
@@ -29,14 +30,15 @@ public class Visitor {
|
|||||||
ArrayList<Action> actions;
|
ArrayList<Action> actions;
|
||||||
Agenda agenda;
|
Agenda agenda;
|
||||||
ArrayList<DrawObject> objects;
|
ArrayList<DrawObject> objects;
|
||||||
|
|
||||||
ArrayList<Waypoint> waypoints;
|
ArrayList<Waypoint> waypoints;
|
||||||
GregorianCalendar date;
|
GregorianCalendar date;
|
||||||
int target;
|
int target;
|
||||||
int finalTarget;
|
int finalTarget;
|
||||||
|
|
||||||
public Visitor(String filename, Point2D position, Agenda agenda,
|
public Visitor(String filename, Point2D position, Agenda agenda, ArrayList<DrawObject> objects, ArrayList<Waypoint> waypoints, GregorianCalendar date)
|
||||||
ArrayList<DrawObject> objects, ArrayList<Waypoint> waypoints,
|
|
||||||
GregorianCalendar date) {
|
{
|
||||||
this.position = position;
|
this.position = position;
|
||||||
this.filename = filename;
|
this.filename = filename;
|
||||||
this.rotation = 0;
|
this.rotation = 0;
|
||||||
@@ -48,21 +50,19 @@ public class Visitor {
|
|||||||
this.agenda = agenda;
|
this.agenda = agenda;
|
||||||
this.objects = objects;
|
this.objects = objects;
|
||||||
fillActions();
|
fillActions();
|
||||||
System.out.println(actions.size());
|
|
||||||
for (Action a : actions){
|
|
||||||
System.out.println("" + a.getStartTime());
|
|
||||||
}
|
|
||||||
target = 1;
|
target = 1;
|
||||||
finalTarget = 4;
|
finalTarget = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void draw(Graphics2D g2) {
|
public void draw(Graphics2D g2)
|
||||||
|
{
|
||||||
AffineTransform tx = getTransform();
|
AffineTransform tx = getTransform();
|
||||||
Image image = Images.getImage(filename);
|
Image image = Images.getImage(filename);
|
||||||
g2.drawImage(image, tx, null);
|
g2.drawImage(image, tx, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private AffineTransform getTransform() {
|
private AffineTransform getTransform()
|
||||||
|
{
|
||||||
Image image = Images.getImage(filename);
|
Image image = Images.getImage(filename);
|
||||||
AffineTransform tx = new AffineTransform();
|
AffineTransform tx = new AffineTransform();
|
||||||
tx.scale(scale, scale);
|
tx.scale(scale, scale);
|
||||||
@@ -71,131 +71,153 @@ public class Visitor {
|
|||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DrawObject getEntrance() {
|
public DrawObject getEntrance()
|
||||||
for (DrawObject o : objects) {
|
{
|
||||||
if (o instanceof Entrance) {
|
for (DrawObject o : objects)
|
||||||
|
{
|
||||||
|
if (o instanceof Entrance)
|
||||||
|
{
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(ArrayList<DrawObject> objects, int currentTime,
|
public void update(ArrayList<DrawObject> objects, int currentTime, ArrayList<Visitor> visitors, ArrayList<Path> paths, Panel panel)
|
||||||
ArrayList<Visitor> visitors, ArrayList<Path> paths, Panel panel) {
|
{
|
||||||
DrawObject target = getEntrance();
|
DrawObject target = getEntrance();
|
||||||
for (Action a : actions) {
|
for (Action a : actions)
|
||||||
if (currentTime >= a.getStartTime()
|
{
|
||||||
&& currentTime < a.getStoptime()) {
|
if (currentTime >= a.getStartTime() && currentTime < a.getStoptime())
|
||||||
finalTarget = a.getWaypoint().getSelf();
|
{
|
||||||
|
this.finalTarget = a.getWaypoint().getSelf();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// moveToTarget(target, objects, visitors, paths);
|
// moveToTarget(target, objects, visitors, paths);
|
||||||
move(target, panel);
|
move(target, panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void move(DrawObject tar, Panel panel) {
|
public void move(DrawObject tar, Panel panel)
|
||||||
Point2D targetPoint = panel.getWaypoint(target).getPosition();
|
{
|
||||||
|
System.out.println("CurrentTarget: " + target);
|
||||||
|
System.out.println("FinalTarget: " + finalTarget);
|
||||||
|
Point2D targetPoint = panel.getWaypoint(target).getAccuratePoint();
|
||||||
|
|
||||||
double newRot = Math.atan2(targetPoint.getY() - position.getY(),
|
double newRot = Math.atan2(targetPoint.getY() - position.getY(), targetPoint.getX() - position.getX());
|
||||||
targetPoint.getX() - position.getX());
|
|
||||||
|
|
||||||
int difx = (int) (targetPoint.getX() - position.getX());
|
int difx = (int) (targetPoint.getX() - position.getX());
|
||||||
int dify = (int) (targetPoint.getY() - position.getY());
|
int dify = (int) (targetPoint.getY() - position.getY());
|
||||||
int distance = (int) Math.sqrt((difx * difx) + (dify * dify));
|
int distance = (int) Math.sqrt((difx * difx) + (dify * dify));
|
||||||
|
|
||||||
if (rotation > newRot && distance > 10) {
|
if (rotation > newRot && distance > 10)
|
||||||
|
{
|
||||||
rotation -= 0.15;
|
rotation -= 0.15;
|
||||||
} else if (rotation < newRot && distance > 10) {
|
}
|
||||||
|
else if (rotation < newRot && distance > 10)
|
||||||
|
{
|
||||||
rotation += 0.15;
|
rotation += 0.15;
|
||||||
}
|
}
|
||||||
|
|
||||||
Point2D oldPosition = position;
|
Point2D oldPosition = position;
|
||||||
|
|
||||||
// face direction
|
// face direction
|
||||||
float directionX = (float) Math.cos(rotation);
|
float directionX = (float) Math.cos(rotation);
|
||||||
float directionY = (float) Math.sin(rotation);
|
float directionY = (float) Math.sin(rotation);
|
||||||
|
|
||||||
if (distance > 10) {
|
if (distance > 10)
|
||||||
position = new Point2D.Double(
|
{
|
||||||
(position.getX() + directionX * speed),
|
position = new Point2D.Double((position.getX() + directionX * speed), (position.getY() + directionY * speed));
|
||||||
(position.getY() + directionY * speed));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean possible = true;
|
boolean possible = true;
|
||||||
for (DrawObject object : objects) {
|
for (DrawObject object : objects)
|
||||||
if (object instanceof Entrance || object instanceof Waypoint) {
|
{
|
||||||
|
if (object instanceof Entrance || object instanceof Waypoint)
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (hasCollisionDO(object)) {
|
|
||||||
|
if (hasCollisionDO(object))
|
||||||
|
{
|
||||||
possible = false;
|
possible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (possible == false) {
|
if (possible == false)
|
||||||
|
{
|
||||||
position = oldPosition;
|
position = oldPosition;
|
||||||
rotation += 0.2;
|
rotation += 0.2;
|
||||||
}
|
}
|
||||||
if (checkIfOnWaypoint(panel)) {
|
if (checkIfOnWaypoint(panel))
|
||||||
// for(int i : panel.getWaypoint(target).getOptions())
|
{
|
||||||
// {
|
|
||||||
// if(i == finalTarget)
|
|
||||||
// {
|
|
||||||
// target = finalTarget;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// ArrayList<int[]> options = new ArrayList<int[]>();
|
|
||||||
HashMap<Integer, int[]> options = new HashMap<Integer, int[]>();
|
HashMap<Integer, int[]> options = new HashMap<Integer, int[]>();
|
||||||
for (Waypoint w : panel.getWaypoints()) {
|
for (Waypoint w : panel.getWaypoints())
|
||||||
|
{
|
||||||
options.put(w.getSelf(), w.getOptions());
|
options.put(w.getSelf(), w.getOptions());
|
||||||
}
|
}
|
||||||
for (Map.Entry<Integer, int[]> e : options.entrySet()) {
|
|
||||||
System.out.println(e.getKey());
|
for (Map.Entry<Integer, int[]> e : options.entrySet())
|
||||||
System.out.println("=====================");
|
{
|
||||||
for (int i : e.getValue()) {
|
for (int i : e.getValue())
|
||||||
System.out.println(i);
|
{
|
||||||
|
if (finalTarget != target)
|
||||||
|
{
|
||||||
|
if (finalTarget == i && e.getKey() == target)
|
||||||
|
{
|
||||||
|
target = finalTarget;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (finalTarget == i)
|
||||||
|
{
|
||||||
|
target = e.getKey();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
System.out.println("----------");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean checkIfOnWaypoint(Panel panel) {
|
public boolean checkIfOnWaypoint(Panel panel)
|
||||||
if (panel.getWaypoint(target).contains(position)) {
|
{
|
||||||
|
if (panel.getWaypoint(target).contains(position))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void moveToTarget(DrawObject target, ArrayList<DrawObject> objects,
|
public void moveToTarget(DrawObject target, ArrayList<DrawObject> objects, ArrayList<Visitor> visitors, ArrayList<Path> paths)
|
||||||
ArrayList<Visitor> visitors, ArrayList<Path> paths) {
|
{
|
||||||
Point2D tar = target.getPosition();
|
Point2D tar = target.getPosition();
|
||||||
boolean hasPathBelow = false;
|
boolean hasPathBelow = false;
|
||||||
for (Path p : paths) {
|
for (Path p : paths)
|
||||||
if (p.containsPoint(position)) {
|
{
|
||||||
|
if (p.containsPoint(position))
|
||||||
|
{
|
||||||
hasPathBelow = true;
|
hasPathBelow = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Shape containsShape = p.containsPointShape(position);
|
Shape containsShape = p.containsPointShape(position);
|
||||||
if (containsShape != null) {
|
if (containsShape != null)
|
||||||
tar = new Point2D.Double(
|
{
|
||||||
containsShape.getBounds().getCenterX(), containsShape
|
tar = new Point2D.Double(containsShape.getBounds().getCenterX(), containsShape.getBounds().getCenterY());
|
||||||
.getBounds().getCenterY());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasPathBelow) {
|
if (hasPathBelow)
|
||||||
double newRot = Math.atan2(tar.getY() - position.getY(), tar.getX()
|
{
|
||||||
- position.getX());
|
double newRot = Math.atan2(tar.getY() - position.getY(), tar.getX() - position.getX());
|
||||||
|
|
||||||
int difx = (int) (tar.getX() - position.getX());
|
int difx = (int) (tar.getX() - position.getX());
|
||||||
int dify = (int) (tar.getY() - position.getY());
|
int dify = (int) (tar.getY() - position.getY());
|
||||||
int distance = (int) Math.sqrt((difx * difx) + (dify * dify));
|
int distance = (int) Math.sqrt((difx * difx) + (dify * dify));
|
||||||
|
|
||||||
if (rotation > newRot && distance > 10) {
|
if (rotation > newRot && distance > 10)
|
||||||
|
{
|
||||||
rotation -= 0.15;
|
rotation -= 0.15;
|
||||||
} else if (rotation < newRot && distance > 10) {
|
}
|
||||||
|
else if (rotation < newRot && distance > 10)
|
||||||
|
{
|
||||||
rotation += 0.15;
|
rotation += 0.15;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,30 +227,40 @@ public class Visitor {
|
|||||||
float directionX = (float) Math.cos(rotation);
|
float directionX = (float) Math.cos(rotation);
|
||||||
float directionY = (float) Math.sin(rotation);
|
float directionY = (float) Math.sin(rotation);
|
||||||
|
|
||||||
if (distance > 10) {
|
if (distance > 10)
|
||||||
position = new Point2D.Double((position.getX() + directionX
|
{
|
||||||
* speed), (position.getY() + directionY * speed));
|
position = new Point2D.Double((position.getX() + directionX * speed), (position.getY() + directionY * speed));
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean possible = true;
|
boolean possible = true;
|
||||||
for (DrawObject object : objects) {
|
for (DrawObject object : objects)
|
||||||
if (hasCollisionDO(object)) {
|
{
|
||||||
|
if (hasCollisionDO(object))
|
||||||
|
{
|
||||||
possible = false;
|
possible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Visitor object : visitors) {
|
for (Visitor object : visitors)
|
||||||
if (hasCollision(object) && object != this) {
|
{
|
||||||
|
|
||||||
|
if (hasCollision(object) && object != this)
|
||||||
|
{
|
||||||
possible = false;
|
possible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (possible == false) {
|
if (possible == false)
|
||||||
|
{
|
||||||
position = oldPosition;
|
position = oldPosition;
|
||||||
rotation += 0.2;
|
rotation += 0.2;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
HashMap<Double, Shape> values = new HashMap<Double, Shape>();
|
HashMap<Double, Shape> values = new HashMap<Double, Shape>();
|
||||||
for (Path p : paths) {
|
for (Path p : paths)
|
||||||
for (Shape s : p.getPath()) {
|
{
|
||||||
|
for (Shape s : p.getPath())
|
||||||
|
{
|
||||||
Rectangle b = s.getBounds();
|
Rectangle b = s.getBounds();
|
||||||
double maxx = b.getMaxX();
|
double maxx = b.getMaxX();
|
||||||
double minx = b.getMinX();
|
double minx = b.getMinX();
|
||||||
@@ -242,14 +274,16 @@ public class Visitor {
|
|||||||
points[3] = new Point2D.Double(maxx, maxy);
|
points[3] = new Point2D.Double(maxx, maxy);
|
||||||
|
|
||||||
Double lastdistance = null;
|
Double lastdistance = null;
|
||||||
for (Point2D.Double point : points) {
|
for (Point2D.Double point : points)
|
||||||
double distance = Point2D.distance(point.getX(),
|
{
|
||||||
point.getY(), position.getX(), position.getY());
|
double distance = Point2D.distance(point.getX(), point.getY(), position.getX(), position.getY());
|
||||||
if (lastdistance == null) {
|
if (lastdistance == null)
|
||||||
|
{
|
||||||
lastdistance = distance;
|
lastdistance = distance;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (distance < lastdistance) {
|
if (distance < lastdistance)
|
||||||
|
{
|
||||||
lastdistance = distance;
|
lastdistance = distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -259,31 +293,35 @@ public class Visitor {
|
|||||||
}
|
}
|
||||||
Double lastdistance = null;
|
Double lastdistance = null;
|
||||||
Shape lastShape = null;
|
Shape lastShape = null;
|
||||||
for (Map.Entry<Double, Shape> e : values.entrySet()) {
|
for (Map.Entry<Double, Shape> e : values.entrySet())
|
||||||
|
{
|
||||||
double distance = e.getKey();
|
double distance = e.getKey();
|
||||||
if (lastdistance == null) {
|
if (lastdistance == null)
|
||||||
|
{
|
||||||
lastdistance = distance;
|
lastdistance = distance;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (distance < lastdistance) {
|
if (distance < lastdistance)
|
||||||
|
{
|
||||||
lastdistance = distance;
|
lastdistance = distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lastShape = values.get(lastdistance);
|
lastShape = values.get(lastdistance);
|
||||||
|
|
||||||
Point2D.Double target2 = new Point2D.Double(lastShape.getBounds()
|
Point2D.Double target2 = new Point2D.Double(lastShape.getBounds().getCenterX(), lastShape.getBounds().getCenterY());
|
||||||
.getCenterX(), lastShape.getBounds().getCenterY());
|
|
||||||
|
|
||||||
double newRot = Math.atan2(target2.getY() - position.getY(),
|
double newRot = Math.atan2(target2.getY() - position.getY(), target2.getX() - position.getX());
|
||||||
target2.getX() - position.getX());
|
|
||||||
|
|
||||||
int difx = (int) (target2.getX() - position.getX());
|
int difx = (int) (target2.getX() - position.getX());
|
||||||
int dify = (int) (target2.getY() - position.getY());
|
int dify = (int) (target2.getY() - position.getY());
|
||||||
int distance = (int) Math.sqrt((difx * difx) + (dify * dify));
|
int distance = (int) Math.sqrt((difx * difx) + (dify * dify));
|
||||||
|
|
||||||
if (rotation > newRot && distance > 10) {
|
if (rotation > newRot && distance > 10)
|
||||||
|
{
|
||||||
rotation -= 0.15;
|
rotation -= 0.15;
|
||||||
} else if (rotation < newRot && distance > 10) {
|
}
|
||||||
|
else if (rotation < newRot && distance > 10)
|
||||||
|
{
|
||||||
rotation += 0.15;
|
rotation += 0.15;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -293,118 +331,127 @@ public class Visitor {
|
|||||||
float directionX = (float) Math.cos(rotation);
|
float directionX = (float) Math.cos(rotation);
|
||||||
float directionY = (float) Math.sin(rotation);
|
float directionY = (float) Math.sin(rotation);
|
||||||
|
|
||||||
if (distance > 10) {
|
if (distance > 10)
|
||||||
position = new Point2D.Double((position.getX() + directionX
|
{
|
||||||
* speed), (position.getY() + directionY * speed));
|
position = new Point2D.Double((position.getX() + directionX * speed), (position.getY() + directionY * speed));
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean possible = true;
|
boolean possible = true;
|
||||||
for (DrawObject object : objects) {
|
for (DrawObject object : objects)
|
||||||
if (hasCollisionDO(object)) {
|
{
|
||||||
|
if (hasCollisionDO(object))
|
||||||
|
{
|
||||||
possible = false;
|
possible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Visitor object : visitors) {
|
for (Visitor object : visitors)
|
||||||
if (hasCollision(object) && object != this) {
|
{
|
||||||
|
if (hasCollision(object) && object != this)
|
||||||
|
{
|
||||||
possible = false;
|
possible = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (possible == false) {
|
if (possible == false)
|
||||||
|
{
|
||||||
position = oldPosition;
|
position = oldPosition;
|
||||||
rotation += 0.2;
|
rotation += 0.2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("static-access")
|
||||||
public void fillActions() {
|
public void fillActions()
|
||||||
|
{
|
||||||
int startTime = 540;
|
int startTime = 540;
|
||||||
int stopTime = 1260;
|
int stopTime = 1260;
|
||||||
|
|
||||||
while (startTime < stopTime) {
|
while (startTime < stopTime)
|
||||||
|
{
|
||||||
int random = (int) Math.floor(Math.random() * 51);
|
int random = (int) Math.floor(Math.random() * 51);
|
||||||
if (random < 30) {
|
if (random < 40)
|
||||||
|
{
|
||||||
Point2D position = null;
|
Point2D position = null;
|
||||||
DrawObject targetStage = null;
|
DrawObject targetStage = null;
|
||||||
ArrayList<Event> posEvents = new ArrayList<Event>();
|
ArrayList<Event> posEvents = new ArrayList<Event>();
|
||||||
for (Event e : agenda.getEvents()) {
|
for (Event e : agenda.getEvents())
|
||||||
if (startTime >= e.getStart() && startTime < e.getStop()) {
|
{
|
||||||
|
if (startTime >= e.getStart() && startTime < e.getStop())
|
||||||
|
{
|
||||||
posEvents.add(e);
|
posEvents.add(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int totalPopularity = 0;
|
|
||||||
for (Event ev : posEvents){
|
|
||||||
totalPopularity += ev.getExpectedPopularity();
|
|
||||||
}
|
|
||||||
|
|
||||||
Random rand = new Random();
|
if (posEvents.size() != 0)
|
||||||
int n = rand.nextInt(totalPopularity) + 1;
|
{
|
||||||
int currentPop = 0;
|
int r = (int) Math.floor(Math.random() * posEvents.size());
|
||||||
if (posEvents != null){
|
Event evs = posEvents.get(r);
|
||||||
for (Event evs : posEvents){
|
for (DrawObject d : objects)
|
||||||
int before = currentPop;
|
{
|
||||||
currentPop = currentPop + evs.getExpectedPopularity();
|
if (d.getFileName().equals("stage"))
|
||||||
if (before < n && currentPop >= n){
|
{
|
||||||
for (DrawObject d : objects) {
|
Stage s = (Stage) d;
|
||||||
if (d.getFileName().equals("stage")) {
|
if (s.getStage().getName().equals(evs.getStage().getName()))
|
||||||
Stage s = (Stage) d;
|
{
|
||||||
if (s.getStage().getName()
|
position = s.getPosition();
|
||||||
.equals(evs.getStage().getName())) {
|
targetStage = d;
|
||||||
position = s.getPosition();
|
|
||||||
targetStage = d;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int randomtime = (int) (40 + (Math.random() * (60 - 40)));
|
int randomtime = (int) (40 + (Math.random() * (60 - 40)));
|
||||||
if (position != null) {
|
if (position != null)
|
||||||
Waypoint w = getClosedWaypoint(position);
|
{
|
||||||
actions.add(new Action(position, startTime, randomtime,
|
Waypoint w = getClosestWaypoint(position);
|
||||||
targetStage, w));
|
actions.add(new Action(position, startTime, randomtime, targetStage, w));
|
||||||
}
|
}
|
||||||
startTime = startTime + randomtime;
|
startTime = startTime + randomtime;
|
||||||
|
|
||||||
} else if (random >= 30 && random < 40) {
|
}
|
||||||
|
else if (random >= 40 && random < 45)
|
||||||
|
{
|
||||||
Point2D position = null;
|
Point2D position = null;
|
||||||
DrawObject targetStage = null;
|
DrawObject targetStage = null;
|
||||||
ArrayList<DrawObject> foodPlaces = new ArrayList<DrawObject>();
|
ArrayList<DrawObject> foodPlaces = new ArrayList<DrawObject>();
|
||||||
for (DrawObject d : objects) {
|
for (DrawObject d : objects)
|
||||||
if (d.getFileName().equals("food")) {
|
{
|
||||||
|
if (d.getFileName().equals("food"))
|
||||||
|
{
|
||||||
foodPlaces.add(d);
|
foodPlaces.add(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foodPlaces.size() != 0) {
|
if (foodPlaces.size() != 0)
|
||||||
|
{
|
||||||
int r = (int) Math.floor(Math.random() * foodPlaces.size());
|
int r = (int) Math.floor(Math.random() * foodPlaces.size());
|
||||||
position = foodPlaces.get(r).getPosition();
|
position = foodPlaces.get(r).getPosition();
|
||||||
targetStage = foodPlaces.get(r);
|
targetStage = foodPlaces.get(r);
|
||||||
Waypoint w = getClosedWaypoint(position);
|
Waypoint w = getClosestWaypoint(position);
|
||||||
actions.add(new Action(position, startTime, 35,
|
actions.add(new Action(position, startTime, 35, targetStage, w));
|
||||||
targetStage, w));
|
|
||||||
startTime = startTime + 20;
|
startTime = startTime + 20;
|
||||||
}
|
}
|
||||||
startTime = startTime + 35;
|
startTime = startTime + 35;
|
||||||
|
|
||||||
} else if (random >= 40) {
|
}
|
||||||
|
else if (random > 45)
|
||||||
|
{
|
||||||
Point2D position = null;
|
Point2D position = null;
|
||||||
DrawObject targetStage = null;
|
DrawObject targetStage = null;
|
||||||
ArrayList<DrawObject> toilets = new ArrayList<DrawObject>();
|
ArrayList<DrawObject> toilets = new ArrayList<DrawObject>();
|
||||||
for (DrawObject d : objects) {
|
for (DrawObject d : objects)
|
||||||
if (d.getFileName().equals("wc")) {
|
{
|
||||||
|
if (d.getFileName().equals("wc"))
|
||||||
|
{
|
||||||
toilets.add(d);
|
toilets.add(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (toilets.size() != 0) {
|
if (toilets.size() != 0)
|
||||||
|
{
|
||||||
int r = (int) Math.floor(Math.random() * toilets.size());
|
int r = (int) Math.floor(Math.random() * toilets.size());
|
||||||
position = toilets.get(r).getPosition();
|
position = toilets.get(r).getPosition();
|
||||||
targetStage = toilets.get(r);
|
targetStage = toilets.get(r);
|
||||||
Waypoint w = getClosedWaypoint(position);
|
Waypoint w = getClosestWaypoint(position);
|
||||||
actions.add(new Action(position, startTime, 35,
|
actions.add(new Action(position, startTime, 35, targetStage, w));
|
||||||
targetStage, w));
|
|
||||||
startTime = startTime + 20;
|
startTime = startTime + 20;
|
||||||
}
|
}
|
||||||
startTime = startTime + 35;
|
startTime = startTime + 35;
|
||||||
@@ -413,11 +460,14 @@ public class Visitor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Waypoint getClosedWaypoint(Point2D point) {
|
public Waypoint getClosestWaypoint(Point2D point)
|
||||||
|
{
|
||||||
Waypoint waypoint = null;
|
Waypoint waypoint = null;
|
||||||
int distance = 10000;
|
int distance = 10000;
|
||||||
for (Waypoint w : waypoints) {
|
for (Waypoint w : waypoints)
|
||||||
if (w.getPosition().distance(point) < distance) {
|
{
|
||||||
|
if (w.getPosition().distance(point) < distance)
|
||||||
|
{
|
||||||
waypoint = w;
|
waypoint = w;
|
||||||
distance = (int) w.getPosition().distance(point);
|
distance = (int) w.getPosition().distance(point);
|
||||||
}
|
}
|
||||||
@@ -425,15 +475,12 @@ public class Visitor {
|
|||||||
return waypoint;
|
return waypoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasCollisionDO(DrawObject object) {
|
public boolean hasCollisionDO(DrawObject object)
|
||||||
|
{
|
||||||
Image image = Images.getImage(filename);
|
Image image = Images.getImage(filename);
|
||||||
Image image2 = Images.getImage(object.getFileName());
|
Image image2 = Images.getImage(object.getFileName());
|
||||||
Rectangle recta = new Rectangle((int) position.getX(),
|
Rectangle recta = new Rectangle((int) position.getX(), (int) position.getY(), image.getWidth(null), image.getHeight(null));
|
||||||
(int) position.getY(), image.getWidth(null),
|
Rectangle rectb = new Rectangle((int) object.getPosition().getX(), (int) object.getPosition().getY(), image2.getWidth(null), image2.getHeight(null));
|
||||||
image.getHeight(null));
|
|
||||||
Rectangle rectb = new Rectangle((int) object.getPosition().getX(),
|
|
||||||
(int) object.getPosition().getY(), image2.getWidth(null),
|
|
||||||
image2.getHeight(null));
|
|
||||||
|
|
||||||
Area a = new Area(recta);
|
Area a = new Area(recta);
|
||||||
Area b = new Area(rectb);
|
Area b = new Area(rectb);
|
||||||
@@ -442,26 +489,23 @@ public class Visitor {
|
|||||||
transA.rotate(rotation, position.getX(), position.getY());
|
transA.rotate(rotation, position.getX(), position.getY());
|
||||||
|
|
||||||
AffineTransform transB = new AffineTransform();
|
AffineTransform transB = new AffineTransform();
|
||||||
transB.rotate(Math.toRadians(object.getRotation()), object
|
transB.rotate(Math.toRadians(object.getRotation()), object.getPosition().getX(), object.getPosition().getY());
|
||||||
.getPosition().getX(), object.getPosition().getY());
|
|
||||||
|
|
||||||
Area aa = a.createTransformedArea(transA);
|
Area aa = a.createTransformedArea(transA);
|
||||||
Area bb = b.createTransformedArea(transB);
|
Area bb = b.createTransformedArea(transB);
|
||||||
|
|
||||||
if (bb.intersects(aa.getBounds2D())) {
|
if (bb.intersects(aa.getBounds2D()))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasCollision(Visitor v) {
|
public boolean hasCollision(Visitor v)
|
||||||
|
{
|
||||||
Image image = Images.getImage(filename);
|
Image image = Images.getImage(filename);
|
||||||
Rectangle a = new Rectangle((int) position.getX(),
|
Rectangle a = new Rectangle((int) position.getX(), (int) position.getY(), image.getWidth(null), image.getHeight(null));
|
||||||
(int) position.getY(), image.getWidth(null),
|
Rectangle b = new Rectangle((int) v.position.getX(), (int) v.position.getY(), image.getWidth(null), image.getHeight(null));
|
||||||
image.getHeight(null));
|
|
||||||
Rectangle b = new Rectangle((int) v.position.getX(),
|
|
||||||
(int) v.position.getY(), image.getWidth(null),
|
|
||||||
image.getHeight(null));
|
|
||||||
|
|
||||||
Area aa = new Area(a);
|
Area aa = new Area(a);
|
||||||
Area bb = new Area(b);
|
Area bb = new Area(b);
|
||||||
@@ -475,9 +519,10 @@ public class Visitor {
|
|||||||
Area ra = aa.createTransformedArea(af);
|
Area ra = aa.createTransformedArea(af);
|
||||||
Area rb = bb.createTransformedArea(bf);
|
Area rb = bb.createTransformedArea(bf);
|
||||||
|
|
||||||
if (ra.intersects(rb.getBounds2D())) {
|
if (ra.intersects(rb.getBounds2D()))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,11 @@ public class Waypoint extends DrawObject
|
|||||||
super("waypoint", position);
|
super("waypoint", position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Point2D getAccuratePoint()
|
||||||
|
{
|
||||||
|
return new Point2D.Double(super.getPosition().getX() + (super.getImageRectangle().getWidth()/2), super.getPosition().getY() + super.getImageRectangle().getHeight());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
@@ -36,7 +41,6 @@ public class Waypoint extends DrawObject
|
|||||||
|
|
||||||
public void setSelf(int self)
|
public void setSelf(int self)
|
||||||
{
|
{
|
||||||
System.out.println(self);
|
|
||||||
this.self = self;
|
this.self = self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class WaypointPopup extends JFrame {
|
|||||||
panel1.add(name);
|
panel1.add(name);
|
||||||
row1.add(panel1);
|
row1.add(panel1);
|
||||||
|
|
||||||
JTextField tf = new JTextField(10);
|
JTextField tf = new JTextField(wp.getSelf() + "", 10);
|
||||||
row2.add(tf);
|
row2.add(tf);
|
||||||
|
|
||||||
JPanel panel2 = new JPanel();
|
JPanel panel2 = new JPanel();
|
||||||
@@ -73,7 +73,21 @@ public class WaypointPopup extends JFrame {
|
|||||||
empty2.add(Box.createRigidArea(new Dimension(0, 5)));
|
empty2.add(Box.createRigidArea(new Dimension(0, 5)));
|
||||||
row2.add(empty2);
|
row2.add(empty2);
|
||||||
|
|
||||||
JTextField tx = new JTextField(8);
|
String optionss = "";
|
||||||
|
if(wp.getOptions() != null)
|
||||||
|
{
|
||||||
|
if(wp.getOptions().length != 0)
|
||||||
|
{
|
||||||
|
int[] optionsa = wp.getOptions();
|
||||||
|
optionss += optionsa[0];
|
||||||
|
for(int i = 1; i < optionsa.length; i++)
|
||||||
|
{
|
||||||
|
optionss += "-" + optionsa[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
JTextField tx = new JTextField("" + optionss, 8);
|
||||||
row2.add(tx);
|
row2.add(tx);
|
||||||
|
|
||||||
JPanel help = new JPanel();
|
JPanel help = new JPanel();
|
||||||
@@ -104,6 +118,17 @@ public class WaypointPopup extends JFrame {
|
|||||||
});
|
});
|
||||||
south.add(edit);
|
south.add(edit);
|
||||||
|
|
||||||
|
JButton cancel = new JButton("Cancel");
|
||||||
|
cancel.addActionListener(new ActionListener()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void actionPerformed(ActionEvent e)
|
||||||
|
{
|
||||||
|
dispose();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
south.add(cancel);
|
||||||
|
|
||||||
setContentPane(content);
|
setContentPane(content);
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
setSize(300,250);
|
setSize(300,250);
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import java.awt.Color;
|
|||||||
import java.awt.event.MouseAdapter;
|
import java.awt.event.MouseAdapter;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.awt.geom.Point2D;
|
import java.awt.geom.Point2D;
|
||||||
import java.awt.geom.Rectangle2D;
|
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
|
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
@@ -16,7 +15,6 @@ import Applicatie.Waypoint;
|
|||||||
import Applicatie.WaypointPopup;
|
import Applicatie.WaypointPopup;
|
||||||
import Objects.DrawObject;
|
import Objects.DrawObject;
|
||||||
import Objects.Path;
|
import Objects.Path;
|
||||||
import Objects.Entrance;
|
|
||||||
|
|
||||||
public class Mouse extends MouseAdapter
|
public class Mouse extends MouseAdapter
|
||||||
{
|
{
|
||||||
@@ -130,7 +128,7 @@ public class Mouse extends MouseAdapter
|
|||||||
{
|
{
|
||||||
if (SwingUtilities.isRightMouseButton(e))
|
if (SwingUtilities.isRightMouseButton(e))
|
||||||
{
|
{
|
||||||
new PathPopup(clickedPath, panel);
|
//new PathPopup(clickedPath, panel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -169,8 +167,15 @@ public class Mouse extends MouseAdapter
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
panel.getDragObject().setPosition(panel.getSelectionPosition());
|
if (panel.getDragObject() instanceof Waypoint == false)
|
||||||
panel.getDragObject().setRectangleColor(Color.BLACK);
|
{
|
||||||
|
panel.getDragObject().setPosition(panel.getSelectionPosition());
|
||||||
|
panel.getDragObject().setRectangleColor(Color.BLACK);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
panel.getDragObject().setRectangleColor(Color.BLACK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
panel.setSelectionPosition(panel.getSelectedObject().getPosition());
|
panel.setSelectionPosition(panel.getSelectedObject().getPosition());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import java.io.Serializable;
|
|||||||
import javax.swing.ImageIcon;
|
import javax.swing.ImageIcon;
|
||||||
|
|
||||||
import Applicatie.Images;
|
import Applicatie.Images;
|
||||||
|
import Applicatie.Panel;
|
||||||
|
|
||||||
public abstract class DrawObject implements Serializable
|
public abstract class DrawObject implements Serializable
|
||||||
{
|
{
|
||||||
@@ -232,13 +233,30 @@ public abstract class DrawObject implements Serializable
|
|||||||
|
|
||||||
public void setPosition(Point2D position)
|
public void setPosition(Point2D position)
|
||||||
{
|
{
|
||||||
|
if(position.getX() < -Panel.getFieldWidth()/2)
|
||||||
|
{
|
||||||
|
position.setLocation(-Panel.getFieldWidth()/2, position.getY());
|
||||||
|
}
|
||||||
|
if(position.getY() < -Panel.getFieldHeight()/2)
|
||||||
|
{
|
||||||
|
position.setLocation(position.getX(), -Panel.getFieldHeight()/2);
|
||||||
|
}
|
||||||
|
if(position.getX() > Panel.getFieldWidth()/2 - width)
|
||||||
|
{
|
||||||
|
position.setLocation(Panel.getFieldWidth()/2-width, position.getY());
|
||||||
|
}
|
||||||
|
if(position.getY() > Panel.getFieldHeight()/2 - height)
|
||||||
|
{
|
||||||
|
position.setLocation(position.getX(), Panel.getFieldHeight()/2-height);
|
||||||
|
}
|
||||||
this.position = position;
|
this.position = position;
|
||||||
}
|
}
|
||||||
public void setPosition(Point2D position, boolean b)
|
public void setPosition(Point2D position, boolean b)
|
||||||
{
|
{
|
||||||
this.position = position;
|
setPosition(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public double getRotation()
|
public double getRotation()
|
||||||
{
|
{
|
||||||
return rotation;
|
return rotation;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import java.awt.geom.Rectangle2D;
|
|||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
@@ -23,13 +24,15 @@ import Applicatie.Waypoint;
|
|||||||
* @author Wesley de Hek
|
* @author Wesley de Hek
|
||||||
* @version 1.2
|
* @version 1.2
|
||||||
*/
|
*/
|
||||||
public class Path
|
public class Path implements Serializable
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5345485798486018597L;
|
||||||
|
|
||||||
private ArrayList<Point2D> points;
|
private ArrayList<Point2D> points;
|
||||||
private ArrayList<Shape> lines;
|
private ArrayList<Shape> lines;
|
||||||
private Point2D tempPoint;
|
private Point2D tempPoint;
|
||||||
private BufferedImage pathBackground;
|
public transient BufferedImage pathBackground = null;;
|
||||||
private ArrayList<Waypoint> waypoints;
|
private ArrayList<Waypoint> waypoints;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,6 +52,18 @@ public class Path
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateImage()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pathBackground = ImageIO.read(new File("images/newPath.png"));
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws the path.
|
* Draws the path.
|
||||||
|
|||||||
|
After Width: | Height: | Size: 897 B |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 180 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 202 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 911 B |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 155 B |
|
After Width: | Height: | Size: 197 B |