public static java.awt.Color | getFieldBackground(int screenMode, int fieldType, boolean valid, boolean requiredConditionMet)
if (fieldType == READONLY_FIELD
|| screenMode == NO_RECORD_AVAILABLE_MODE
|| (fieldType == KEY_FIELD && screenMode != ADD_MODE)) {
return FIELD_DISABLED_BACKGROUND;
}
if (!valid) {
return FIELD_ERROR_BACKGROUND;
}
if ((fieldType == KEY_FIELD || fieldType == REQUIRED_FIELD)
&& !requiredConditionMet) {
return FIELD_REQUIRED_BACKGROUND;
}
return FIELD_NORMAL_BACKGROUND;
|