com.iplanet.jato.view
Interface DisplayField

All Superinterfaces:
View
All Known Subinterfaces:
BooleanDisplayField, CommandField, HtmlDisplayField, SelectableGroup
All Known Implementing Classes:
DisplayFieldImpl

public interface DisplayField
extends View

Defines value semantics for views whose primary displayed information derives from a one or more discreet values. In many cases, these values will ultimately come from an associated, or bound, model. We currently leave the mechanics of association of model to display field to derived interfaces or implementations.

Additionally, a display field can be configured via a DisplayFieldDescriptor . This descriptor pattern allows developers to set and get many attributes of a display field simply, without having to expand the display field interface for every additional attribute.

Version:
JATO/1.2.2 $Id: DisplayField.java,v 1.7 2002/03/16 03:26:40 todd Exp $
See Also:
Model

Fields inherited from interface com.iplanet.jato.view.View
QUALIFIED_VIEW_NAME_SEPARATOR
 
Method Summary
 DisplayFieldDescriptor getDescriptor()
          Returns the DisplayFieldDescriptor
 java.lang.Object getValue()
          Returns the current value of this view.
 java.lang.Object[] getValues()
          Returns this view's current set of values.
 void setValue(java.lang.Object aValue)
          Sets the current value of this view.
 void setValues(java.lang.Object[] aValue)
          Sets this view's current set of values.
 java.lang.String stringValue()
          This method returns either the toString() representation of a non-null displayField's value, or a blank string whenever the value is null
 
Methods inherited from interface com.iplanet.jato.view.View
getName, getParent, getQualifiedName, setParent
 

Method Detail

getValue

public java.lang.Object getValue()
Returns the current value of this view. In most cases, if this view is associated with a model, this value will the current value of the model.
Returns:
The current value. If there are multiple current values for this view, only the first value is returned. If there is no value, this method returns null.

stringValue

public java.lang.String stringValue()
This method returns either the toString() representation of a non-null displayField's value, or a blank string whenever the value is null
Returns:
a string representation of the value, guaranteed to be non-null

setValue

public void setValue(java.lang.Object aValue)
Sets the current value of this view. This method overwrites any current value or values. If multiple values were present previously, they are all discarded. If this view is associated with a model, this value should be propagated to the model.
Parameters:
value - The value to set in this view

getValues

public java.lang.Object[] getValues()
Returns this view's current set of values. In most cases, if this view is associated with a model, these values will be the current values of the model.
Returns:
The current set of values. If there is no value, this method returns an array of zero length.

setValues

public void setValues(java.lang.Object[] aValue)
Sets this view's current set of values. All previous values are discarded. If this view is associated with a model, this set of values should be propagated to the model.
Parameters:
values - The set of values to set in this view

getDescriptor

public DisplayFieldDescriptor getDescriptor()
Returns the DisplayFieldDescriptor
Returns:
this object's DisplayFieldDescriptor. This value will be null for DisplayField\s that are not configured with a non-null DisplayFieldDescriptor.