/** * Get the next enabled listener on the chain. * @param iMoveMode The type of move being done (init/read/screen). * @return The next listener that responds to this type of move (or null if end of chain). */ public BaseListener getNextValidListener(int iMoveMode) { if (m_nextListener != null) { if ((m_nextListener.isEnabled()) & (((FieldListener)m_nextListener).respondsToMode(iMoveMode))) return m_nextListener; else return ((FieldListener)m_nextListener).getNextValidListener(iMoveMode); } else return null; } /**
/** * Get the next enabled listener on the chain. * @param iMoveMode The type of move being done (init/read/screen). * @return The next listener that responds to this type of move (or null if end of chain). */ public BaseListener getNextValidListener(int iMoveMode) { if (m_nextListener != null) { if ((m_nextListener.isEnabled()) & (((FieldListener)m_nextListener).respondsToMode(iMoveMode))) return m_nextListener; else return ((FieldListener)m_nextListener).getNextValidListener(iMoveMode); } else return null; } /**
/** * Get the next enabled listener on the chain. * @param iMoveMode The move mode to respond to. * @return The listener (or null if none). */ public BaseListener getNextValidListener(int iMoveMode) { if (m_listener != null) { if ((m_listener.isEnabled()) & (m_listener.respondsToMode(iMoveMode))) return m_listener; else return m_listener.getNextValidListener(iMoveMode); } else return null; } /**
/** * Get the next enabled listener on the chain. * @param iMoveMode The move mode to respond to. * @return The listener (or null if none). */ public BaseListener getNextValidListener(int iMoveMode) { if (m_listener != null) { if ((m_listener.isEnabled()) & (m_listener.respondsToMode(iMoveMode))) return m_listener; else return m_listener.getNextValidListener(iMoveMode); } else return null; } /**
/** * Get the next enabled listener on the chain. * @param iMoveMode The move mode to respond to. * @return The listener (or null if none). */ public BaseListener getNextValidListener(int iMoveMode) { if (m_listener != null) { if ((m_listener.isEnabled()) & (m_listener.respondsToMode(iMoveMode))) return m_listener; else return m_listener.getNextValidListener(iMoveMode); } else return null; } /**
/** * Get the next enabled listener on the chain. * @param iMoveMode The type of move being done (init/read/screen). * @return The next listener that responds to this type of move (or null if end of chain). */ public BaseListener getNextValidListener(int iMoveMode) { if (m_nextListener != null) { if ((m_nextListener.isEnabled()) & (((FieldListener)m_nextListener).respondsToMode(iMoveMode))) return m_nextListener; else return ((FieldListener)m_nextListener).getNextValidListener(iMoveMode); } else return null; } /**
/** * Move the physical binary data to this field. * @param objData the raw data to set the basefield to. * @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 doSetData(Object objData, boolean bDisplayOption, int iMoveMode) { int iErrorCode = DBConstants.NORMAL_RETURN; FieldListener nextListener = (FieldListener)this.getNextValidListener(iMoveMode); if (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Disable the listener to eliminate echos iErrorCode = nextListener.doSetData(objData, bDisplayOption, iMoveMode); nextListener.setEnabledListener(bOldState); // Reenable } else if (m_owner != null) iErrorCode = this.getOwner().doSetData(objData, bDisplayOption, iMoveMode); return iErrorCode; } /**
/** * Get the physical binary data from this field. * Behaviors are often used to initiate a complicated action only when the system asks for this data. * @return The field's raw data. */ public Object doGetData() { Object objData = null; FieldListener nextListener = (FieldListener)this.getNextValidListener(DBConstants.SCREEN_MOVE); if (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Disable the listener to eliminate echos objData = nextListener.doGetData(); nextListener.setEnabledListener(bOldState); // Reenable } else if (m_owner != null) objData = this.getOwner().doGetData(); return objData; } /**
/** * Get the physical binary data from this field. * Behaviors are often used to initiate a complicated action only when the system asks for this data. * @return The field's raw data. */ public Object doGetData() { Object objData = null; FieldListener nextListener = (FieldListener)this.getNextValidListener(DBConstants.SCREEN_MOVE); if (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Disable the listener to eliminate echos objData = nextListener.doGetData(); nextListener.setEnabledListener(bOldState); // Reenable } else if (m_owner != null) objData = this.getOwner().doGetData(); return objData; } /**
/** * Get the physical binary data from this field. * Behaviors are often used to initiate a complicated action only when the system asks for this data. * @return The field's raw data. */ public Object doGetData() { Object objData = null; FieldListener nextListener = (FieldListener)this.getNextValidListener(DBConstants.SCREEN_MOVE); if (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Disable the listener to eliminate echos objData = nextListener.doGetData(); nextListener.setEnabledListener(bOldState); // Reenable } else if (m_owner != null) objData = this.getOwner().doGetData(); return objData; } /**
/** * Move the physical binary data to this field. * @param objData the raw data to set the basefield to. * @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 doSetData(Object objData, boolean bDisplayOption, int iMoveMode) { int iErrorCode = DBConstants.NORMAL_RETURN; FieldListener nextListener = (FieldListener)this.getNextValidListener(iMoveMode); if (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Disable the listener to eliminate echos iErrorCode = nextListener.doSetData(objData, bDisplayOption, iMoveMode); nextListener.setEnabledListener(bOldState); // Reenable } else if (m_owner != null) iErrorCode = this.getOwner().doSetData(objData, bDisplayOption, iMoveMode); return iErrorCode; } /**
/** * Move the physical binary data to this field. * @param objData the raw data to set the basefield to. * @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 doSetData(Object objData, boolean bDisplayOption, int iMoveMode) { int iErrorCode = DBConstants.NORMAL_RETURN; FieldListener nextListener = (FieldListener)this.getNextValidListener(iMoveMode); if (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Disable the listener to eliminate echos iErrorCode = nextListener.doSetData(objData, bDisplayOption, iMoveMode); nextListener.setEnabledListener(bOldState); // Reenable } else if (m_owner != null) iErrorCode = this.getOwner().doSetData(objData, bDisplayOption, iMoveMode); return iErrorCode; } /**
/** * A field changed, call the listener(s). * Also, for screen moves, notify the record that this field changed it (FIELD_CHANGED_TYPE). * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return An error code (NORMAL if successful). */ public int handleFieldChanged(boolean bDisplayOption, int iMoveMode) { int iErrorCode = DBConstants.NORMAL_RETURN; FieldListener nextListener = (FieldListener)this.getNextValidListener(iMoveMode); while (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Disable the listener to eliminate echos iErrorCode = nextListener.fieldChanged(bDisplayOption, iMoveMode); nextListener.setEnabledListener(bOldState); // Reenable if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; nextListener = (FieldListener)nextListener.getNextValidListener(iMoveMode); } if (iMoveMode == DBConstants.SCREEN_MOVE) if (iErrorCode == DBConstants.NORMAL_RETURN) if (this.getRecord() != null) iErrorCode = this.getRecord().handleRecordChange(this, DBConstants.FIELD_CHANGED_TYPE, bDisplayOption); // Tell table that I'm getting changed (if not locked) return iErrorCode; } /**
/** * A field changed, call the listener(s). * Also, for screen moves, notify the record that this field changed it (FIELD_CHANGED_TYPE). * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return An error code (NORMAL if successful). */ public int handleFieldChanged(boolean bDisplayOption, int iMoveMode) { int iErrorCode = DBConstants.NORMAL_RETURN; FieldListener nextListener = (FieldListener)this.getNextValidListener(iMoveMode); while (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Disable the listener to eliminate echos iErrorCode = nextListener.fieldChanged(bDisplayOption, iMoveMode); nextListener.setEnabledListener(bOldState); // Reenable if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; nextListener = (FieldListener)nextListener.getNextValidListener(iMoveMode); } if (iMoveMode == DBConstants.SCREEN_MOVE) if (iErrorCode == DBConstants.NORMAL_RETURN) if (this.getRecord() != null) iErrorCode = this.getRecord().handleRecordChange(this, DBConstants.FIELD_CHANGED_TYPE, bDisplayOption); // Tell table that I'm getting changed (if not locked) return iErrorCode; } /**
/** * A field changed, call the listener(s). * Also, for screen moves, notify the record that this field changed it (FIELD_CHANGED_TYPE). * @param bDisplayOption Display changed fields if true. * @param iMoveMode The move mode. * @return An error code (NORMAL if successful). */ public int handleFieldChanged(boolean bDisplayOption, int iMoveMode) { int iErrorCode = DBConstants.NORMAL_RETURN; FieldListener nextListener = (FieldListener)this.getNextValidListener(iMoveMode); while (nextListener != null) { boolean bOldState = nextListener.setEnabledListener(false); // Disable the listener to eliminate echos iErrorCode = nextListener.fieldChanged(bDisplayOption, iMoveMode); nextListener.setEnabledListener(bOldState); // Reenable if (iErrorCode != DBConstants.NORMAL_RETURN) return iErrorCode; nextListener = (FieldListener)nextListener.getNextValidListener(iMoveMode); } if (iMoveMode == DBConstants.SCREEN_MOVE) if (iErrorCode == DBConstants.NORMAL_RETURN) if (this.getRecord() != null) iErrorCode = this.getRecord().handleRecordChange(this, DBConstants.FIELD_CHANGED_TYPE, bDisplayOption); // Tell table that I'm getting changed (if not locked) return iErrorCode; } /**