IntegerTextField Component

This Echo3 component is a subclass of the abstract class 'ActiveTextField' as described elsewhere.

This components only allow the characters, '+', '-' and the digits 0 to 9 to be entered. A range can be set for validation. If a range is invalid, a tooltip is set for the invalid icon which, when hovered over, reveals the valid range of integers.

Demonstration

Default IntegerTextField, valid across the range of integers. Icon usage is Green checked dot for valid, red 'X' dot for invalid, empty icon for empty input field. If you enter an integer outside of this range, mouse over the invalid icon to see the acceptable range.

The valid range is -2147483648 to 2147483647

In this example the minimum integer value is set to 50 and the 'valid' and 'invalid' messages have been defined. Also 'invalid' foreground and background colors have been added to drawn attention to the entry.

In this example, the 'message' has been moved to the top of the component; the 'empty' icon is a left pointing arrow and the 'invalid' icon is a triangular 'warning' shield.

The arrow might have the meaning of a required field. However, this decision is implemented by the application business rules, not enforced by the UI.

In this example the icon is in the 'leading' or left position of the component. This arrow is also used to indicate an'invalid' entry. An 'empty' icon is used for a valid entry. NB: a empty icon is not an missing icon but a 13x13 transparent image.

Here the arrow might have the meaning of a required field and a that a valid entry has not yet been entered.

IntegerTextField - Summary API

                   
    package org.informagen.echo.app;
    
    import org.informagen.echo.app.ActiveTextField;
    
    public class IntegerTextField extends ActiveTextField {
    
        public IntegerTextField() 
        public IntegerTextField(int minimumValue, int maximumValue) 
    
        public boolean isValid() 
        public boolean isInRange() 
           
        public void setValue(int value) 
        public int getValue() 
           
        public void setMinimumValue(int minimumValue) 
        public int getMinimumValue() 
           
        public void setMaximumValue(int maximumValue) 
        public int getMaximumValue() 
    
    }