project35.mda.model
Class EditFieldModel

java.lang.Object
  extended by project35.mda.model.DataFieldModel
      extended by project35.mda.model.EditFieldModel
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
GroupFieldModel, TextFieldModel

public class EditFieldModel
extends DataFieldModel

A model data structure that represents an editable field. Project35 divides its data fields into list fields and edit fields. An edit field can be rendered as a text field, a combination field, or a radio field. Edit fields have a number of characteristics including:


Copyright (c) 2008 Kevin Garwood for Project35. The original code was developed by Kevin Garwood for the University of Manchester. Revisions have been made for Project35, a project that is independent of that institution. This code is licensed under the Academic Free License version 3.0. The code attribution for the original code is included here:

Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.


Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class project35.mda.model.DataFieldModel
containingRecord, isAttribute, isRequiredField
 
Constructor Summary
EditFieldModel()
           
 
Method Summary
 void addEditFieldValidationService(EditFieldValidationService editFieldValidationService)
          adds a validator instance to the list.
 java.lang.Object clone()
           
 java.lang.String getDefaultValue()
          Get the value of defaultValue.
 java.util.ArrayList getEditFieldValidationServices()
           
 java.lang.String getUnits()
           
 java.lang.String getValue()
          Get the value of value.
 boolean isDisplayNameComponent()
           
protected  void populateCloneAttributes(EditFieldModel original, EditFieldModel copy)
           
 void setDefaultValue(java.lang.String defaultValue)
          Set the value of defaultValue.
 void setDisplayNameComponent(boolean isDisplayNameComponent)
          determines whether the field should be part of the display name for the record that contains this field.
 void setEditFieldValidationServices(java.util.ArrayList editFieldValidationServices)
          sets the entire list of editFieldValidationServices associated with this data field
 void setRequiredField(boolean isRequiredField)
          sets whether the field is required or optional
 void setUnits(java.lang.String units)
           
 void setValue(java.lang.String value)
          Set the value of value.
 
Methods inherited from class project35.mda.model.DataFieldModel
getContainingRecord, getContainingRecordClassName, getFieldViewType, getHelpLink, getName, getNameSpacePrefix, getToolTip, isAttribute, isContent, isRequiredField, populateCloneAttributes, setAttribute, setContainingRecord, setContent, setFieldViewType, setHelpLink, setName, setNameSpacePrefix, setToolTipText, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EditFieldModel

public EditFieldModel()
Method Detail

getValue

public java.lang.String getValue()
Get the value of value.

Returns:
value of value.

getDefaultValue

public java.lang.String getDefaultValue()
Get the value of defaultValue.

Returns:
value of defaultValue.

getEditFieldValidationServices

public java.util.ArrayList getEditFieldValidationServices()
Returns:
the list of fieldValidationServices associated with this field

getUnits

public java.lang.String getUnits()
Returns:
the units for this field.

setDisplayNameComponent

public void setDisplayNameComponent(boolean isDisplayNameComponent)
determines whether the field should be part of the display name for the record that contains this field.

Parameters:
isDisplayNameComponent - true if the field should be part of the display name; false if the field should not be part of the display name

setValue

public void setValue(java.lang.String value)
Set the value of value. assumes that whatever calls this model method has already checked to see if it is in fact a different value than before

Parameters:
value - Value to assign to value.

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
Set the value of defaultValue.

Parameters:
defaultValue - Value to assign to defaultValue.

addEditFieldValidationService

public void addEditFieldValidationService(EditFieldValidationService editFieldValidationService)
adds a validator instance to the list.

Parameters:
editFieldValidationService - an object that performs a validator routine

setEditFieldValidationServices

public void setEditFieldValidationServices(java.util.ArrayList editFieldValidationServices)
sets the entire list of editFieldValidationServices associated with this data field

Parameters:
editFieldValidationServices - the list of instances of classes that implement the Validator interface

setRequiredField

public void setRequiredField(boolean isRequiredField)
Description copied from class: DataFieldModel
sets whether the field is required or optional

Overrides:
setRequiredField in class DataFieldModel
Parameters:
isRequiredField - true if the field is required; otherwise the field is optional

setUnits

public void setUnits(java.lang.String units)

isDisplayNameComponent

public boolean isDisplayNameComponent()

clone

public java.lang.Object clone()
Specified by:
clone in class DataFieldModel

populateCloneAttributes

protected void populateCloneAttributes(EditFieldModel original,
                                       EditFieldModel copy)