Revision 343 trunk/org.gvsig.app.document.layout2.app/org.gvsig.app.document.layout2.app.mainplugin/src/main/java/org/gvsig/app/project/documents/layout/fframes/gui/numberFormat/DecimalFormatPanel.java
DecimalFormatPanel.java | ||
---|---|---|
9 | 9 |
import javax.swing.JLabel; |
10 | 10 |
|
11 | 11 |
import org.gvsig.gui.beans.swing.GridBagLayoutPanel; |
12 |
import org.gvsig.gui.beans.swing.JIncrementalNumberField; |
|
13 |
import org.gvsig.gui.beans.swing.ValidatingTextField; |
|
14 |
import org.gvsig.gui.beans.swing.ValidatingTextField.Cleaner; |
|
15 |
import org.gvsig.gui.beans.swing.ValidatingTextField.Validator; |
|
12 |
import org.gvsig.gui.beans.swing.JNumberSpinner; |
|
16 | 13 |
import org.gvsig.i18n.Messages; |
17 | 14 |
|
18 | 15 |
|
... | ... | |
38 | 35 |
private DecimalFormat format; |
39 | 36 |
private CharComboBox cbDecimalSep = null; |
40 | 37 |
private CharComboBox cbThousandsSep = null; |
41 |
private JIncrementalNumberField tfDecimalDigits = null;
|
|
38 |
private JNumberSpinner tfDecimalDigits = null;
|
|
42 | 39 |
private JLabel lbResult = null; |
43 | 40 |
private double testNumber = 123456789.00; |
44 | 41 |
private static final DecimalFormatSymbols defaultLocaleSymbols = DecimalFormatSymbols.getInstance(); |
... | ... | |
200 | 197 |
} |
201 | 198 |
} |
202 | 199 |
|
203 |
private JIncrementalNumberField getTfDecimalDigits() {
|
|
200 |
private JNumberSpinner getTfDecimalDigits() {
|
|
204 | 201 |
if (tfDecimalDigits==null) { |
205 |
Cleaner cleaner = ValidatingTextField.NUMBER_CLEANER; |
|
206 |
Validator validator = ValidatingTextField.INTEGER_VALIDATOR; |
|
207 |
tfDecimalDigits = new JIncrementalNumberField("Decimal digits", 2, validator, cleaner, 0.0d, 100.0d, 1.0); |
|
202 |
tfDecimalDigits = new JNumberSpinner(0, 2, 0, 100, 1); |
|
208 | 203 |
tfDecimalDigits.addActionListener(new ActionListener() { |
209 | 204 |
|
210 | 205 |
public void actionPerformed(ActionEvent e) { |
... | ... | |
218 | 213 |
|
219 | 214 |
private JLabel getLbTestResult() { |
220 | 215 |
if (lbResult==null) { |
221 |
String text; |
|
222 | 216 |
lbResult = new JLabel(); |
223 | 217 |
} |
224 | 218 |
return lbResult; |
Also available in: Unified diff