Constructor.
This listener only responds to screen moves by default.
@param field The field to change the focus to on change to this field.
@param screenField The screen field to change the focus to on change to this field.
192431
public void init(BaseField field, ScreenComponent screenField, BaseField fldTarget)
    {
        super.init(field);
        m_screenField = screenField;
        m_fldTarget = fldTarget;

        m_bScreenMove = true;   // Only respond to user change
        m_bInitMove = false;
        m_bReadMove = false;
        if (screenField == null)
            this.lookupSField();
    }
855378
public void addOptionalField(String optionalField) {
        if (optionalField == null) {
            return;
        } else if (this.optionalFields == null) {
            this.optionalFields = new ArrayList<String >();
        }
        this.optionalFields.add(optionalField);
    }
765180
public void removeComponent(Object screenField)
    { // Set up the dependencies

        if (m_iNamePrefix != null)
            m_recThis.getField(m_iNamePrefix).removeComponent(screenField);
        m_recThis.getField(m_iNameFirst).removeComponent(screenField);
        if (m_iNameMiddle != null)
            m_recThis.getField(m_iNameMiddle).removeComponent(screenField);
        m_recThis.getField(m_iNameSur).removeComponent(screenField);
        if (m_iNameSuffix != null)
            m_recThis.getField(m_iNameSuffix).removeComponent(screenField);
        if (m_iNameTitle != null)
            m_recThis.getField(m_iNameTitle).removeComponent(screenField);

        super.removeComponent(screenField);
    }
230172
public void removeField(final JavaClassSource targetClass, final Field<JavaClassSource> field)
   {
      PropertySource<JavaClassSource> property = targetClass.getProperty(field.getName());
      property.setMutable(false).setAccessible(false);
      targetClass.removeProperty(property);
      updateToString(targetClass);
   }
1345143
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        int iErrorCode = super.fieldChanged(bDisplayOption, iMoveMode);
        if (iErrorCode != DBConstants.NORMAL_RETURN)
            return iErrorCode;
        if (iMoveMode == DBConstants.INIT_MOVE)
            this.retrieveValue();
        if (iMoveMode == DBConstants.SCREEN_MOVE)
            this.saveValue();
        return iErrorCode;
    }
149735
public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String, Object> properties)
    {
        String strValue = null;
        String strDesc = null;
        String strImage = null;
        String strCommand = null;
        String strToolTip = null;
        Record record = null;
        BaseField field = null;
        if (properties != null)
        {
            strValue = (String)properties.get(ScreenModel.VALUE);
            strDesc = (String)properties.get(ScreenModel.DESC);
            strImage = (String)properties.get(ScreenModel.IMAGE);
            strCommand = (String)properties.get(ScreenModel.COMMAND);
            strToolTip = (String)properties.get(ScreenModel.TOOLTIP);
            record = (Record)properties.get(ScreenModel.RECORD);
            field = (BaseField)properties.get(ScreenModel.FIELD);          
        }
        
        this.init((ScreenLocation)itsLocation, (BasePanel)parentScreen, (Converter)fieldConverter, iDisplayFieldDesc, strValue, strDesc, strImage, strCommand, strToolTip, record, field);
    }
