org.favabeans.base
Interface View

All Known Implementing Classes:
FacetView, ViewStatusBar, Frame, MultiViewPane, SimpleView, HTMLView, CollectionListView, ImageView, ObjectIcon, DropSlot, PropertySheet, CollectionDetailsView

public interface View

A View is a visible UI component and displays a Model in some manner. All View implementations are required to extend Component.

The model of a View is that object which is currently being displayed by the View. By definition, any View has zero or one model (or, more consistently with the implementation, any View has one model, which may be null).


Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
           
 void addPropertyChangeListener(String propertyName, PropertyChangeListener l)
           
 Object getModel()
          Obtain the current model of this View.
 boolean isModelSettable(Object model)
          Check if the given value is an allowable argument to setModel(Object).
 void removePropertyChangeListener(PropertyChangeListener l)
           
 void removePropertyChangeListener(String propertyName, PropertyChangeListener l)
           
 void setModel(Object model)
          Set the model of this View to a new value.
 

Method Detail

isModelSettable

public boolean isModelSettable(Object model)
Check if the given value is an allowable argument to setModel(Object). This should be overridden to provide end-user feedback regarding the correctness of a candidate model for this View, where such information is available to the implementation.

The default behavior of this method is to return true, and throw an exception in setModel(Object) if necessary.

Parameters:
model - the candidate model.
Returns:
false if the candidate model is known to be unacceptable; true otherwise.

setModel

public void setModel(Object model)
              throws PropertyValueException
Set the model of this View to a new value.
Parameters:
model - the new model.
Throws:
PropertyValueException - if the supplied model was not acceptable.

getModel

public Object getModel()
Obtain the current model of this View.
Returns:
the current model.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)

addPropertyChangeListener

public void addPropertyChangeListener(String propertyName,
                                      PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(String propertyName,
                                         PropertyChangeListener l)


Copyright © 2000-2001, Regents of the University of Minnesota. All Rights Reserved.