All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface COM.ibm.desktop.IModel

public interface interface IModel
extends Serializable
IModel provides an interface to persist application data and to register and notify listeners of model changes.

The contents of a model are persisted through externalization by implementing the readExternal and writeExternal methods.

Objects interested in model changes should implement the ModelChangeListener interface and subscribe/unsubscribe for model change notification through addModelChangeListener/removeModelChangeListener. When the model changes, it shoulld invoke notifyOfModelChange to send a ModelChangeEvent to its listeners.

 Copyright (c) Taligent, Inc.  1996 - 1997.
 Copyright (c) IBM Corporation 1996 - 1997.
 All Rights Reserved.
 

See Also:
Model, ModelChangeListener

Method Index

 o addModelChangeListener(ModelChangeListener)
Add a listener to subscribe for model change events.
 o getFileExtension()
Return the file extension string (3 or 4 letter string without the .)
 o isModelChanged()
Is the model changed?
 o notifyOfModelChange(Object)
Send a ModelChangeEvent to the registered listeners to notify them of any change in the model.
 o removeModelChangeListener(ModelChangeListener)
Remove a listener from receiving model change events.
 o setModelChanged(boolean)
Set model changed to true or false.

Methods

 o getFileExtension
 public abstract String getFileExtension()
Return the file extension string (3 or 4 letter string without the .)

 o isModelChanged
 public abstract boolean isModelChanged()
Is the model changed?

 o setModelChanged
 public abstract void setModelChanged(boolean flag)
Set model changed to true or false.

 o notifyOfModelChange
 public abstract void notifyOfModelChange(Object obj)
Send a ModelChangeEvent to the registered listeners to notify them of any change in the model.

Parameters:
data - event data for the ModelChangeEvent
 o addModelChangeListener
 public abstract void addModelChangeListener(ModelChangeListener l)
Add a listener to subscribe for model change events.

 o removeModelChangeListener
 public abstract void removeModelChangeListener(ModelChangeListener l)
Remove a listener from receiving model change events.


All Packages  Class Hierarchy  This Package  Previous  Next  Index