140421
public ScreenComponent setupIconView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, boolean bIncludeBlankOption)
    {
        ScreenComponent screenField = null;
        Record record = this.makeReferenceRecord();
        //  Set up the listener to read the current record on a valid main record
        
        ImageField fldDisplayFieldDesc = this.getIconField(record);
        if (fldDisplayFieldDesc.getListener(BlankButtonHandler.class) == null)
            fldDisplayFieldDesc.addListener(new BlankButtonHandler(null));
        if (fldDisplayFieldDesc != null)
        {    // The next two lines are so in GridScreen(s), the converter leads to this field, while it displays the fielddesc.
            FieldConverter fldDescConverter = new FieldDescConverter(fldDisplayFieldDesc, (Converter)converter);
            Map<String,Object> properties = new HashMap<String,Object>();
            properties.put(ScreenModel.IMAGE, ScreenModel.NONE);
            properties.put(ScreenModel.NEVER_DISABLE, Constants.TRUE);
            screenField = createScreenComponent(ScreenModel.BUTTON_BOX, itsLocation, targetScreen, fldDescConverter, iDisplayFieldDesc, properties);
            //?{
            //?    public void setEnabled(boolean bEnabled)
            //?    {
            //?        super.setEnabled(true); // Never disable
            //?    }
            //?};
            String strDisplay = converter.getFieldDesc();
            if (!(targetScreen instanceof GridScreenParent))
                if ((strDisplay != null) && (strDisplay.length() > 0))
            { // Since display string does not come with buttons
                ScreenLoc descLocation = targetScreen.getNextLocation(ScreenConstants.FIELD_DESC, ScreenConstants.DONT_SET_ANCHOR);
                properties = new HashMap<String,Object>();
                properties.put(ScreenModel.DISPLAY_STRING, strDisplay);
                createScreenComponent(ScreenModel.STATIC_STRING, descLocation, targetScreen, converter, iDisplayFieldDesc, properties);
            }
        }

        if (((targetScreen instanceof GridScreenParent)) || (iDisplayFieldDesc == ScreenConstants.DONT_DISPLAY_FIELD_DESC))
        { // If there is no popupbox to display the icon, I must explicitly read it.
            this.addListener(new ReadSecondaryHandler(fldDisplayFieldDesc.getRecord()));
        }
        return screenField;
    }
433714
public void markAsVisited(final Field field) {
        if (field.getAnnotation(Requires.class) != null) {
            this.dependantsInJson.add(field);
        }

        final Field dependant = this.requirementToDependantMap.get(field.getName());
        if (dependant != null) {
            this.dependantToRequirementsMap.remove(dependant, field.getName());
        }
    }
1140520
public boolean doAction(String strAction, int iOptions)
    {
        FieldList fieldList = this.getFieldList();
        FieldTable fieldTable = null;
        if (fieldList != null)
            fieldTable = fieldList.getTable();
        boolean bFlag = false;
        try   {
            if (Constants.RESET.equalsIgnoreCase(strAction))
            {
                if (fieldTable != null)
                {
                    fieldTable.addNew();
                }
                this.resetFocus();
                bFlag = true;
            }
            bFlag = super.doAction(strAction, iOptions);
            if (bFlag == false)
                if (Constants.GRID.equalsIgnoreCase(strAction))
            {
                try   {
                    JBaseScreen screen = this.createGridScreen(this.getFieldList());
                    if (screen != null)
                    {
                        Container parent = null;
                        this.getFieldList().setOwner(screen);    // The record belongs to the new screen
                        if (screen.getParentObject() instanceof Container)
                            parent = (Container)screen.getParentObject();
                        this.getBaseApplet().changeSubScreen(parent, screen, null, iOptions);
                        bFlag = true;
                    }
                } catch (Exception ex)  {
                    ex.printStackTrace();
                }
            }
            if (Constants.SUBMIT.equalsIgnoreCase(strAction))
            {
                if (fieldTable != null)
                {
                    if (fieldList.isModified())
                    {
                        if ((fieldList.getEditMode() == Constants.EDIT_IN_PROGRESS) ||
                            (fieldList.getEditMode() == Constants.EDIT_CURRENT))
                        {
                            fieldTable.set(fieldList);
                        }
                        else
                        {
                            fieldTable.add(fieldList);
                        }
                    }
                    fieldTable.addNew();
                    this.resetFocus();
                    bFlag = true;
                }
            }
            else if (Constants.DELETE.equalsIgnoreCase(strAction))
            {
                if (fieldTable != null)
                {
                    if ((fieldList.getEditMode() == Constants.EDIT_IN_PROGRESS) ||
                        (fieldList.getEditMode() == Constants.EDIT_CURRENT))
                    {
                        fieldTable.remove();
                    }
                    fieldTable.addNew();
                    this.resetFocus();
                    bFlag = true;
                }
            }
            else if (Constants.RESET.equalsIgnoreCase(strAction))
            {
                bFlag = true;   // Handled by this screen
            }
        } catch (Exception ex)  {
            this.getBaseApplet().setStatusText(ex.getMessage(), JOptionPane.ERROR_MESSAGE);
            bFlag = true;   // Handled (with an error).
        }
        return bFlag;
    }
