Convert and move string to this field.
@param bState the state to set the data to.
@param bDisplayOption Display the data on the screen if true.
@param iMoveMode INIT, SCREEN, or READ move mode.
@return The error code.
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);
    }
759497
public int setCalendar(Calendar value, boolean bDisplayOption, int iMoveMode)
    {           // Set this field's value
        java.util.Date dateTemp = value.getTime();
        int errorCode = this.setData(dateTemp, bDisplayOption, iMoveMode);
        return errorCode;
    }
1326073
public int setState(boolean bState, boolean bDisplayOption, int iMoveMode)
    {
        if (m_strTargetValue != null)
        {
            String fieldString = this.getString();
            if (m_boolMaskValue.booleanValue())
            {
                int index = fieldString.indexOf(m_strTargetValue);
                if (bState == m_bTrueIfMatch)
                {   // Add target string to field!
                    if (index == -1) // Is the target value in the field string?
                    {   // No, Add it!
                        fieldString = m_strTargetValue + fieldString;        // Add the field to the string
                    }
                }
                else
                {   // Take target field out of field
                    if (index != -1)    // Is the target value in the field string
                    {   // Yes, Take it out!
                        fieldString = fieldString.substring(0, index) + fieldString.substring(index+1);   // Strip the field to the string
                    }
                }
            }
            else
                fieldString = m_strTargetValue; // Set to the value
            return this.setString(fieldString, bDisplayOption, iMoveMode);
        }
        else if (m_fldTargetValue != null)
        {
            if (bState == m_bTrueIfMatch)
            	return ((BaseField)this.getField()).moveFieldToThis(m_fldTargetValue, bDisplayOption, iMoveMode);
            else
                return ((BaseField)this.getField()).setString(null);	// Unchecked = clear it.
        }
        else    // Target = null
        {
            if (bState == m_bTrueIfMatch)
                return ((BaseField)this.getField()).setString(null);
            else
                return DBConstants.NORMAL_RETURN; //?
        }
    }
190137
public void handleValidRecord(boolean bDisplayOption)               // init this field override for other value
    {
        // Now, Notify all the fields that they have new data 
        int iFieldSeq;
        BaseField field = null;
        int iLastField = this.getFieldCount() + DBConstants.MAIN_FIELD - 1;   // Are these lines really needed?

        for (iFieldSeq = DBConstants.MAIN_FIELD; iFieldSeq <= iLastField; ++iFieldSeq)
        {
            field = this.getField(iFieldSeq);
            field.handleFieldChanged(bDisplayOption, DBConstants.READ_MOVE);        // Do BaseField Changed Behaviors
        }
        BaseListener nextListener = this.getNextEnabledListener();
        while (nextListener != null)
        {
            boolean bOldState = nextListener.setEnabledListener(false);  // Don't allow it to be called again
            ((FileListener)nextListener).doValidRecord(bDisplayOption);
            nextListener.setEnabledListener(bOldState);
            nextListener = nextListener.getNextEnabledListener();
        }
        this.doValidRecord(bDisplayOption);
        
        for (iFieldSeq = DBConstants.MAIN_FIELD; iFieldSeq <= iLastField; ++iFieldSeq)
        {
            field = this.getField(iFieldSeq);
            field.setModified(false);   // At this point, no changes have been done
            if (bDisplayOption)
                field.displayField();   // Display this field
        }
    }
173087
@ApiModelProperty(hidden=true)
    public static Display getDisplay(String option) {
        if ("Optional".equals(option))
            return Display.Optional;
        else if ("Required".equals(option))
            return Display.Required;
        else if ("Read Only".equals(option))
            return Display.ReadOnly;
        else if ("Hidden".equals(option))
            return Display.Hidden;
        else
            return null;
    }
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
        }
    }
1115979
public int setValue(double value, boolean bDisplayOption, int iMoveMode)
    {           // Set this field's value
        java.util.Date dateTemp = new java.util.Date((long)value);
        int iErrorCode = this.setData(dateTemp, bDisplayOption, iMoveMode);
        return iErrorCode;
    }
