/** * Constructor. * @param fldTarget Field to initialize on change (to the owner's field). */ public ChangeOnChangeHandler(BaseField fldTarget) { this(); this.init(null, fldTarget, false); } /**
/** * Constructor. * @param field The basefield owner of this listener (usually null and set on setOwner()). * @param fldTarget Field to initialize on change (to the owner's field). */ public void init(BaseField field, BaseField fldTarget, boolean bSetModified) { super.init(field); m_fldTarget = fldTarget; m_bSetModified = bSetModified; this.setRespondsToMode(DBConstants.INIT_MOVE, false); this.setRespondsToMode(DBConstants.READ_MOVE, false); } /**
/** * Set the object that owns this listener. * @owner The object 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) { Record recUserInfo = this.getOwner(); RecordOwner recordOwner = recUserInfo.getRecordOwner(); Record recUserScreenRecord = (Record)recordOwner.getScreenRecord(); // This will flag the password as changed: recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_1).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.PASSWORD), true)); recUserScreenRecord.getField(UserScreenRecord.NEW_PASSWORD_2).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.PASSWORD), true)); } } /**
/** * 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 (this.getOwner() != null) { if (m_fldTarget.getRecord() != this.getOwner().getRecord()) m_fldTarget.getRecord().addListener(new FileRemoveBOnCloseHandler(this)); // Not same file, if target file closes, remove this listener! } } /**
/** * FieldChanged Method. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { Record recProduct = this.getOwner().getRecord(); double dProductCost = this.getOwner().getValue(); double dProductCostHome = this.convertLocalToHome(dProductCost); if (dProductCostHome != 0) m_fldTarget.setValue(dProductCostHome); else m_fldTarget.setData(null); return super.fieldChanged(bDisplayOption, iMoveMode); } /**
/** * Set the object that owns this listener. * @owner The object 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) { Record recUserInfo = this.getOwner(); RecordOwner recordOwner = recUserInfo.getRecordOwner(); Record recUserScreenRecord = recordOwner.getScreenRecord(); // This will flag the password as changed: recUserScreenRecord.getField(UserScreenRecord.kNewPassword1).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.kPassword), true)); recUserScreenRecord.getField(UserScreenRecord.kNewPassword2).addListener(new ChangeOnChangeHandler(recUserInfo.getField(UserInfo.kPassword), true)); } } /**
/** * 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 (this.getOwner() != null) { if (m_fldTarget.getRecord() != this.getOwner().getRecord()) m_fldTarget.getRecord().addListener(new FileRemoveBOnCloseHandler(this)); // Not same file, if target file closes, remove this listener! } } /**
/** * FieldChanged Method. */ public int fieldChanged(boolean bDisplayOption, int iMoveMode) { Record recProduct = this.getOwner().getRecord(); double dProductCost = this.getOwner().getValue(); double dProductCostHome = this.convertLocalToHome(dProductCost); if (dProductCostHome != 0) m_fldTarget.setValue(dProductCostHome); else m_fldTarget.setData(null); return super.fieldChanged(bDisplayOption, iMoveMode); } /**
/** * Initialize class fields. */ public void init(BaseField fldTarget) { super.init(null, fldTarget, false); } /**
this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(BookingDetail.VENDOR_ID), screenRecord.getField(LookupScreenRecord.VENDOR_ID), "=", null, true)); screenRecord.getField(LookupScreenRecord.VENDOR_ID).addListener(new FieldReSelectHandler(this)); screenRecord.getField(LookupScreenRecord.VENDOR_ID).addListener(new ChangeOnChangeHandler(this.getScreenRecord().getField(LookupScreenRecord.QUERY_KEY))); // Check key
/** * Constructor. * @param field The basefield owner of this listener (usually null and set on setOwner()). * @param fldTarget Field to initialize on change (to the owner's field). */ public void init(BaseField field, BaseField fldTarget, boolean bSetModified) { super.init(field); m_fldTarget = fldTarget; m_bSetModified = bSetModified; this.setRespondsToMode(DBConstants.INIT_MOVE, false); this.setRespondsToMode(DBConstants.READ_MOVE, false); } /**
/** * 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 (this.getOwner() != null) { if (m_fldTarget.getRecord() != this.getOwner().getRecord()) m_fldTarget.getRecord().addListener(new FileRemoveBOnCloseHandler(this)); // Not same file, if target file closes, remove this listener! } } /**
/** * Constructor. * @param fldTarget Field to initialize on change (to the owner's field). */ public ChangeOnChangeHandler(BaseField fldTarget) { this(); this.init(null, fldTarget, false); } /**
this.getMainRecord().addListener(new CompareFileFilter(this.getMainRecord().getField(BookingDetail.VENDOR_ID), screenRecord.getField(LookupScreenRecord.VENDOR_ID), "=", null, true)); screenRecord.getField(LookupScreenRecord.VENDOR_ID).addListener(new FieldReSelectHandler(this)); screenRecord.getField(LookupScreenRecord.VENDOR_ID).addListener(new ChangeOnChangeHandler(this.getScreenRecord().getField(LookupScreenRecord.QUERY_KEY))); // Check key
/** * Constructor. * @param field The basefield owner of this listener (usually null and set on setOwner()). * @param fldTarget Field to initialize on change (to the owner's field). */ public void init(BaseField field, BaseField fldTarget, boolean bSetModified) { super.init(field); m_fldTarget = fldTarget; m_bSetModified = bSetModified; this.setRespondsToMode(DBConstants.INIT_MOVE, false); this.setRespondsToMode(DBConstants.READ_MOVE, false); } /**
/** * Constructor. * @param fldTarget Field to initialize on change (to the owner's field). */ public ChangeOnChangeHandler(BaseField fldTarget, boolean bSetModified) { this(); this.init(null, fldTarget, bSetModified); } /**
/** * Constructor. * @param fldTarget Field to initialize on change (to the owner's field). */ public ChangeOnChangeHandler(BaseField fldTarget, boolean bSetModified) { this(); this.init(null, fldTarget, bSetModified); } /**
/** * Constructor. * @param fldTarget Field to initialize on change (to the owner's field). */ public ChangeOnChangeHandler(BaseField fldTarget) { this(); this.init(null, fldTarget, false); } /**
/** * Constructor. * @param fldTarget Field to initialize on change (to the owner's field). */ public ChangeOnChangeHandler(BaseField fldTarget, boolean bSetModified) { this(); this.init(null, fldTarget, bSetModified); } /**
/** * Initialize class fields. */ public void init(BaseField fldTarget) { super.init(null, fldTarget, false); } /**