org.beanfabrics.model
Interface IValuePM

All Superinterfaces:
Bean, ContextOwner, HasComparable, PresentationModel, Supportable, Validatable
All Known Subinterfaces:
IBigDecimalPM, IBooleanPM, IDatePM, IIconPM, IImagePM, IIntegerPM, ITextPM
All Known Implementing Classes:
AbstractValuePM, BigDecimalPM, BooleanPM, DatePM, DecimalPM, HorizontalAlignmentPM, IconPM, IconTextPM, ImageTextPM, IntegerPM, MoneyPM, PathPM, PhoneNumberPM, RegexPM, TextPM, TitlePM

public interface IValuePM
extends PresentationModel

The IValuePM is the general interface of PM components that contain some 'value' and other additional attributes which are generally usefull for user interface programming, like title, description, mandatory, and editable.


Method Summary
 java.lang.String getDescription()
          Returns the description of this PM.
 java.lang.String getTitle()
          Returns the title of this PM.
 boolean isEditable()
          Returns whether the value of this PM could be modified by the view.
 boolean isEmpty()
          Returns whether the value of this PM is interpreted as an empty value.
 boolean isMandatory()
          Returns whether this PM requires a non-empty value.
 void setDescription(java.lang.String description)
          Sets the description of this PM.
 void setEditable(boolean editable)
          Sets the specified boolean to indicate whether or not this PM is editable.
 void setMandatory(boolean mandatory)
          Sets whether this PM requires a non-empty value.
 void setTitle(java.lang.String title)
          Sets the title of this PM.
 
Methods inherited from interface org.beanfabrics.Bean
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeSupport, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface org.beanfabrics.validation.Validatable
getValidationState, getValidator, isValid, revalidate
 
Methods inherited from interface org.beanfabrics.support.Supportable
getSupportMap
 
Methods inherited from interface org.beanfabrics.context.ContextOwner
getContext
 
Methods inherited from interface org.beanfabrics.HasComparable
getComparable
 

Method Detail

getDescription

java.lang.String getDescription()
Returns the description of this PM. It contains some words for the user that describe the type of information that is represented by this PM. Usually it's displayed to the user as some kind of a tooltip.

Returns:
the description of this PM

setDescription

void setDescription(java.lang.String description)
Sets the description of this PM.

Parameters:
description -
See Also:
getDescription()

isMandatory

boolean isMandatory()
Returns whether this PM requires a non-empty value. This PM is marked as invalid if it's empty.

Returns:
whether this PM requires a non-empty value
See Also:
isEmpty()

setMandatory

void setMandatory(boolean mandatory)
Sets whether this PM requires a non-empty value.

Parameters:
mandatory - set to true if this PM requires a non-empty value
See Also:
isMandatory()

getTitle

java.lang.String getTitle()
Returns the title of this PM. It contains some words for the user to identify the attribute represented by this PM in the context of a containment structure. Some view components may display this title as a field label.

Returns:
the title of this PM.

setTitle

void setTitle(java.lang.String title)
Sets the title of this PM.

Parameters:
title -
See Also:
getTitle()

isEditable

boolean isEditable()
Returns whether the value of this PM could be modified by the view. If set to false the view must not change the value but the programmer still can do it.

Returns:
whether the value of this PM could be modified by the view

setEditable

void setEditable(boolean editable)
Sets the specified boolean to indicate whether or not this PM is editable.

Parameters:
editable - the boolean to be set
See Also:
isEditable()

isEmpty

boolean isEmpty()
Returns whether the value of this PM is interpreted as an empty value.

Returns:
true if this PM contains an empty value