|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectBTextField
artofillusion.ui.ValueField
public class ValueField
A ValueField is a BTextField used for entering a numerical value. Constraints can be specified for the value, for example, that it must be positive. If an illegal value is entered into the text field, the text turns red to indicate this.
Field Summary | |
---|---|
static int |
INTEGER
|
static int |
NONE
|
static int |
NONNEGATIVE
|
static int |
NONZERO
|
static int |
POSITIVE
|
Constructor Summary | |
---|---|
ValueField(double value,
int constraints)
|
|
ValueField(double value,
int constraints,
int columns)
|
|
ValueField(float value,
int constraints)
|
|
ValueField(float value,
int constraints,
int columns)
|
Method Summary | |
---|---|
void |
checkIfValid()
Recheck the current value to see if it is valid, and set the text color accordingly. |
double |
getValue()
Get the current value in this field. |
ValueChecker |
getValueChecker()
Get the ValueChecker for this field. |
boolean |
isTextValid()
Determine whether the text entered in the field is a valid number. |
boolean |
isValid(double val)
Determine whether a particular value is valid for this field. |
void |
sendValidEventsOnly(boolean validOnly)
Set whether this field should send out all ValueChangedEvents, or only those which result in valid entries (the default). |
void |
setMinDecimalPlaces(int decimals)
Set the minimum number of decimal places to display. |
void |
setValue(double val)
Set the value in this field. |
void |
setValueChecker(ValueChecker vc)
Set a ValueChecker to be used for determining whether the value is valid. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int NONNEGATIVE
public static final int NONZERO
public static final int POSITIVE
public static final int INTEGER
Constructor Detail |
---|
public ValueField(double value, int constraints)
public ValueField(float value, int constraints)
public ValueField(float value, int constraints, int columns)
public ValueField(double value, int constraints, int columns)
Method Detail |
---|
public void setValueChecker(ValueChecker vc)
public ValueChecker getValueChecker()
public boolean isTextValid()
public boolean isValid(double val)
public void checkIfValid()
public double getValue()
public void setValue(double val)
public void setMinDecimalPlaces(int decimals)
public void sendValidEventsOnly(boolean validOnly)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |