Re: Plugin - Creating Objects with other Properties
Code: Select all
getHome().addFurnitureListener(new CollectionListener<HomePieceOfFurniture>(){
void collectionChanged(CollectionEvent<HomePieceOfFurniture> ev){
//check whether it is a ADD action
//get the newly added item (which should de a HomePieceOfFurniture)
//here, either remove your listener (in which case you should not
//use a anonymous listener like here)
//or check whether it is your class or not
//if it is your class, end(remember to add your listener if you
//previously removed it)
//otherwise, create your own object from the newly added HomePieceOfFurniture
//add it to the Home
}
}