/** * The Field has Changed. * Move the source field to the destination field. * @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). */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { int iErrorCode = this.moveIt(bDisplayOption, iMoveMode); if (iErrorCode != DBConstants.NORMAL_RETURN) if (this.getOwner() != m_fldSource) if (this.getOwner() != m_fldDest) iErrorCode = DBConstants.NORMAL_RETURN; // If the source and dest are unrelated this this, don't return an error (and revert this field) if (iErrorCode == DBConstants.NORMAL_RETURN) iErrorCode = super.fieldChanged(bDisplayOption, iMoveMode); return iErrorCode; } /**
/** * The Field has Changed. * Move the source field to the destination field. * @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). */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { int iErrorCode = this.moveIt(bDisplayOption, iMoveMode); if (iErrorCode != DBConstants.NORMAL_RETURN) if (this.getOwner() != m_fldSource) if (this.getOwner() != m_fldDest) iErrorCode = DBConstants.NORMAL_RETURN; // If the source and dest are unrelated this this, don't return an error (and revert this field) if (iErrorCode == DBConstants.NORMAL_RETURN) iErrorCode = super.fieldChanged(bDisplayOption, iMoveMode); return iErrorCode; } /**
/** * The Field has Changed. * Move the source field to the destination field. * @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). */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { int iErrorCode = this.moveIt(bDisplayOption, iMoveMode); if (iErrorCode != DBConstants.NORMAL_RETURN) if (this.getOwner() != m_fldSource) if (this.getOwner() != m_fldDest) iErrorCode = DBConstants.NORMAL_RETURN; // If the source and dest are unrelated this this, don't return an error (and revert this field) if (iErrorCode == DBConstants.NORMAL_RETURN) iErrorCode = super.fieldChanged(bDisplayOption, iMoveMode); return iErrorCode; } /**
/** * Do the physical move operation. * @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). */ public int moveIt(boolean bDisplayOption, int iMoveMode) { if (m_bDontMoveNull) if (m_fldSource.getLength() == 0) // Only move if dest is null return DBConstants.NORMAL_RETURN; if (m_bClearIfThisNull) if (this.getOwner().getLength() == 0) // If this is null, clear the dest field return ((BaseField)m_fldDest.getField()).moveFieldToThis(this.getOwner(), bDisplayOption, iMoveMode); // Move dependent field to here if (m_bOnlyIfDestNull) if (m_fldDest.getLength() != 0) // Only move if dest is null return DBConstants.NORMAL_RETURN; int iErrorCode = this.moveSourceToDest(bDisplayOption, iMoveMode); if (iErrorCode == DBConstants.NORMAL_RETURN) if (m_fldDest == m_fldSource) return ((BaseField)m_fldDest.getField()).handleFieldChanged(bDisplayOption, iMoveMode); // Special case, move to yourself (Just want to call .FieldChanged()) return iErrorCode; } /**
/** * Do the physical move operation. * @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). */ public int moveIt(boolean bDisplayOption, int iMoveMode) { if (m_bDontMoveNull) if (m_fldSource.getLength() == 0) // Only move if dest is null return DBConstants.NORMAL_RETURN; if (m_bClearIfThisNull) if (this.getOwner().getLength() == 0) // If this is null, clear the dest field return ((BaseField)m_fldDest.getField()).moveFieldToThis(this.getOwner(), bDisplayOption, iMoveMode); // Move dependent field to here if (m_bOnlyIfDestNull) if (m_fldDest.getLength() != 0) // Only move if dest is null return DBConstants.NORMAL_RETURN; int iErrorCode = this.moveSourceToDest(bDisplayOption, iMoveMode); if (iErrorCode == DBConstants.NORMAL_RETURN) if (m_fldDest == m_fldSource) return ((BaseField)m_fldDest.getField()).handleFieldChanged(bDisplayOption, iMoveMode); // Special case, move to yourself (Just want to call .FieldChanged()) return iErrorCode; } /**
/** * Do the physical move operation. * @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). */ public int moveIt(boolean bDisplayOption, int iMoveMode) { if (m_bDontMoveNull) if (m_fldSource.getLength() == 0) // Only move if dest is null return DBConstants.NORMAL_RETURN; if (m_bClearIfThisNull) if (this.getOwner().getLength() == 0) // If this is null, clear the dest field return ((BaseField)m_fldDest.getField()).moveFieldToThis(this.getOwner(), bDisplayOption, iMoveMode); // Move dependent field to here if (m_bOnlyIfDestNull) if (m_fldDest.getLength() != 0) // Only move if dest is null return DBConstants.NORMAL_RETURN; int iErrorCode = this.moveSourceToDest(bDisplayOption, iMoveMode); if (iErrorCode == DBConstants.NORMAL_RETURN) if (m_fldDest == m_fldSource) return ((BaseField)m_fldDest.getField()).handleFieldChanged(bDisplayOption, iMoveMode); // Special case, move to yourself (Just want to call .FieldChanged()) return iErrorCode; } /**
/** * Set the field that owns this listener. * @owner The field that this listener is being added to (if null, this listener is being removed). */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) { if (m_fldSource == null) m_fldSource = this.getOwner(); if ((m_fldDest != null) && (((BaseField)m_fldDest.getField()).getRecord() != null) && (((BaseField)m_fldDest.getField()).getRecord() != this.getOwner().getRecord())) ((BaseField)m_fldDest.getField()).getRecord().addListener(new FileRemoveBOnCloseHandler(this)); // Not same file, if target file closes, remove this listener! else if ((m_fldSource.getField() != null) && (((BaseField)m_fldSource.getField()).getRecord() != null) && (((BaseField)m_fldSource.getField()).getRecord() != this.getOwner().getRecord())) ((BaseField)m_fldSource.getField()).getRecord().addListener(new FileRemoveBOnCloseHandler(this)); // Not same file, if target file closes, remove this listener! } } /**
/** * Set the field that owns this listener. * @owner The field that this listener is being added to (if null, this listener is being removed). */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) { if (m_fldSource == null) m_fldSource = this.getOwner(); if ((m_fldDest != null) && (((BaseField)m_fldDest.getField()).getRecord() != null) && (((BaseField)m_fldDest.getField()).getRecord() != this.getOwner().getRecord())) ((BaseField)m_fldDest.getField()).getRecord().addListener(new FileRemoveBOnCloseHandler(this)); // Not same file, if target file closes, remove this listener! else if ((m_fldSource.getField() != null) && (((BaseField)m_fldSource.getField()).getRecord() != null) && (((BaseField)m_fldSource.getField()).getRecord() != this.getOwner().getRecord())) ((BaseField)m_fldSource.getField()).getRecord().addListener(new FileRemoveBOnCloseHandler(this)); // Not same file, if target file closes, remove this listener! } } /**
/** * Set the field that owns this listener. * @owner The field that this listener is being added to (if null, this listener is being removed). */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) { if (m_fldSource == null) m_fldSource = this.getOwner(); if ((m_fldDest != null) && (((BaseField)m_fldDest.getField()).getRecord() != null) && (((BaseField)m_fldDest.getField()).getRecord() != this.getOwner().getRecord())) ((BaseField)m_fldDest.getField()).getRecord().addListener(new FileRemoveBOnCloseHandler(this)); // Not same file, if target file closes, remove this listener! else if ((m_fldSource.getField() != null) && (((BaseField)m_fldSource.getField()).getRecord() != null) && (((BaseField)m_fldSource.getField()).getRecord() != this.getOwner().getRecord())) ((BaseField)m_fldSource.getField()).getRecord().addListener(new FileRemoveBOnCloseHandler(this)); // Not same file, if target file closes, remove this listener! } } /**