Revision 39271 branches/v2_0_0_prep/libraries/libUIComponent/src/org/gvsig/gui/beans/datainput/DataInputField.java
DataInputField.java | ||
---|---|---|
52 | 52 |
|
53 | 53 |
private NumberFormat doubleDisplayFormat; |
54 | 54 |
private NumberFormat doubleEditFormat; |
55 |
private boolean eventsEnabled = true; |
|
55 |
private boolean eventsEnabled = true; |
|
56 |
private int maximumFractionDigits = 3; |
|
56 | 57 |
|
58 |
/** |
|
59 |
* This is the default constructor |
|
60 |
*/ |
|
61 |
public DataInputField(int maximumFractionDigits) { |
|
62 |
this.maximumFractionDigits = maximumFractionDigits; |
|
63 |
setUpFormats(); |
|
64 |
initialize(); |
|
65 |
} |
|
57 | 66 |
|
58 | 67 |
/** |
59 |
* This is the default constructor
|
|
60 |
*/
|
|
68 |
* This is the default constructor
|
|
69 |
*/
|
|
61 | 70 |
public DataInputField() { |
62 | 71 |
setUpFormats(); |
63 | 72 |
initialize(); |
... | ... | |
70 | 79 |
private void setUpFormats() { |
71 | 80 |
doubleDisplayFormat = NumberFormat.getNumberInstance(); |
72 | 81 |
doubleDisplayFormat.setMinimumFractionDigits(0); |
82 |
doubleDisplayFormat.setMaximumFractionDigits(maximumFractionDigits); |
|
73 | 83 |
doubleEditFormat = NumberFormat.getNumberInstance(); |
74 | 84 |
} |
75 | 85 |
|
Also available in: Unified diff