Added some new constructors.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1508 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -24,13 +24,16 @@ public class IntField extends JTextField
|
|||||||
{
|
{
|
||||||
public IntField ()
|
public IntField ()
|
||||||
{
|
{
|
||||||
this(0, 0, Integer.MAX_VALUE);
|
this(Integer.MAX_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntField (int initial, int minValue, int maxValue)
|
public IntField (int maxValue)
|
||||||
{
|
{
|
||||||
setValue(initial);
|
this(0, maxValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IntField (int minValue, int maxValue)
|
||||||
|
{
|
||||||
_minValue = minValue;
|
_minValue = minValue;
|
||||||
_maxValue = maxValue;
|
_maxValue = maxValue;
|
||||||
|
|
||||||
@@ -42,6 +45,12 @@ public class IntField extends JTextField
|
|||||||
addFocusListener(this);
|
addFocusListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IntField (int initial, int minValue, int maxValue)
|
||||||
|
{
|
||||||
|
this(minValue, maxValue);
|
||||||
|
setValue(initial);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the int that is represented by this field.
|
* Return the int that is represented by this field.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user