/** * Constructor. * @param field The basefield owner of this listener (usually null and set on setOwner()). * @param fieldToDisable The field to disable when this listener's owner matches the target string. * @param strCompareString The string to compare to this listener's owner. * @param bDisableIfMatch If true, disables if the string matches, if false, enables on match. */ public void init(BaseField field, BaseField fieldToDisable, String strCompareString, boolean bDisableIfMatch) { super.init(field); m_fldToDisable = fieldToDisable; m_strCompareString = strCompareString; m_bDisableIfMatch = bDisableIfMatch; if (m_fldToDisable != null) m_fldToDisable.addListener(new FieldRemoveBOnCloseHandler(this)); // Remove this listener if closed } /**
/** * Constructor. * @param field The basefield owner of this listener (usually null and set on setOwner()). * @param fieldToDisable The field to disable when this listener's owner matches the target string. * @param strCompareString The string to compare to this listener's owner. * @param bDisableIfMatch If true, disables if the string matches, if false, enables on match. */ public void init(BaseField field, BaseField fieldToDisable, String strCompareString, boolean bDisableIfMatch) { super.init(field); m_fldToDisable = fieldToDisable; m_strCompareString = strCompareString; m_bDisableIfMatch = bDisableIfMatch; if (m_fldToDisable != null) m_fldToDisable.addListener(new FieldRemoveBOnCloseHandler(this)); // Remove this listener if closed } /**
/** * Constructor. * @param field The basefield owner of this listener (usually null and set on setOwner()). * @param fieldToDisable The field to disable when this listener's owner matches the target string. * @param strCompareString The string to compare to this listener's owner. * @param bDisableIfMatch If true, disables if the string matches, if false, enables on match. */ public void init(BaseField field, BaseField fieldToDisable, String strCompareString, boolean bDisableIfMatch) { super.init(field); m_fldToDisable = fieldToDisable; m_strCompareString = strCompareString; m_bDisableIfMatch = bDisableIfMatch; if (m_fldToDisable != null) m_fldToDisable.addListener(new FieldRemoveBOnCloseHandler(this)); // Remove this listener if closed } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) if (m_fldMain != null) if (m_fldMain.getRecord() != owner) m_fldMain.addListener(new FieldRemoveBOnCloseHandler(this)); } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) if (m_fldMain != null) if (m_fldMain.getRecord() != owner) m_fldMain.addListener(new FieldRemoveBOnCloseHandler(this)); } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) if (m_fldMain != null) if (m_fldMain.getRecord() != owner) m_fldMain.addListener(new FieldRemoveBOnCloseHandler(this)); } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param iMainFilesField The sequence of the date changed field in this record. * @param field The date changed field in this record. */ public void init(Record record, DateTimeField field, String mainFilesFieldName) { super.init(record); m_field = field; if (field != null) if (field.getRecord() != record) field.addListener(new FieldRemoveBOnCloseHandler(this)); this.mainFilesFieldName = mainFilesFieldName; } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) { BaseField field = m_field; if (field != null) if (field.getRecord() != owner) { // Points to different file... make sure this is removed if the other file is closed field.addListener(new FieldRemoveBOnCloseHandler(this)); } } } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) { BaseField field = m_field; if (field != null) if (field.getRecord() != owner) { // Points to different file... make sure this is removed if the other file is closed field.addListener(new FieldRemoveBOnCloseHandler(this)); } } } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) { BaseField field = m_field; if (field != null) if (field.getRecord() != owner) { // Points to different file... make sure this is removed if the other file is closed field.addListener(new FieldRemoveBOnCloseHandler(this)); } } } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) if (m_converter != null) if (m_converter.getField() != null) if (((BaseField)m_converter.getField()).getRecord() != owner) { // Points to different file... make sure this is removed if the other file is closed ((BaseField)m_converter.getField()).addListener(new FieldRemoveBOnCloseHandler(this)); } } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) if (m_converter != null) if (m_converter.getField() != null) if (((BaseField)m_converter.getField()).getRecord() != owner) { // Points to different file... make sure this is removed if the other file is closed ((BaseField)m_converter.getField()).addListener(new FieldRemoveBOnCloseHandler(this)); } } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) if (m_converter != null) if (m_converter.getField() != null) if (((BaseField)m_converter.getField()).getRecord() != owner) { // Points to different file... make sure this is removed if the other file is closed ((BaseField)m_converter.getField()).addListener(new FieldRemoveBOnCloseHandler(this)); } } /**
/** * 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_fldValue1 != null) if (m_fldValue1.getRecord() != this.getOwner().getRecord()) m_fldValue1.addListener(new FieldRemoveBOnCloseHandler(this)); // Not same file, if target file closes, remove this listener! if (m_fldValue2 != null) if (m_fldValue2.getRecord() != this.getOwner().getRecord()) if (m_fldValue2.getRecord() != m_fldValue1.getRecord()) m_fldValue2.addListener(new FieldRemoveBOnCloseHandler(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_fldToDisable != null) if (this.getOwner().getRecord() != m_fldToDisable.getRecord()) m_fldToDisable.addListener(new FieldRemoveBOnCloseHandler(this)); // Make sure you remove this listener if m_fldToDisable is gone. if (owner != null) if (m_fldToDisable == null) m_fldToDisable = this.getOwner(); if (owner != null) this.fieldChanged(DBConstants.DONT_DISPLAY, DBConstants.INIT_MOVE); if (owner == null) m_fldToDisable.setEnabled(true); // Remove the behavior = reenable the field } /**
/** * 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_fldToDisable != null) if (this.getOwner().getRecord() != m_fldToDisable.getRecord()) m_fldToDisable.addListener(new FieldRemoveBOnCloseHandler(this)); // Make sure you remove this listener if m_fldToDisable is gone. if (owner != null) if (m_fldToDisable == null) m_fldToDisable = this.getOwner(); if (owner != null) this.fieldChanged(DBConstants.DONT_DISPLAY, DBConstants.INIT_MOVE); if (owner == null) m_fldToDisable.setEnabled(true); // Remove the behavior = reenable the field } /**
/** * 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_fldToDisable != null) if (this.getOwner().getRecord() != m_fldToDisable.getRecord()) m_fldToDisable.addListener(new FieldRemoveBOnCloseHandler(this)); // Make sure you remove this listener if m_fldToDisable is gone. if (owner != null) if (m_fldToDisable == null) m_fldToDisable = this.getOwner(); if (owner != null) this.fieldChanged(DBConstants.DONT_DISPLAY, DBConstants.INIT_MOVE); if (owner == null) m_fldToDisable.setEnabled(true); // Remove the behavior = reenable the field } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner == null) return; if (fieldName != null) m_fldTarget = this.getOwner().getField(fieldName); if (m_fldTarget != null) if (m_fldTarget.getRecord() != this.getOwner()) // If field is not in this file, remember to remove it m_fldTarget.addListener(new FieldRemoveBOnCloseHandler(this)); if ((this.getOwner().getEditMode() == DBConstants.EDIT_CURRENT) || (this.getOwner().getEditMode() == DBConstants.EDIT_IN_PROGRESS)) this.setEnabled(m_bEnableOnValid); if (this.getOwner().getEditMode() == DBConstants.EDIT_ADD) this.setEnabled(m_bEnableOnNew); } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner == null) return; if (m_iFieldSeq != -1) m_fldTarget = this.getOwner().getField(m_iFieldSeq); if (m_fldTarget != null) if (m_fldTarget.getRecord() != this.getOwner()) // If field is not in this file, remember to remove it m_fldTarget.addListener(new FieldRemoveBOnCloseHandler(this)); if ((this.getOwner().getEditMode() == DBConstants.EDIT_CURRENT) || (this.getOwner().getEditMode() == DBConstants.EDIT_IN_PROGRESS)) this.setEnabled(m_bEnableOnValid); if (this.getOwner().getEditMode() == DBConstants.EDIT_ADD) this.setEnabled(m_bEnableOnNew); } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner == null) return; if (m_iFieldSeq != -1) m_fldTarget = this.getOwner().getField(m_iFieldSeq); if (m_fldTarget != null) if (m_fldTarget.getRecord() != this.getOwner()) // If field is not in this file, remember to remove it m_fldTarget.addListener(new FieldRemoveBOnCloseHandler(this)); if ((this.getOwner().getEditMode() == DBConstants.EDIT_CURRENT) || (this.getOwner().getEditMode() == DBConstants.EDIT_IN_PROGRESS)) this.setEnabled(m_bEnableOnValid); if (this.getOwner().getEditMode() == DBConstants.EDIT_ADD) this.setEnabled(m_bEnableOnNew); } /**