Example #1
0
 public void remove() {
   if (owner != null) {
     owner.removeOwnership(this);
   }
   if (room != null) {
     room.removeAppointment(this);
   }
 }
Example #2
0
 public void setRoom(Room room) {
   Room oldRoom = this.room;
   this.room = room;
   if (oldRoom != null) {
     oldRoom.removeAppointment(this);
   }
   if (room != null) {
     room.addAppointment(this);
   }
   pcs.firePropertyChange(ROOM_PROP, oldRoom, room);
 }