|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.officefloor.model.AbstractModel
public class AbstractModel
Provides top level functionality for all model elements.
| Constructor Summary | |
|---|---|
AbstractModel()
|
|
| Method Summary | ||
|---|---|---|
protected
|
addItemToList(T item,
List<T> list,
Enum<?> addEvent)
Helper method to add an Item to a List. |
|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener to this model element. |
|
protected
|
changeField(T oldValue,
T newValue,
Enum<?> changeEvent)
Helper method to change a field. |
|
void |
firePropertyChange(String property,
Object oldValue,
Object newValue)
Fires a property change event. |
|
int |
getX()
Obtains the X co-ordinate for the model. |
|
int |
getY()
Obtains the Y co-ordinate for the model. |
|
protected
|
removeItemFromList(T item,
List<T> list,
Enum<?> removeEvent)
Helper method to remove an Item from a List. |
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener from this model element. |
|
void |
setX(int x)
Specifies the X co-ordinate for the model. |
|
void |
setY(int y)
Specifies the Y co-ordinate for the model. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractModel()
| Method Detail |
|---|
public void firePropertyChange(String property,
Object oldValue,
Object newValue)
property - Property related to the event.oldValue - Old value of property.newValue - New value of property.
protected <T> void addItemToList(T item,
List<T> list,
Enum<?> addEvent)
item - Item to add to list.list - List to have item to add.addEvent - Event to fire on item being added.
protected <T> void removeItemFromList(T item,
List<T> list,
Enum<?> removeEvent)
item - Item to remove from list.list - List to have item removed.removeEvent - Event to fire on item being removed.
protected <T> void changeField(T oldValue,
T newValue,
Enum<?> changeEvent)
oldValue - Old value of field.newValue - New value of field.changeEvent - Event to fire if field is being changed.public int getX()
Model
getX in interface Modelpublic void setX(int x)
Model
setX in interface Modelx - X co-ordinate for the model.public int getY()
Model
getY in interface Modelpublic void setY(int y)
Model
setY in interface Modely - Y co-ordinate for the model.public void addPropertyChangeListener(PropertyChangeListener listener)
ModelPropertyChangeListener to this model element.
addPropertyChangeListener in interface Modellistener - PropertyChangeListener to this model element.public void removePropertyChangeListener(PropertyChangeListener listener)
ModelPropertyChangeListener from this model element.
removePropertyChangeListener in interface Modellistener - PropertyChangeListener.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||