package com.onaro.util.jfc; import com.onaro.util.jfc.TextComponentFactory.LabelFont; /** * An {@link com.onaro.util.jfc.ISummaryField IBrowserField} * component that displays int values. * The value may affect whether or not the field is highlighted. */ public class IntField extends DataField { private static final long serialVersionUID = 1L; /** * Creates an {@link IntField}. * @param name of the field, for testing purposes */ public IntField (String name) { super (name); } /** * Creates an {@link IntField}. * @param name of the field, for testing purposes * @param font {@link LabelFont} */ public IntField (String name, LabelFont font) { super (name, font); } /** * Formats and displays the value. * @param value */ public void setValue (int value) { setValue (Integer.toString (value)); validate (value); } /** * Validates the value and updates the field's appearance * accordingly. * @param value */ protected void validate (int value) { // The default is no validation. } }