1229166
public static void set(Object target, Field field, String fieldVal)
    {
        PropertyAccessor<?> accessor = PropertyAccessorFactory.getPropertyAccessor(field);
        Object value = accessor.fromString(target.getClass(), fieldVal);
        set(target, field, value);
    }
508176
public void selectField(ScreenField sfCurrent, int iSelectField)
    {
        ScreenField sField = this.getComponentAfter(sfCurrent, iSelectField);
        if (sField != null)
            sField.requestFocus();
    }
925210
private void handleField() {
        if (LOG.isDebugEnabled())
            LOG.debug("parsedField:  _fieldName={} _fieldValue={} {}", _fieldName, _fieldValue, this);

        if (_fieldName != null && _fieldValue != null)
            _handler.parsedField(_fieldName, _fieldValue);
        _fieldName = _fieldValue = null;
    }
382045
public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String, Object> properties)
    {
        m_converterField = null;
        m_screenParent = null;
        
        if (itsLocation == null) if (parentScreen != null)
            itsLocation = parentScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR); 
        m_itsLocation = itsLocation;

        m_bIsFocusTarget = true;
        m_bEnabled = true;
        m_screenParent = parentScreen;
        m_converterField = fieldConverter;
        m_iDisplayFieldDesc = iDisplayFieldDesc;    // The value passed in is...

        if (m_screenParent != null)
        {
            if (itsLocation.getLocationConstant() != ScreenConstants.FIRST_SCREEN_LOCATION)
                m_screenParent.addSField(this);
            else
                m_screenParent.addSField(this, 0);
        }
        boolean bEditableControl = true;
        if (this.getScreenFieldView() == null)
            this.setScreenFieldView(this.setupScreenFieldView(bEditableControl));
        this.getScreenFieldView().addPhysicalControl();
        if (m_converterField != null)
            m_converterField.addComponent(this);        // Have the field add me to its list for display
        if (this.getDisplayFieldDesc(this)) if (this.getSeparateFieldDesc()) if (m_converterField != null)
            this.setupControlDesc();
    }
1373042
protected void setField(Object component, Field field, Object proxy) {
        try {
            checkAccessabilityOfField(field);
            field.set(component, proxy);
        } catch (Exception e) {
            throw new RuntimeException("Bumm", e);
        }
    }
879653
public static void setFieldValue(final Object obj, final String fieldName, final Object value) {
		Field field = getField(obj.getClass(), fieldName);
		if (field == null) {
			throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + obj + ']');
		}
		setField(obj, field, value);
	}
714508
public int moveFieldToThis(BaseField field, boolean bDisplayOption, int iMoveMode)
    {   // Save the record and datarecord.
        if (field == null)
            return DBConstants.NORMAL_RETURN;
        if (field instanceof CounterField)
        {
            if (this.getReferenceRecord(null, false) == null)
                if (field.getRecord().getListener(ClearFieldReferenceOnCloseHandler.class) == null) // While it is okay to have two fields reference on record, don't default it.
                    this.setReferenceRecord(field.getRecord());
        }
        else if (field instanceof ReferenceField)
        {
//x no           this.setReferenceRecord(((ReferenceField)field).getReferenceRecord());
        }
        else
            this.setReferenceRecord(null);
        return super.moveFieldToThis(field, bDisplayOption, iMoveMode);
    }
1012825
public int fieldChanged(boolean bDisplayOption, int iMoveMode)
    {
        String string = this.getOwner().toString();
        if (Utility.isNumeric(string))
        {
            Task task = null;
            if (this.getOwner() != null)
                if (this.getOwner().getRecord() != null)
                    if (this.getOwner().getRecord().getRecordOwner() != null)
                        task = this.getOwner().getRecord().getRecordOwner().getTask();
            if (task == null)
                task = BaseApplet.getSharedInstance();
            return task.setLastError("Must be non-numeric");
        }
        return super.fieldChanged(bDisplayOption, iMoveMode);
    }