public MoveOnValidHandler addFieldPair ( BaseField fldDest , BaseField fldSource , boolean bMoveToDependent , boolean bMoveBackOnChange , Converter convCheckMark , Converter convBackconvCheckMark ) { // BaseField will return iSourceFieldSeq if m_OwnerField is 'Y'es MoveOnValidHandler moveBehavior = null ; if ( convCheckMark != null ) if ( convCheckMark . getField ( ) != null ) { CheckMoveHandler listener = new CheckMoveHandler ( fldDest , fldSource ) ; ( ( BaseField ) convCheckMark . getField ( ) ) . addListener ( listener ) ; // Whenever changed, this.FieldChanged is called } if ( bMoveToDependent ) { m_bMoveBehavior = true ; moveBehavior = new MoveOnValidHandler ( fldDest , fldSource , convCheckMark , true , true ) ; m_record . addListener ( moveBehavior ) ; } if ( bMoveBackOnChange ) { CopyFieldHandler listener = new CopyFieldHandler ( fldSource , convBackconvCheckMark ) ; fldDest . addListener ( listener ) ; // Add this listener to the field } return moveBehavior ; }
Add a field source and dest .