The Field has Changed.
@param bDisplayOption If true, display the change.
@param iMoveMode The type of move being done (init/read/screen).
@return The error code (or NORMAL_RETURN if okay).
4474
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        int result = DBConstants.NORMAL_RETURN;
        Record record = m_fldTarget.getRecord();
        boolean bSetDirty = true;
        if (m_bIfNewRecord) if (record.getEditMode() == Constants.EDIT_ADD)
            bSetDirty = true;
        if (m_bIfCurrentRecord) if ((record.getEditMode() == Constants.EDIT_CURRENT) || (record.getEditMode() == Constants.EDIT_IN_PROGRESS))
            bSetDirty = true;
        if (bSetDirty)
        {
            m_fldTarget.setModified(true);
            result = record.handleRecordChange(m_fldTarget, DBConstants.FIELD_CHANGED_TYPE, bDisplayOption);    // Tell table that I'm getting changed (if not locked)
        }
        return result;
    }
480254
public String getSFieldValue(boolean bDisplayFormat, boolean bRawData)
    {
        Convert converter = this.getConverter();
        if (converter == null)
            return Constant.BLANK;
        if (bRawData)
        {
            converter = converter.getField();
            if (converter == null)
                return Constant.BLANK;
        }
        return converter.getString();
    }
67489
public void updateShownOptions(boolean showModeSwitch, boolean showAddKeyOption) {

        if (showModeSwitch != m_showModeSwitch) {
            m_upperLeftComponent.removeAllComponents();
            m_upperLeftComponent.addComponent(m_languageSwitch);
            if (showModeSwitch) {
                m_upperLeftComponent.addComponent(m_modeSwitch);
            }
            m_upperLeftComponent.addComponent(m_filePathLabel);
            m_showModeSwitch = showModeSwitch;
        }
        if (showAddKeyOption != m_showAddKeyOption) {
            if (showAddKeyOption) {
                m_optionsComponent.addComponent(m_lowerLeftComponent, 0, 1);
                m_optionsComponent.addComponent(m_lowerRightComponent, 1, 1);
            } else {
                m_optionsComponent.removeComponent(0, 1);
                m_optionsComponent.removeComponent(1, 1);
            }
            m_showAddKeyOption = showAddKeyOption;
        }
    }
1056938
public void doNewRecord(boolean bDisplayOption)
    {
        super.doNewRecord(bDisplayOption);
        try   {
            if (this.getOwner().isOpen())   // Don't do first time!
            {
                boolean bOldEnableState = this.isEnabledListener();
                this.setEnabledListener(false);      // Just in case AddNew decides to call this
                this.getOwner().close();
                if (this.getOwner().hasNext())  // records yet?
                    this.getOwner().next();
                else
                    this.getOwner().addNew(); // Make a new one
                this.setEnabledListener(bOldEnableState);
            }
        } catch (DBException ex)    {
            if (ex.getErrorCode() == DBConstants.FILE_NOT_FOUND)
                if ((this.getOwner().getOpenMode() & DBConstants.OPEN_DONT_CREATE) == DBConstants.OPEN_DONT_CREATE)
                    return;   // Special case - they didn't want the table created if not found
            ex.printStackTrace(); // Never
        }
    }
492114
public int setCount(double dFieldCount, boolean bDisableListeners, int iMoveMode)
    {
        int iErrorCode = DBConstants.NORMAL_RETURN;
        if (m_fldMain != null)
        {
            boolean[] rgbEnabled = null;
            if (bDisableListeners)
                rgbEnabled = m_fldMain.setEnableListeners(false);
            int iOriginalValue = (int)m_fldMain.getValue();
            boolean bOriginalModified = m_fldMain.isModified();
            int iOldOpenMode = m_fldMain.getRecord().setOpenMode(m_fldMain.getRecord().getOpenMode() & ~DBConstants.OPEN_REFRESH_AND_LOCK_ON_CHANGE_STRATEGY); // don't trigger refresh and write
            iErrorCode = m_fldMain.setValue(dFieldCount, true, iMoveMode); // Set in main file's field if the record is not current
            m_fldMain.getRecord().setOpenMode(iOldOpenMode);
            if (iOriginalValue == (int)m_fldMain.getValue())
                if (bOriginalModified == false)
                    m_fldMain.setModified(bOriginalModified);   // Make sure this didn't change if change was just null to 0.
            if (rgbEnabled != null)
                m_fldMain.setEnableListeners(rgbEnabled);
        }
        return iErrorCode;
    }
709997
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        if (m_screenField == null)
            this.lookupSField();
        if (m_bChangeIfNull != null)
        {
            if ((m_bChangeIfNull.booleanValue()) && (!this.getOwner().isNull()))
                return DBConstants.NORMAL_RETURN;
            if ((!m_bChangeIfNull.booleanValue()) && (this.getOwner().isNull()))
                return DBConstants.NORMAL_RETURN;
        }
        if (m_screenField != null)
            m_screenField.requestFocus();
        return DBConstants.NORMAL_RETURN;
    }
632185
public void doValidRecord(boolean bDisplayOption) // init this field override for other value
    {
        Object bookmark = null;
        try   {
            bookmark = this.getOwner().getHandle(DBConstants.BOOKMARK_HANDLE);
        } catch (DBException ex)    {
            ex.printStackTrace();
        }
        this.updateListener(bookmark);
        super.doValidRecord(bDisplayOption);
    }
