Răsfoiți Sursa

Removed time and border class.

Gilian Joosen 10 ani în urmă
părinte
comite
281ee2c721
2 a modificat fișierele cu 0 adăugiri și 101 ștergeri
  1. 0 39
      src/agenda/Time.java
  2. 0 62
      src/gui/simulator/Border.java

+ 0 - 39
src/agenda/Time.java

@@ -1,39 +0,0 @@
-package agenda;
-
-import java.io.Serializable;
-
-/**
- * Created by gjoosen on 07/02/15.
- */
-public class Time implements Serializable {
-    
-    private int hours, minutes;
-    
-    public Time(int hours, int minutes){
-        this.hours = hours;
-        this.minutes = minutes;
-    }
-
-    public int getHours() {
-        return hours;
-    }
-
-    public int getMinutes() {
-        return minutes;
-    }
-    
-    @Override
-    public String toString(){
-        return this.numberToTimeDigits(this.hours) + ":" + this.numberToTimeDigits(this.minutes);
-    }
-    
-    private String numberToTimeDigits(int h){
-        String hours;
-        if(h == 0 || h == 1 || h == 2 || h == 3 || h == 4 || h == 5 || h == 6 || h == 7 || h == 8 || h == 9){
-            hours = "0" + h;
-        }else {
-            hours = String.valueOf(h);
-        }
-        return hours;
-    }
-}

+ 0 - 62
src/gui/simulator/Border.java

@@ -1,62 +0,0 @@
-package gui.simulator;
-
-import gui.simulator.facilities.ImageType;
-
-import java.awt.Graphics2D;
-import java.awt.Shape;
-import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
-import java.io.Serializable;
-
-
-
-public class Border extends DrawEngine implements Serializable {
-
-	private static ImageType images = ImageType.Border;
-	private static String facilityName = "Border";
-	private int width;
-	private int height;
-
-    public  Border(int x, int y, int width, int heigth, Terrain terrain) {
-        super(images, x, y, 1, 0, SimulatorPane.Objects.BORDER, terrain, null, false);
-    }
-    
-    public String getFacilityName(){
-    	return facilityName;
-    }
-    
-    @Override
-    public boolean contains(Point2D point){
-        Shape shape = new Rectangle2D.Double(0, 0, getWidth(), getHeight());
-        return this.getAffineTransform().createTransformedShape(shape).contains(point);
-    }
-    
-    @Override
-    public void draw(Graphics2D g){
-        g.drawRect((int)getX(), (int)getY(), getHeight(),getWidth());
-    }
-    @Override
-    public void setRotation(double rotation) {
-    }
-    @Override
-    public double getScale() {
-    return 0.0;
-    }
-    @Override
-    public void setScale(double scale) {
-    
-    }
-    @Override
-    public int getWidth(){
-    	return width;
-    }
-    @Override
-    public int getHeight(){
-    	return height;
-    }
-    @Override
-    public double getRotation() {
-    	return 0.0;
-    }
-
-}