All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.ibm.desktop.ModelView

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----COM.ibm.desktop.ModelView

public class ModelView
extends Panel
implements IView, ModelChangeListener, ModelSelectionChangeListener
ModelView provides a convenience container View class with the knowledge of a model. It automatically listens to the model for model change notification and to the component controller for model selection change notification.

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


Constructor Index

 o ModelView()
Default constructor.
 o ModelView(IModel)
Constructor that takes a model.

Method Index

 o getComponentController()
Return the component controller.
 o getModel()
Return the model.
 o handleModelChange(ModelChangeEvent)
Invoked when a model change event is sent.
 o handleModelSelectionChange(ModelSelectionChangeEvent)
Invoked when a model change selection event is sent.
 o initialize()
Initialize the ModelView to receive model change notification from the model and model selection change notification from the component controller.
 o setModel(IModel)

Constructors

 o ModelView
 public ModelView()
Default constructor.

 o ModelView
 public ModelView(IModel model)
Constructor that takes a model.

Methods

 o initialize
 public void initialize()
Initialize the ModelView to receive model change notification from the model and model selection change notification from the component controller.

Override this method to perform view initialization and remember to invoke super.initialize().

 o getModel
 public IModel getModel()
Return the model.

 o setModel
 public void setModel(IModel model)
 o getComponentController
 public ComponentController getComponentController()
Return the component controller.

 o handleModelChange
 public void handleModelChange(ModelChangeEvent event)
Invoked when a model change event is sent. Override this method to handle the event. Default implementation enables/disables the save menu item and the save tool button depending on whether the model has changed.

 o handleModelSelectionChange
 public void handleModelSelectionChange(ModelSelectionChangeEvent event)
Invoked when a model change selection event is sent. Override this method to handle the event. There is no default implementation.


All Packages  Class Hierarchy  This Package  Previous  Next  Index