405998
public int initField(boolean bDisplayOption)                    // Init this field override for other value
    {
        if ((this.getDefault() == null) || (this.getDefault() instanceof String))
            return this.setString((String)this.getDefault(), bDisplayOption, Constants.INIT_MOVE);   // zero out the field
        return this.setData(this.getDefault(), bDisplayOption, Constants.INIT_MOVE);
    }
778906
public void doValidRecord(boolean bDisplayOption) // init this field override for other value
    {
        Object bookmark = null;
        try   {
            bookmark = this.getOwner().getHandle(m_iHandleType);
        } catch (DBException ex)    {
            ex.printStackTrace();
        }
        this.addBookmarkFilter(bookmark);
        super.doValidRecord(bDisplayOption);
    }
812747
public int fieldChanged(boolean bDisplayOption, int moveMode)
    {
        String source = this.getOwner().getString();
        String soundex = this.soundex(source.substring(0, Math.min(4, source.length())));
        if (soundex == null)
            return DBConstants.NORMAL_RETURN;
        short hashValue = this.hashSound(soundex);
        BaseField field = this.getOwner().getRecord().getField(m_iFieldSeq);
        return field.setValue(hashValue, bDisplayOption, moveMode);   // Move even if no change
    }
352576
private DisplayMode isSupported(DisplayMode display)
    {
        final DisplayMode[] supported = dev.getDisplayModes();
        for (final DisplayMode current : supported)
        {
            final boolean multiDepth = current.getBitDepth() != DisplayMode.BIT_DEPTH_MULTI && display.equals(current);
            if (multiDepth
                || current.getBitDepth() == DisplayMode.BIT_DEPTH_MULTI
                   && display.getWidth() == current.getWidth()
                   && display.getHeight() == current.getHeight())
            {
                return current;
            }
        }
        return null;
    }
1057826
public int setString(String strValue, boolean bDisplayOption, int iMoveMode)
    {        
        try {
            strValue = this.encodeString(strValue);
        } catch (Exception ex) {
            Task task = ((BaseField)this.getField()).getRecord().getRecordOwner().getTask();
            return task.setLastError(ex.getMessage());
        }
        return super.setString(strValue, bDisplayOption, iMoveMode);
    }
644134
public int setSFieldToProperty(String strSuffix, boolean bDisplayOption, int iMoveMode)
    {
        int iErrorCode = Constant.NORMAL_RETURN;
        if (this.isInputField())
        {
            String strFieldName = this.getSFieldParam(strSuffix);
            String strParamValue = this.getSFieldProperty(strFieldName);

            if (strParamValue != null)
                iErrorCode = this.setSFieldValue(strParamValue, bDisplayOption, iMoveMode);
        }
        return iErrorCode;
    }
271358
public void doNewRecord(boolean bDisplayOption)
    {
        super.doNewRecord(bDisplayOption);
        BaseField fldTarget = null;
        if (typeFieldName != null)
            fldTarget = this.getOwner().getField(typeFieldName);
        else
            fldTarget = this.getOwner().getField(m_iTypeField);
        boolean[] rgbEnabled = fldTarget.setEnableListeners(false);
        InitOnceFieldHandler listener = (InitOnceFieldHandler)fldTarget.getListener(InitOnceFieldHandler.class.getName());
        if (listener != null)
            listener.setFirstTime(true);    // Special case - you shouldn't have put this listener here, but since you did...
        fldTarget.setValue(m_iTargetValue, DBConstants.DISPLAY, DBConstants.INIT_MOVE);
        fldTarget.setModified(false);
        fldTarget.setEnableListeners(rgbEnabled);
    }
23639
public int moveSourceToDest(boolean bDisplayOption, int iMoveMode)
    {
        if (m_objValue instanceof String)
            return m_fldDest.setString((String)m_objValue, bDisplayOption, iMoveMode);
        else
            return m_fldDest.setData(m_objValue, bDisplayOption, iMoveMode);
    }
422753
public int setString(String strField, boolean bDisplayOption, int iMoveMode)
    {
        int fieldLength = 0;
        Object tempBinary = null;
        if (strField != null)
        {
            fieldLength = strField.length();
            int maxLength = this.getMaxLength();
            if ((fieldLength > maxLength) || (fieldLength > 40))
                fieldLength = maxLength;
            Date dateOld = new Date((long)this.getValue());  // Save current time
            try   {
                tempBinary = DateConverter.stringToBinary(strField, dateOld, m_sDateFormat);
            } catch (Exception ex)  {
                String strError = ex.getMessage();
                if (strError == null)
                    strError = ex.getClass().getName();
                Task task = null;
                if (this.getField() != null)
                    if (((BaseField)this.getField()).getRecord() != null)
                        if (((BaseField)this.getField()).getRecord().getRecordOwner() != null)
                            task = ((BaseField)this.getField()).getRecord().getRecordOwner().getTask();
                //if (task == null)
                //    task = BaseApplet.getSharedInstance();
                return task.setLastError(strError);
            }
        }
        return this.setData(tempBinary, bDisplayOption, iMoveMode);
    }
1336595
public int setDateTime(java.util.Date date, boolean bDisplayOption, int moveMode)
    {
        if (date != null)
        {
            m_calendar.setTime(date);
            m_calendar.set(Calendar.YEAR, DBConstants.FIRST_YEAR);
            m_calendar.set(Calendar.MONTH, Calendar.JANUARY);
            m_calendar.set(Calendar.DATE, 1);
            date = m_calendar.getTime();
            return this.setValue(date.getTime(), bDisplayOption, moveMode);
        }
        else
            return this.setData(null, bDisplayOption, moveMode);
    }