public void setEnabled(boolean bEnableFlag)   // Init this field override for other value
    {
        if (m_fldTarget != null)
            m_fldTarget.setEnabled(bEnableFlag);
        else if (m_sField != null)
            m_sField.setEnabled(bEnableFlag);
        else
        {   // No field means enable/disable the key fields.
            Record table = this.getOwner();
            boolean bDisableOnFound = false;
            int iLastField = table.getFieldCount() + DBConstants.MAIN_FIELD - 1;
            for (int iFieldSeq = DBConstants.MAIN_FIELD; iFieldSeq <= iLastField; iFieldSeq++)
            {
                BaseField field = table.getField(iFieldSeq);
                BaseListener listener = field.getListener(MainReadOnlyHandler.class.getName());
                if (listener == null) // Don't touch if this has a read second listener on it!
                    field.setEnabled(bEnableFlag);
                if (field.getListener(DisableOnFieldHandler.class.getName()) != null)
                    bDisableOnFound = true;
            }
            if (bDisableOnFound)
            {   // These field listeners need to be notified that their fields have been enabled/disabled
                for (int iFieldSeq = DBConstants.MAIN_FIELD; iFieldSeq <= iLastField; iFieldSeq++)
                {
                    BaseField field = table.getField(iFieldSeq);
                    DisableOnFieldHandler listener = (DisableOnFieldHandler)field.getListener(DisableOnFieldHandler.class.getName());
                    if (listener != null)
                        listener.fieldChanged(DBConstants.DISPLAY, DBConstants.SCREEN_MOVE);    // I can do this because I know that this listener will not modify anything.
                }
                
            }
        }
    }
public void setEnabled ( boolean bEnableFlag ) { if ( m_fldTarget != null ) m_fldTarget . setEnabled ( bEnableFlag ) ; else if ( m_sField != null ) m_sField . setEnabled ( bEnableFlag ) ; else { Record table = this . getOwner ( ) ; boolean bDisableOnFound = false ; int iLastField = table . getFieldCount ( ) + DBConstants . MAIN_FIELD - 1 ; for ( int iFieldSeq = DBConstants . MAIN_FIELD ; iFieldSeq <= iLastField ; iFieldSeq ++ ) { BaseField field = table . getField ( iFieldSeq ) ; BaseListener listener = field . getListener ( MainReadOnlyHandler . class . getName ( ) ) ; if ( listener == null ) field . setEnabled ( bEnableFlag ) ; if ( field . getListener ( DisableOnFieldHandler . class . getName ( ) ) != null ) bDisableOnFound = true ; } if ( bDisableOnFound ) { for ( int iFieldSeq = DBConstants . MAIN_FIELD ; iFieldSeq <= iLastField ; iFieldSeq ++ ) { BaseField field = table . getField ( iFieldSeq ) ; DisableOnFieldHandler listener = ( DisableOnFieldHandler ) field . getListener ( DisableOnFieldHandler . class . getName ( ) ) ; if ( listener != null ) listener . fieldChanged ( DBConstants . DISPLAY , DBConstants . SCREEN_MOVE ) ; } } } }
Do the actual enable/disable of the target field(s).
@param bEnableFlag If true, enable.