435359
public void setDisplayMode(final DisplayMode displayMode) {
		content.setDisplayMode(displayMode);
		link.setOpenNewWindow(DisplayMode.OPEN_NEW_WINDOW.equals(content.getDisplayMode()));
	}
1153167
public boolean getDisplayFieldDesc(ScreenField sField)
    {
        if (sField == this)
            return false; // Panels generally do not have descriptions
        if (sField instanceof SButtonBox)
            if (((SButtonBox)sField).getImageButtonName() != null)
                return false;    // Buttons don't need their field descriptions (if there is a icon) in base screens
        return true;    // But the controls in them generally do.
    }
858669
public void doNewRecord(boolean bDisplayOption)
    {
        super.doNewRecord(bDisplayOption);
        if (this.getOwner().isOpen())   // Don't do first time!
        {
            String strUserID = ((BaseApplication)this.getOwner().getRecordOwner().getTask().getApplication()).getUserID();
            int iUserID = -1;
            if ((strUserID != null) && (strUserID.length() > 0))
                iUserID = Integer.parseInt(strUserID);
            this.getOwner().getField(UserInfo.ID).setValue(iUserID);
            String strOldKey = this.getOwner().getKeyName();
            try   {
                this.getOwner().setKeyArea(UserInfo.ID_KEY);
                if (!this.getOwner().seek("="))
                {
                    this.getOwner().addNew(); // Make a new one
                }
            } catch (DBException ex)    {
                ex.printStackTrace();
            } finally   {
                this.getOwner().setKeyArea(strOldKey);
            }
        }
    }
1348914
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        int iErrorCode = DBConstants.NORMAL_RETURN;
        Record record = this.getOwner().getRecord();
        if (record != null)
        {
            try   {
                Object varBookmark = null;
                if (record.getEditMode() == DBConstants.EDIT_IN_PROGRESS)
                { // Update the record
                    if (m_bRefreshAfterWrite)
                        varBookmark = record.getHandle(DBConstants.DATA_SOURCE_HANDLE);
                    record.set();
                }
                else if (record.getEditMode() == DBConstants.EDIT_ADD)
                {
                    record.add();
                    if (m_bRefreshAfterWrite)
                        varBookmark = record.getLastModified(DBConstants.DATA_SOURCE_HANDLE);
                }
                if (varBookmark != null)
                {
                    record.setHandle(varBookmark, DBConstants.DATA_SOURCE_HANDLE);
                    record.edit();
                }
            } catch (DBException ex)    {
                ex.printStackTrace();
                iErrorCode = ex.getErrorCode();
            }
        }
        return iErrorCode;
    }
141938
public int setValue(double value, boolean bDisplayOption, int moveMode)
    {           // Set this field's value
        Integer tempLong = new Integer((int)value);
        int iErrorCode = this.setData(tempLong, bDisplayOption, moveMode);
        return iErrorCode;
    }
458192
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        if (m_bSetModified)
            m_fldTarget.setModified(true);
        return m_fldTarget.handleFieldChanged(bDisplayOption, iMoveMode); // init dependent field
    }
262654
public int convertIndexToField(int index, boolean bDisplayOption, int iMoveMode)
    {
        String tempString = this.convertIndexToString(index);
        return this.setString(tempString, bDisplayOption, iMoveMode); // Move value to this field
    }
30669
public void initRecord(boolean bDisplay) throws DBException
    {
        int iFieldCount = this.getFieldCount();      // Number of fields to read in
        for (int iFieldSeq = Constants.MAIN_FIELD; iFieldSeq < iFieldCount + Constants.MAIN_FIELD; iFieldSeq++)
        {
            FieldInfo field = this.getField(iFieldSeq);
            field.initField(bDisplay);
        }
        this.setEditMode(Constants.EDIT_NONE);
    }
49492
public int setString(String strValue, boolean bDisplayOption, int iMoveMode)
    {
        if ((strValue == null) || (strValue.length() == 0))
            return super.setString(strValue, bDisplayOption, iMoveMode);  // Don't trip change or display
        if (TEN_SPACES.equals(strValue))
            return DBConstants.NORMAL_RETURN;
        return super.setString(strValue, 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);
    }