/** * Convert and move string to this field. * Override this method to convert the String to the actual Physical Data Type. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strString, boolean bDisplayOption, int iMoveMode) // init this field override for other value { m_bSetData = true; // Make sure getNextConverter is called correctly (if it is called). int iErrorCode = super.setString(strString, bDisplayOption, iMoveMode); m_bSetData = false; return iErrorCode; } /**
/** * Convert and move string to this field. * Override this method to convert the String to the actual Physical Data Type. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strString, boolean bDisplayOption, int iMoveMode) // init this field override for other value { m_bSetData = true; // Make sure getNextConverter is called correctly (if it is called). int iErrorCode = super.setString(strString, bDisplayOption, iMoveMode); m_bSetData = false; return iErrorCode; } /**
/** * Convert and move string to this field. * Override this method to convert the String to the actual Physical Data Type. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strString, boolean bDisplayOption, int iMoveMode) // init this field override for other value { m_bSetData = true; // Make sure getNextConverter is called correctly (if it is called). int iErrorCode = super.setString(strString, bDisplayOption, iMoveMode); m_bSetData = false; return iErrorCode; } /**
/** * Convert and move string to this field. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strValue, boolean bDisplayOption, int iMoveMode) { if ((strValue == null) || (strValue.length() == 0)) return super.setString(strValue, bDisplayOption, iMoveMode); // Don't trip change or display if (strValue.charAt(0) == FILLER) return DBConstants.NORMAL_RETURN; return super.setString(strValue, bDisplayOption, iMoveMode); }
/** * Convert and move string to this field. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strValue, boolean bDisplayOption, int iMoveMode) { if ((strValue == null) || (strValue.length() == 0)) return super.setString(strValue, bDisplayOption, iMoveMode); // Don't trip change or display if (strValue.charAt(0) == FILLER) return DBConstants.NORMAL_RETURN; return super.setString(strValue, bDisplayOption, iMoveMode); }
/** * Convert and move string to this field. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strValue, boolean bDisplayOption, int iMoveMode) { if ((strValue == null) || (strValue.length() == 0)) return super.setString(strValue, bDisplayOption, iMoveMode); // Don't trip change or display if (strValue.charAt(0) == FILLER) return DBConstants.NORMAL_RETURN; return super.setString(strValue, bDisplayOption, iMoveMode); }
/** * Convert and move string to this field. * Override this method to convert the String to the actual Physical Data Type. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code. */ public int setString(String strString, boolean bDisplayOption, int moveMode) // init this field override for other value { // By default, move the data as-is String string = Constants.BLANK; int fieldLength = strString.length(); for (int source = 0; source < (int)fieldLength; source++) { if ((strString.charAt(source) >= '0') && (strString.charAt(source) <= '9')) string += strString.charAt(source); } fieldLength = string.length(); if ((fieldLength <= 4) && (fieldLength > 0)) string += "000"; return super.setString(string, bDisplayOption, moveMode); // Convert to internal rep and return } /**
/** * Convert and move string to this field. * Split the part of this string into the target fields. * Override this method to convert the String to the actual Physical Data Type. * @param bState the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strSource, boolean bDisplayOption, int iMoveMode) // init this field override for other value { int iErrorReturn = FirstMLastConverter.nameToParts(strSource, bDisplayOption, iMoveMode, m_recThis, m_iNamePrefix, m_iNameFirst, m_iNameMiddle, m_iNameSur, m_iNameSuffix, m_iNameTitle); if (iErrorReturn == DBConstants.NORMAL_RETURN) if (this.getNextConverter() != null) iErrorReturn = super.setString(strSource, bDisplayOption, iMoveMode); return iErrorReturn; } /**
/** * Convert and move string to this field. * Split the part of this string into the target fields. * Override this method to convert the String to the actual Physical Data Type. * @param bState the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strSource, boolean bDisplayOption, int iMoveMode) // init this field override for other value { int iErrorReturn = FirstMLastConverter.nameToParts(strSource, bDisplayOption, iMoveMode, m_recThis, m_iNamePrefix, m_iNameFirst, m_iNameMiddle, m_iNameSur, m_iNameSuffix, m_iNameTitle); if (iErrorReturn == DBConstants.NORMAL_RETURN) if (this.getNextConverter() != null) iErrorReturn = super.setString(strSource, bDisplayOption, iMoveMode); return iErrorReturn; } /**
/** * Convert and move string to this field. * Split the part of this string into the target fields. * Override this method to convert the String to the actual Physical Data Type. * @param bState the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strSource, boolean bDisplayOption, int iMoveMode) // init this field override for other value { int iErrorReturn = FirstMLastConverter.nameToParts(strSource, bDisplayOption, iMoveMode, m_recThis, m_iNamePrefix, m_iNameFirst, m_iNameMiddle, m_iNameSur, m_iNameSuffix, m_iNameTitle); if (iErrorReturn == DBConstants.NORMAL_RETURN) if (this.getNextConverter() != null) iErrorReturn = super.setString(strSource, bDisplayOption, iMoveMode); return iErrorReturn; } /**
/** * */ public int setString(String strValue, boolean bDisplayOption, int iMoveMode) { BaseField field = (BaseField)this.getField(); if ((strValue == null) || (strValue.length() == 0)) return super.setString(strValue, bDisplayOption, iMoveMode); // Don't trip change or display if (m_iMinimumLength != -1) if (strValue.length() < m_iMinimumLength) { Task task = field.getRecord().getRecordOwner().getTask(); App application = task.getApplication(); return task.setLastError(MessageFormat.format(application.getResources(ResourceConstants.ERROR_RESOURCE, true).getString("Too Short"), m_iMinimumLength)); } return super.setString(strValue, bDisplayOption, iMoveMode); } }
/** * */ public int setString(String strValue, boolean bDisplayOption, int iMoveMode) { BaseField field = (BaseField)this.getField(); if ((strValue == null) || (strValue.length() == 0)) return super.setString(strValue, bDisplayOption, iMoveMode); // Don't trip change or display if (m_iMinimumLength != -1) if (strValue.length() < m_iMinimumLength) { Task task = field.getRecord().getRecordOwner().getTask(); App application = task.getApplication(); return task.setLastError(MessageFormat.format(application.getResources(ResourceConstants.ERROR_RESOURCE, true).getString("Too Short"), m_iMinimumLength)); } return super.setString(strValue, bDisplayOption, iMoveMode); } }
/** * */ public int setString(String strValue, boolean bDisplayOption, int iMoveMode) { BaseField field = (BaseField)this.getField(); if ((strValue == null) || (strValue.length() == 0)) return super.setString(strValue, bDisplayOption, iMoveMode); // Don't trip change or display if (m_iMinimumLength != -1) if (strValue.length() < m_iMinimumLength) { Task task = field.getRecord().getRecordOwner().getTask(); App application = task.getApplication(); return task.setLastError(MessageFormat.format(application.getResources(ResourceConstants.ERROR_RESOURCE, true).getString("Too Short"), m_iMinimumLength)); } return super.setString(strValue, bDisplayOption, iMoveMode); } }
/** * Convert and move string to this field. * Get the recriprical of this string and set the string. * @param bState the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString( String strField, boolean bDisplayOption, int iMoveMode) { NumberField numberField = (NumberField)this.getNextConverter(); int iErrorCode = super.setString(strField, DBConstants.DONT_DISPLAY, iMoveMode); if (strField.length() == 0) numberField.displayField(); // Special Case (because we return immediately) if ((iErrorCode != DBConstants.NORMAL_RETURN) || strField.length() == 0) return iErrorCode; double doubleValue = this.getValue(); if (doubleValue != 0) doubleValue = 1 / doubleValue; iErrorCode = this.setValue(doubleValue, bDisplayOption, DBConstants.SCREEN_MOVE); return iErrorCode; } }
/** * Convert and move string to this field. * Set the current string of the current next converter.. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strString, boolean bDisplayOption, int iMoveMode) // init this field override for other value { if (this.getNextConverter() != null) return this.getNextConverter().setString(strString, bDisplayOption, iMoveMode); else return super.setString(strString, bDisplayOption, iMoveMode); } /**
/** * Convert and move string to this field. * Set the current string of the current next converter.. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strString, boolean bDisplayOption, int iMoveMode) // init this field override for other value { if (this.getNextConverter() != null) return this.getNextConverter().setString(strString, bDisplayOption, iMoveMode); else return super.setString(strString, bDisplayOption, iMoveMode); } /**
/** * Convert and move string to this field. * Set the current string of the current next converter.. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strString, boolean bDisplayOption, int iMoveMode) // init this field override for other value { if (this.getNextConverter() != null) return this.getNextConverter().setString(strString, bDisplayOption, iMoveMode); else return super.setString(strString, bDisplayOption, iMoveMode); } /**
/** * Convert and move string to this field. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strValue, boolean bDisplayOption, int iMoveMode) { try { strValue = this.encodeString(strValue); } catch (Exception ex) { Task task = ((BaseField)this.getField()).getRecord().getRecordOwner().getTask(); return task.setLastError(ex.getMessage()); } return super.setString(strValue, bDisplayOption, iMoveMode); } /**
/** * Convert and move string to this field. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strValue, boolean bDisplayOption, int iMoveMode) { try { strValue = this.encodeString(strValue); } catch (Exception ex) { Task task = ((BaseField)this.getField()).getRecord().getRecordOwner().getTask(); return task.setLastError(ex.getMessage()); } return super.setString(strValue, bDisplayOption, iMoveMode); } /**
/** * Convert and move string to this field. * @param strString the state to set the data to. * @param bDisplayOption Display the data on the screen if true. * @param iMoveMode INIT, SCREEN, or READ move mode. * @return The error code (or NORMAL_RETURN). */ public int setString(String strValue, boolean bDisplayOption, int iMoveMode) { try { strValue = this.encodeString(strValue); } catch (Exception ex) { Task task = ((BaseField)this.getField()).getRecord().getRecordOwner().getTask(); return task.setLastError(ex.getMessage()); } return super.setString(strValue, bDisplayOption, iMoveMode); } /**