/** * free this listener and update/add the target record. */ public void free() { if (m_bUpdateOnClose) this.writeAndRefresh(); super.free(); } /**
/** * ControlFileHandler - Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). */ public void init(Record record) { super.init(record); this.setMasterSlaveFlag(FileListener.RUN_IN_MASTER | FileListener.DONT_REPLICATE_TO_SLAVE); } /**
/** * Constructor. * @param record My owner (usually passed as null, and set on addListener in setOwner()). * @param listener The dependent listener. */ public void init(Record record, BaseListener listener) { super.init(record); this.setDependentListener(listener); } }
/** * Called when a valid record is read from the table/query. * Re-read the sub-file on change. * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) { super.doValidRecord(bDisplayOption); this.recountRecords(); } /**
/** * Called when a valid record is read from the table/query. * Enables or disables the target field(s). * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) // Init this field override for other value { this.setEnabled(m_bEnableOnValid); super.doValidRecord(bDisplayOption); } /**
/** * Called when a valid record is read from the table/query. * @param bDisplayOption If true, display any changes. * Synchronize records after a dovalid. */ public void doValidRecord(boolean bDisplayOption) { // Sync on a read also super.doValidRecord(bDisplayOption); this.syncRecords(); } /**
/** * Called when a valid record is read from the table/query. * Grab the old value of the field in case there is a change. * @param bDisplayOption If true, display any changes. */ public void doNewRecord(boolean bDisplayOption) { super.doNewRecord(bDisplayOption); m_dOldValue = this.getFieldValue(); // Old value (in case of change) } /**
/** * Called when a new blank record is required for the table/query. * Enables or disables the target field(s). * @param bDisplayOption If true, display any changes. */ public void doNewRecord(boolean bDisplayOption) // Init this field override for other value { this.setEnabled(m_bEnableOnNew); super.doNewRecord(bDisplayOption); } /**
/** * Called when a new blank record is required for the table/query. * @param bDisplayOption If true, display any changes. */ public void doNewRecord(boolean bDisplayOption) // init this field override for other value { this.setUserID(DBConstants.INIT_MOVE, bDisplayOption); super.doNewRecord(bDisplayOption); } /**
/** * Called when a new blank record is required for the table/query. * @param bDisplayOption If true, display any changes. */ public void doNewRecord(boolean bDisplayOption) // init this field override for other value { super.doNewRecord(bDisplayOption); if (m_bUpdateOnUpdate) this.writeAndRefresh(); // If there are any changes waiting, write them! } /**
/** * Free this listener and free this converter if it doesn't belong to a record. */ public void free() { this.removeConverter(); super.free(); } /**
/** * Set the field or file that owns this listener. * @param owner My owner. */ public void setOwner(ListenerOwner owner) { if (owner == null) this.freeDependent(); super.setOwner(owner); } /**
/** * Called when a valid record is read from the table/query. * @param bDisplayOption If true, display any changes. * Synchronize records after a dovalid. */ public void doValidRecord(boolean bDisplayOption) { // Sync on a read also super.doValidRecord(bDisplayOption); this.syncRecords(); } }
/** * Called when a valid record is read from the table/query. * Enables or disables the target field(s). * @param bDisplayOption If true, display any changes. */ public void doValidRecord(boolean bDisplayOption) // Init this field override for other value { this.setEnabled(m_bEnableOnValid); super.doValidRecord(bDisplayOption); } /**
/** * Called when a valid record is read from the table/query. * @param bDisplayOption If true, display any changes. * Synchronize records after a dovalid. */ public void doValidRecord(boolean bDisplayOption) { // Sync on a read also super.doValidRecord(bDisplayOption); this.syncRecords(); } /**
/** * Called when a valid record is read from the table/query. * Grab the old value of the field in case there is a change. * @param bDisplayOption If true, display any changes. */ public void doNewRecord(boolean bDisplayOption) { super.doNewRecord(bDisplayOption); m_dOldValue = this.getFieldValue(); // Old value (in case of change) } /**
/** * Called when a new blank record is required for the table/query. * Enables or disables the target field(s). * @param bDisplayOption If true, display any changes. */ public void doNewRecord(boolean bDisplayOption) // Init this field override for other value { this.setEnabled(m_bEnableOnNew); super.doNewRecord(bDisplayOption); } /**