small changes to Romm

This commit is contained in:
Jacob Salvi 2020-02-21 16:10:58 +01:00
parent 7d582dbb47
commit 9f5821e993

View file

@ -1,11 +1,20 @@
package ch.usi.inf.sa4.sanmarinoes.smarthut.models; package ch.usi.inf.sa4.sanmarinoes.smarthut.models;
import java.awt.image.BufferedImage;
import java.util.*; import java.util.*;
import java.io.File;
public class Room { public class Room {
private ArrayList<Device> devices; private ArrayList<Device> devices;
private String name;
private File icon;
private File image;
//Constructor //Constructor
public Room(){ public Room(String name, String icon, String image){
this.name=name;
this.icon= new File(icon);
this.image= new File(image);
this.devices=new ArrayList<Device>(); this.devices=new ArrayList<Device>();
} }
@ -24,4 +33,18 @@ public class Room {
} }
} }
//changes the room's name with the given name
public void changeName(String name){
this.name=name;
}
//changes the room's icon with the given icon
public void changeIcon(String icon){
this.icon= new File(icon);
}
//changes the room's image with the given image
public void changeImage(String image){
this.image= new File(image);
}
} }