All Packages Class Hierarchy This Package Previous Next Index
A model in the OpenStar system is an object, probably consisting of many different other objects, that has the following characteristics:
Note: In most cases, applications will use the class Model
as the base for own model classes instead of always implementing all the
methods of this interface from scratch. The interface definition is
provided, so own model classes can be derived from application specific
domain classes, while also implementing the IModel
interface. Just remember, when implementing own extensions to the
framework, that wherever a model object is expected, it must be
an IModel
, and not a Model
.
ModelChangeEvent
to all registered listeners.
public abstract void addModelChangeListener(ModelChangeListener listener)
The listener gets notified when the model changes.
public abstract void removeModelChangeListener(ModelChangeListener listener)
public abstract void setModelChanged(Object source)
ModelChangeEvent
to all registered listeners.
Nothing happens if the notifications switch of this model is "off" (@see getEnableNotifications(), @see getEnableNotifications()).
public abstract void setEnableNotifications(boolean enable)
If notifications are turned off, the setModelChanged()
methods do nothing. The default setting is "on". You can turn
notifications off to make extensive changes to a model without
every change triggering an event. When finished,
you should turn notifications "on" again and make one call to
the setModelChanged()
method to inform all listeners
of the changes.
public abstract boolean getEnableNotifications()
true
-- notifications are currently enabled.false
-- notifications are currently disabled.
All Packages Class Hierarchy This Package Previous Next Index