New terrain

This commit is contained in:
xrgman
2015-04-07 14:56:59 +02:00
parent b2b2388f6f
commit 65f428c572
16 changed files with 724 additions and 56 deletions
+56 -8
View File
@@ -17,19 +17,40 @@ public class MenuBar extends JMenuBar
JMenu file = new JMenu("File");
JMenuItem newPath = new JMenuItem("New Path");
newPath.addActionListener(new ActionListener() {
JMenuItem item = new JMenuItem("New");
item.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
w.getPanel().startPath();
NewWorldPanel world = new NewWorldPanel(w.getPanel());
}
});
file.add(item);
file.add(newPath);
item = new JMenuItem("Open");
item.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
}
});
file.add(item);
JMenuItem exit = new JMenuItem("Exit");
exit.addActionListener(new ActionListener()
item = new JMenuItem("Save");
item.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
}
});
file.add(item);
file.addSeparator();
item = new JMenuItem("Exit");
item.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
@@ -37,8 +58,35 @@ public class MenuBar extends JMenuBar
}
});
file.add(exit);
file.add(item);
add(file);
file = new JMenu("Path");
item = new JMenuItem("New Path");
item.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
w.getPanel().startPath();
}
});
file.add(item);
add(file);
file = new JMenu("Help");
item = new JMenuItem("About");
item.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(w.getFrames()[0],"Festivalplanner\nMade by: Wesley de Hek, Kenneth van Ewijk, Remco Sannen, Yorick Rommers & Guus van Dongen ");
}
});
file.add(item);
add(file);
}
}
+103
View File
@@ -0,0 +1,103 @@
package Applicatie;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class NewWorldPanel extends JFrame {
public NewWorldPanel(Panel topPanel) {
super("New World");
setDefaultCloseOperation(HIDE_ON_CLOSE);
String[] terrains = {"Grass", "Sand"};
JPanel mainPanel = new JPanel(new BorderLayout());
JButton button;
JLabel label;
JTextField heightTextField;
JTextField widthTextField;
JComboBox terrainBox;
//Top:
JPanel panel = new JPanel();
BoxLayout box = new BoxLayout(panel, BoxLayout.Y_AXIS);
panel.setLayout(box);
panel.add(Box.createRigidArea(new Dimension(0,20)));
label = new JLabel("Enter your preferences: ");
panel.add(label);
panel.add(Box.createRigidArea(new Dimension(0,15)));
//Width:
JPanel linePanel = new JPanel();
label = new JLabel("Width: ");
widthTextField = new JTextField("1920");
widthTextField.setPreferredSize(new Dimension(100,20));
linePanel.add(label);
linePanel.add(widthTextField);
panel.add(linePanel);
//Height:
linePanel = new JPanel();
label = new JLabel("Height: ");
heightTextField = new JTextField("1080");
heightTextField.setPreferredSize(new Dimension(100,20));
linePanel.add(label);
linePanel.add(heightTextField);
panel.add(linePanel);
//Terrain:
linePanel = new JPanel();
label = new JLabel("Terrain: ");
terrainBox = new JComboBox(terrains);
terrainBox.setPreferredSize(new Dimension(100,20));
linePanel.add(label);
linePanel.add(terrainBox);
panel.add(linePanel);
//Image:
mainPanel.add(panel,BorderLayout.NORTH);
//Bottom:
panel = new JPanel();
//Cancel:
button = new JButton("Cancel");
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
NewWorldPanel.this.dispose();
}
});
panel.add(button);
button = new JButton("Apply");
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
topPanel.newWorld(Integer.parseInt(widthTextField.getText()),Integer.parseInt(heightTextField.getText()),terrainBox.getSelectedIndex());
NewWorldPanel.this.dispose();
}
});
panel.add(button);
mainPanel.add(panel,BorderLayout.SOUTH);
add(mainPanel);
//Finishing off
pack();
setSize(300,350);
setLocationRelativeTo(null);
setVisible(true);
}
}
+26 -7
View File
@@ -8,10 +8,7 @@ import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Stroke;
import java.awt.TexturePaint;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.geom.AffineTransform;
import java.awt.geom.Line2D;
import java.awt.geom.NoninvertibleTransformException;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
@@ -23,15 +20,15 @@ import java.util.Iterator;
import javax.imageio.ImageIO;
import javax.swing.JPanel;
import javax.swing.Timer;
import Listeners.Mouse;
import Listeners.MouseMotion;
import Listeners.MouseWheel;
import Objects.DrawObject;
import Objects.Entrance;
import Objects.Food;
import Objects.Path;
import Objects.OldPath;
import Objects.Path;
import Objects.Stage;
import Objects.Toilet;
import Objects.Wall;
@@ -40,6 +37,7 @@ import Objects.Wall;
public class Panel extends JPanel
{
BufferedImage grass,sand;
BufferedImage background;
BufferedImage podiumImage, toiletImage, entranceImage, pathImage, wallImage, foodImage;
@@ -54,6 +52,8 @@ public class Panel extends JPanel
private DrawObject selectedObject;
private String clickedOption = "drag";
private Path currentPath;
private int width = 1920;
private int height = 1080;
Point2D cameraPoint = new Point2D.Double(getWidth() / 2, getHeight() / 2);
float cameraScale = 1;
@@ -84,13 +84,15 @@ public class Panel extends JPanel
pp.setPanel(this);
try
{
background = ImageIO.read(new File("images/grass.jpg"));
grass = ImageIO.read(new File("images/grass.jpg"));
sand = ImageIO.read(new File("images/sand.jpg"));
podiumImage = ImageIO.read(new File("images/stageIcon.png"));
toiletImage = ImageIO.read(new File("images/wcIcon.png"));
entranceImage = ImageIO.read(new File("images/entranceIcon.png"));
pathImage = ImageIO.read(new File("images/pathIcon.png"));
wallImage = ImageIO.read(new File("images/wallIcon.png"));
foodImage = ImageIO.read(new File("images/foodIcon.png"));
background = grass;
} catch (IOException e)
{
e.printStackTrace();
@@ -177,7 +179,7 @@ public class Panel extends JPanel
TexturePaint p = new TexturePaint(background, new Rectangle2D.Double(0, 0, 100, 100));
g2.setPaint(p);
g2.fill(new Rectangle2D.Double(-1920, -1080, 3840, 2160));
g2.fill(new Rectangle2D.Double(-width/2,-height/2, width, height));
BasicStroke stroke = new BasicStroke(10);
g2.setStroke(stroke);
@@ -452,4 +454,21 @@ public class Panel extends JPanel
repaint();
}
}
public void newWorld(int width, int height, int terrainIndex) {
this.width = width;
this.height = height;
paths.clear();
objects.clear();
cameraScale = 1;
switch(terrainIndex) {
case 0:
background = grass;
break;
case 1:
background = sand;
break;
}
repaint();
}
}
+179 -7
View File
@@ -20,8 +20,10 @@ import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import Objects.DrawObject;
import Objects.Path;
@SuppressWarnings("serial")
public class PropertiesPanel extends JPanel
{
@@ -35,11 +37,16 @@ public class PropertiesPanel extends JPanel
JLabel nameLabel;
JPanel areaPanel;
JTextField locationXField;
JTextField locationYField;
JTextField scaleField;
JTextField rotationField;
JTextField areaTopField;
JTextField areaBottomField;
JTextField areaLeftField;
JTextField areaRightField;
PropertiesPanel()
{
@@ -80,9 +87,13 @@ public class PropertiesPanel extends JPanel
buttonPanel.setMaximumSize(new Dimension(200, 40));
buttonPanel.add(buttonLabel);
add(buttonPanel);
//AREA PANEL: AVAILABLE FOR ACTIONLISTENER
areaPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
areaPanel.setVisible(false);
// DELETE
JPanel deletePanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
// BUTTONS ROW 1
JPanel row1ButtonPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
JButton deleteButton = new JButton("Delete");
deleteButton.setFont(new Font("Segoe UI", Font.PLAIN, 20));
deleteButton.addActionListener(new ActionListener()
@@ -96,10 +107,165 @@ public class PropertiesPanel extends JPanel
}
}
});
deletePanel.setPreferredSize(new Dimension(200, 50));
deletePanel.setMaximumSize(new Dimension(200, 50));
deletePanel.add(deleteButton);
add(deletePanel);
JButton areaButton = new JButton("Area");
areaButton.setFont(new Font("Segoe UI", Font.PLAIN, 20));
areaButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
areaPanel.setVisible(!areaPanel.isVisible());
}
});
row1ButtonPanel.setPreferredSize(new Dimension(200, 50));
row1ButtonPanel.setMaximumSize(new Dimension(200, 50));
row1ButtonPanel.add(deleteButton);
row1ButtonPanel.add(areaButton);
add(row1ButtonPanel);
//AREA PANEL
JLabel areaLabel = new JLabel("Area size");
areaLabel.setFont(new Font("Segoe UI", Font.ITALIC, 20));
areaPanel.setPreferredSize(new Dimension(200, 150));
areaPanel.setMaximumSize(new Dimension(200, 250));
areaPanel.add(areaLabel);
add(areaPanel);
{
JPanel areaTopPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
areaTopPanel.setPreferredSize(new Dimension(200, 50));
areaPanel.add(areaTopPanel);
JLabel areaTopLabel = new JLabel("Top");
areaTopPanel.add(areaTopLabel);
areaTopField = new JTextField();
areaTopField.setPreferredSize(new Dimension(140, 25));
{
areaTopField.addKeyListener(new KeyListener()
{
public void keyTyped(KeyEvent e){}
public void keyReleased(KeyEvent e)
{
try
{
areaTopField.setBackground(Color.WHITE);
int top = Integer.parseInt(areaTopField.getText());
selectedObject.setAreaTop(top);
p.update();
} catch (NumberFormatException nfe)
{
areaTopField.setBackground(Color.RED);
}
}
public void keyPressed(KeyEvent e){}
});
}
areaTopPanel.add(areaTopField);
}
{
JPanel areaBottomPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
areaBottomPanel.setPreferredSize(new Dimension(200, 50));
areaPanel.add(areaBottomPanel);
JLabel areaBottomLabel = new JLabel("Bottom");
areaBottomPanel.add(areaBottomLabel);
areaBottomField = new JTextField();
areaBottomField.setPreferredSize(new Dimension(120, 25));
{
areaBottomField.addKeyListener(new KeyListener()
{
public void keyTyped(KeyEvent e){}
public void keyReleased(KeyEvent e)
{
try
{
areaBottomField.setBackground(Color.WHITE);
int bottom = Integer.parseInt(areaBottomField.getText());
selectedObject.setAreaBottom(bottom);
p.update();
} catch (NumberFormatException nfe)
{
areaBottomField.setBackground(Color.RED);
}
}
public void keyPressed(KeyEvent e){}
});
}
areaBottomPanel.add(areaBottomField);
}
{
JPanel areaLeftPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
areaLeftPanel.setPreferredSize(new Dimension(200, 50));
areaPanel.add(areaLeftPanel);
JLabel areaLeftLabel = new JLabel("Left");
areaLeftPanel.add(areaLeftLabel);
areaLeftField = new JTextField();
areaLeftField.setPreferredSize(new Dimension(138, 25));
{
areaLeftField.addKeyListener(new KeyListener()
{
public void keyTyped(KeyEvent e){}
public void keyReleased(KeyEvent e)
{
try
{
areaLeftField.setBackground(Color.WHITE);
int left = Integer.parseInt(areaLeftField.getText());
selectedObject.setAreaLeft(left);
p.update();
} catch (NumberFormatException nfe)
{
areaLeftField.setBackground(Color.RED);
}
}
public void keyPressed(KeyEvent e){}
});
}
areaLeftPanel.add(areaLeftField);
}
{
JPanel areaRightPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
areaRightPanel.setPreferredSize(new Dimension(200, 50));
areaPanel.add(areaRightPanel);
JLabel areaRightLabel = new JLabel("Right");
areaRightPanel.add(areaRightLabel);
areaRightField = new JTextField();
areaRightField.setPreferredSize(new Dimension(130, 25));
{
areaRightField.addKeyListener(new KeyListener()
{
public void keyTyped(KeyEvent e){}
public void keyReleased(KeyEvent e)
{
try
{
areaRightField.setBackground(Color.WHITE);
int right = Integer.parseInt(areaRightField.getText());
selectedObject.setAreaRight(right);
p.update();
} catch (NumberFormatException nfe)
{
areaRightField.setBackground(Color.RED);
}
}
public void keyPressed(KeyEvent e){}
});
}
areaRightPanel.add(areaRightField);
}
// SPACER
add(Box.createRigidArea(spacerDimension));
@@ -355,7 +521,7 @@ public class PropertiesPanel extends JPanel
}
nameLabel.setText("No Selection");
areaPanel.setVisible(false);
}
private void fillFields()
@@ -367,6 +533,12 @@ public class PropertiesPanel extends JPanel
locationYField.setText(Math.round(selectedObject.getPosition().getY()) + "");
scaleField.setText((double) Math.round(selectedObject.getScale() * 10) / 10 + "");
rotationField.setText(Math.round(selectedObject.getRotation() % 360) + "");
areaTopField.setText(selectedObject.getAreaTop() + "");
areaBottomField.setText(selectedObject.getAreaBottom() + "");
areaLeftField.setText(selectedObject.getAreaLeft() + "");
areaRightField.setText(selectedObject.getAreaRight() + "");
}
public void setPanel(Panel p)
+1 -1
View File
@@ -6,8 +6,8 @@ import java.awt.event.MouseEvent;
import java.awt.geom.Point2D;
import java.awt.image.BufferedImage;
import Applicatie.DrawObject;
import Applicatie.Panel;
import Objects.DrawObject;
import Objects.Stage;
public class Mouse extends MouseAdapter
+1 -1
View File
@@ -5,8 +5,8 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import java.awt.geom.Point2D;
import Applicatie.DrawObject;
import Applicatie.Panel;
import Objects.DrawObject;
public class MouseMotion extends MouseMotionAdapter
{
+1 -1
View File
@@ -4,8 +4,8 @@ import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import java.awt.geom.Point2D;
import Applicatie.DrawObject;
import Applicatie.Panel;
import Objects.DrawObject;
public class MouseWheel implements MouseWheelListener
{
+356
View File
@@ -0,0 +1,356 @@
package Objects;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Shape;
import java.awt.geom.AffineTransform;
import java.awt.geom.Ellipse2D;
import java.awt.geom.NoninvertibleTransformException;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import javax.swing.ImageIcon;
public abstract class DrawObject
{
Point2D position;
double rotation;
double scale;
int width;
int height;
private Image image;
protected boolean selected;
protected int areaTop;
protected int areaBottom;
protected int areaLeft;
protected int areaRight;
private Rectangle2D rektAngle;
private Rectangle2D upperLeftCorner;
private Rectangle2D upperRightCorner;
private Rectangle2D bottomLeftCorner;
private Rectangle2D bottomRightCorner;
private Ellipse2D rotateDot;
static final int UPPERLEFT = 0;
static final int UPPERRIGHT = 1;
static final int BOTTOMLEFT = 2;
static final int BOTTOMRIGHT = 3;
private Color rectangleColor;
public DrawObject(String filename, Point2D position)
{
image = new ImageIcon(filename).getImage();
width = image.getWidth(null);
height = image.getHeight(null);
scale = 1;
rotation = 0;
this.position = position;
rectangleColor = Color.BLACK;
areaTop = 0;
areaBottom = 0;
areaLeft = 0;
areaRight = 0;
}
public abstract String getName();
public void draw(Graphics2D g)
{
AffineTransform tx = getTransform();
g.drawImage(image, tx, null);
if (selected)
{
// g.rotate(Math.toRadians(rotation), width/2,
// height/2);
AffineTransform rotate = AffineTransform.getRotateInstance(Math.toRadians(rotation), position.getX() + image.getWidth(null) / 2, position.getY() + image.getHeight(null) / 2);
// g.transform(rotate);
g.setColor(rectangleColor);
g.setStroke(new BasicStroke(7));
rektAngle = new Rectangle2D.Double((int) position.getX() - areaLeft, (int) position.getY() - areaTop, width + areaLeft + areaRight, height + areaTop + areaBottom);
tx = getTransformRectangle();
rektAngle.setFrame(tx.createTransformedShape(rektAngle).getBounds());
g.draw(rektAngle);
g.setColor(Color.YELLOW);
upperLeftCorner = new Rectangle2D.Double(rektAngle.getX() - 7, rektAngle.getY() - 7, 15, 15);
upperRightCorner = new Rectangle2D.Double(rektAngle.getX() + rektAngle.getWidth() - 8, rektAngle.getY() - 7, 15, 15);
bottomLeftCorner = new Rectangle2D.Double(rektAngle.getX() - 7, rektAngle.getY() + rektAngle.getHeight() - 8, 15, 15);
bottomRightCorner = new Rectangle2D.Double(rektAngle.getX() + rektAngle.getWidth() - 8, rektAngle.getY() + rektAngle.getHeight() - 8, 15, 15);
g.fill(upperLeftCorner); // upperleft
g.fill(upperRightCorner); // upperright
g.fill(bottomLeftCorner); // bottomleft
g.fill(bottomRightCorner); // bottomright
g.setColor(Color.RED);
rotateDot = new Ellipse2D.Double((rektAngle.getX() + (rektAngle.getWidth() / 2)) - 8, rektAngle.getY() - 8, 15, 15);
g.fill(rotateDot);
}
}
protected AffineTransform getTransform()
{
AffineTransform tx = new AffineTransform();
tx.scale(scale, scale);
tx.translate(position.getX(), position.getY());
tx.rotate(Math.toRadians(rotation), (width + areaLeft + areaRight) / 2, (height + areaTop + areaBottom) / 2);
return tx;
}
protected AffineTransform getTransformSelection()
{
AffineTransform tx = new AffineTransform();
tx.scale(scale, scale);
tx.translate(position.getX(), position.getY());
return tx;
}
/**
* Special transformation for the selection rectangle, because the
* translation of the image one places the rectangle translated from the
* image.
*
* @return affineTransform
*/
private AffineTransform getTransformRectangle()
{
AffineTransform tx = new AffineTransform();
tx.scale(scale, scale);
return tx;
}
public boolean contains(Point2D clickPoint)
{
Shape shape;
if (rektAngle == null)
{
shape = new Rectangle2D.Double(0 - areaLeft, 0 - areaTop, width + areaLeft + areaRight, height + areaTop + areaBottom);
return getTransform().createTransformedShape(shape).contains(clickPoint);
}
else
{
shape = new Rectangle2D.Double(-9 - areaLeft, -9 - areaTop, width + 13 + areaLeft + areaRight, height + 13 + areaTop + areaBottom);
return getTransformSelection().createTransformedShape(shape).contains(clickPoint);
}
}
public Point2D getObjectPoint(Point2D point)
{
try
{
return getTransform().inverseTransform(point, null);
}
catch (NoninvertibleTransformException e)
{
e.printStackTrace();
}
return null;
}
/**
* Method that gets all the corner
* coordinates index: 0 -> top left 1 -> top right 3 -> bottom left 4 ->
* bottom right
*
* @return corner coordinates
*/
public Point2D[] getCorners()
{
Rectangle2D tempRekt = new Rectangle2D.Double(0, 0, image.getWidth(null), image.getHeight(null));
tempRekt.setFrame(getTransform().createTransformedShape(tempRekt).getBounds());
Point2D[] points = new Point2D[4];
Point2D point = new Point2D.Double(tempRekt.getX(), tempRekt.getY());
points[0] = point;
point = new Point2D.Double(tempRekt.getX() + tempRekt.getHeight(), tempRekt.getY());
points[1] = point;
point = new Point2D.Double(tempRekt.getX(), tempRekt.getY() + tempRekt.getHeight());
points[2] = point;
point = new Point2D.Double(tempRekt.getX() + tempRekt.getHeight(), tempRekt.getY() + tempRekt.getHeight());
points[3] = point;
return points;
}
/**
* Checking
* collision.
*
* @param object
* . the drawObject to check collision with.
* @return if there is a collision.
*/
public boolean collision(DrawObject object)
{
Shape ownShape = getRectangle();
Rectangle2D otherRectangle = object.getTransform().createTransformedShape(object.getImageRectangle()).getBounds2D();
if(ownShape != null && otherRectangle != null) {
if (ownShape.intersects(otherRectangle))
return true;
else
return false;
}
else
return false;
}
/**
* This method checks if the place thats clicked is inside one of the
* corners.
*
* @param point
* @param corner
* @return if the clicked point is inside one of the corners
*/
public boolean containsCorner(Point2D point, int corner)
{
Rectangle2D chosenCorner = null;
switch (corner)
{
case 0:
chosenCorner = upperLeftCorner;
break;
case 1:
chosenCorner = upperRightCorner;
break;
case 2:
chosenCorner = bottomLeftCorner;
break;
case 3:
chosenCorner = bottomRightCorner;
break;
case 4:
if (point.getX() > rotateDot.getX() && point.getX() < rotateDot.getX() + rotateDot.getWidth() && point.getY() > rotateDot.getY() && point.getY() < rotateDot.getY() + rotateDot.getHeight())
return true;
else
return false;
}
if (point.getX() > chosenCorner.getX() && point.getX() < chosenCorner.getX() + chosenCorner.getWidth() && point.getY() > chosenCorner.getY() && point.getY() < chosenCorner.getY() + chosenCorner.getHeight())
return true;
else
return false;
}
public void setSelected(boolean b)
{
selected = b;
}
public Point2D getPosition()
{
return position;
}
public void setPosition(Point2D position)
{
this.position = position;
}
public double getRotation()
{
return rotation;
}
public void setRotation(double rotation)
{
this.rotation = rotation;
}
public double getScale()
{
return scale;
}
public void setScale(double scale)
{
this.scale = scale;
}
public Image getImage()
{
return image;
}
public void setImage(Image image)
{
this.image = image;
}
public boolean isSelected()
{
return selected;
}
public Rectangle2D getRectangle()
{
return rektAngle;
}
public void setRectangle(Rectangle2D rectangle)
{
rektAngle = rectangle;
}
public Color getRectangleColor()
{
return rectangleColor;
}
public void setRectangleColor(Color rectangleColor)
{
this.rectangleColor = rectangleColor;
}
public Rectangle2D getImageRectangle()
{
return new Rectangle2D.Double(0, 0, image.getWidth(null), image.getHeight(null));
}
public int getAreaTop()
{
return areaTop;
}
public void setAreaTop(int areaTop)
{
this.areaTop = areaTop;
}
public int getAreaBottom()
{
return areaBottom;
}
public void setAreaBottom(int areaBottom)
{
this.areaBottom = areaBottom;
}
public int getAreaLeft()
{
return areaLeft;
}
public void setAreaLeft(int areaLeft)
{
this.areaLeft = areaLeft;
}
public int getAreaRight()
{
return areaRight;
}
public void setAreaRight(int areaRight)
{
this.areaRight = areaRight;
}
}
-2
View File
@@ -2,8 +2,6 @@ package Objects;
import java.awt.geom.Point2D;
import Applicatie.DrawObject;
public class Entrance extends DrawObject
{
-2
View File
@@ -1,8 +1,6 @@
package Objects;
import java.awt.geom.Point2D;
import Applicatie.DrawObject;
public class Food extends DrawObject {
-21
View File
@@ -1,21 +0,0 @@
package Objects;
import java.awt.geom.Point2D;
import Applicatie.DrawObject;
public class OldPath extends DrawObject
{
public OldPath(Point2D position)
{
super("images/path.jpg", position);
}
@Override
public String getName()
{
return "Path";
}
}
+1
View File
@@ -21,6 +21,7 @@ import javax.imageio.ImageIO;
*/
public class Path {
private ArrayList<Point2D> points;
private ArrayList<Shape> lines;
private Point2D tempPoint;
-2
View File
@@ -2,8 +2,6 @@ package Objects;
import java.awt.geom.Point2D;
import Applicatie.DrawObject;
public class Stage extends DrawObject
{
public Stage(Point2D position)
-2
View File
@@ -2,8 +2,6 @@ package Objects;
import java.awt.geom.Point2D;
import Applicatie.DrawObject;
public class Toilet extends DrawObject
{
-2
View File
@@ -2,8 +2,6 @@ package Objects;
import java.awt.geom.Point2D;
import Applicatie.DrawObject;
public class Wall extends DrawObject
{
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB