void setTextField (int fieldName, int value, boolean commitInternalDataStructure, boolean adjustDisplayedFormatting) { int start = fieldIndices[currentField].x; int end = fieldIndices[currentField].y; setSelection (start, end); if (commitInternalDataStructure) { int validValue = validateValueBounds (fieldName, value); setFieldOfInternalDataStructure (fieldName, validValue); updateControl (); } else { String newValue = formattedStringValue (fieldName, value, adjustDisplayedFormatting); newValue = padWithZeros (start, end, newValue); replaceCurrentlySelectedTextRegion (newValue); } selectField (currentField); }
void setTextField (int fieldName, int value, boolean commitInternalDataStructure, boolean adjustDisplayedFormatting) { int start = fieldIndices[currentField].x; int end = fieldIndices[currentField].y; setSelection (start, end); if (commitInternalDataStructure) { int validValue = validateValueBounds (fieldName, value); setFieldOfInternalDataStructure (fieldName, validValue); updateControl (); } else { String newValue = formattedStringValue (fieldName, value, adjustDisplayedFormatting); newValue = padWithZeros (start, end, newValue); replaceCurrentlySelectedTextRegion (newValue); } selectField (currentField); }
void setTextField (int fieldName, int value, boolean commitInternalDataStructure, boolean adjustDisplayedFormatting) { int start = fieldIndices[currentField].x; int end = fieldIndices[currentField].y; setSelection (start, end); if (commitInternalDataStructure) { int validValue = validateValueBounds (fieldName, value); setFieldOfInternalDataStructure (fieldName, validValue); updateControl (); } else { String newValue = formattedStringValue (fieldName, value, adjustDisplayedFormatting); newValue = padWithZeros (start, end, newValue); replaceCurrentlySelectedTextRegion (newValue); } selectField (currentField); }