/** * 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) { NumberField numberField = (NumberField)this.getField(); if ((strValue == null) || (strValue.length() == 0)) return super.setString(strValue, bDisplayOption, iMoveMode); // Don't trip change or display Number tempBinary = null; try { tempBinary = (Number)numberField.stringToBinary(strValue); } catch (Exception ex) { Task task = numberField.getRecord().getRecordOwner().getTask(); return task.setLastError(ex.getMessage()); } double dValue = tempBinary.doubleValue(); if (dValue != 0) dValue = dValue / 100; return this.setValue(dValue, 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) { NumberField numberField = (NumberField)this.getField(); if ((strValue == null) || (strValue.length() == 0)) return super.setString(strValue, bDisplayOption, iMoveMode); // Don't trip change or display Number tempBinary = null; try { tempBinary = (Number)numberField.stringToBinary(strValue); } catch (Exception ex) { Task task = numberField.getRecord().getRecordOwner().getTask(); return task.setLastError(ex.getMessage()); } double dValue = tempBinary.doubleValue(); if (dValue != 0) dValue = dValue / 100; return this.setValue(dValue, 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) { NumberField numberField = (NumberField)this.getField(); if ((strValue == null) || (strValue.length() == 0)) return super.setString(strValue, bDisplayOption, iMoveMode); // Don't trip change or display Number tempBinary = null; try { tempBinary = (Number)numberField.stringToBinary(strValue); } catch (Exception ex) { Task task = numberField.getRecord().getRecordOwner().getTask(); return task.setLastError(ex.getMessage()); } double dValue = tempBinary.doubleValue(); if (dValue != 0) dValue = dValue / 100; return this.setValue(dValue, bDisplayOption, iMoveMode); } }
iFieldLength = iMaxLength; try { objTempBinary = this.stringToBinary(strField); } catch (Exception ex) { String strError = ex.getMessage();
iFieldLength = iMaxLength; try { objTempBinary = this.stringToBinary(strField); } catch (Exception ex) { String strError = ex.getMessage();
iFieldLength = iMaxLength; try { objTempBinary = this.stringToBinary(strField); } catch (Exception ex) { String strError = ex.getMessage();
Object tempBinary = field.stringToBinary(string); double dValue = ((Double)tempBinary).doubleValue(); tempBinary = new Double(-dValue); // Positive representation
Object tempBinary = field.stringToBinary(string); double dValue = ((Double)tempBinary).doubleValue(); tempBinary = new Double(-dValue); // Positive representation
Object tempBinary = field.stringToBinary(string); double dValue = ((Double)tempBinary).doubleValue(); tempBinary = new Double(-dValue); // Positive representation