Revision 2491
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.api/src/main/java/org/gvsig/tools/dynform/JDynForm.java | ||
---|---|---|
76 | 76 |
public void setValues(DynObject values); |
77 | 77 |
public void getValues(DynObject values); |
78 | 78 |
|
79 |
public Object getValue(String fieldName);
|
|
79 |
public Object getValue(String fieldName);
|
|
80 | 80 |
public void setValue(String fieldName, Object value); |
81 | 81 |
|
82 | 82 |
public boolean hasValidValues(); |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.dynform/org.gvsig.tools.dynform.spi/src/main/java/org/gvsig/tools/dynform/spi/dynformfield/AbstractJDynFormFieldWithValueList.java | ||
---|---|---|
50 | 50 |
import org.gvsig.tools.dynform.spi.DynFormSPIManager.ComponentsFactory; |
51 | 51 |
import static org.gvsig.tools.dynform.spi.DynFormSPIManager.TAG_DYNFORM_DROPDOWN; |
52 | 52 |
import org.gvsig.tools.dynform.spi.dynformfield.AbstractJDynFormField.IllegalFieldValue; |
53 |
import org.gvsig.tools.dynobject.DynField_v2; |
|
54 |
import org.gvsig.tools.dynobject.DynObject; |
|
53 | 55 |
import org.gvsig.tools.dynobject.DynObjectValueItem; |
54 | 56 |
import org.gvsig.tools.dynobject.exception.DynFieldValidateException; |
55 | 57 |
import org.gvsig.tools.swing.api.DropDown; |
... | ... | |
95 | 97 |
} |
96 | 98 |
|
97 | 99 |
protected DynObjectValueItem[] getAvailableValues() { |
98 |
return this.getDefinition().getAvailableValues(); |
|
100 |
DynFormFieldDefinition theDefinition = this.getDefinition(); |
|
101 |
if( theDefinition == null ) { |
|
102 |
return null; |
|
103 |
} |
|
104 |
if( theDefinition instanceof DynField_v2 ) { |
|
105 |
if( theDefinition.getAvailableValuesMethod()!=null ) { |
|
106 |
DynObject item = this.getForm().getDefinition().createElement(); |
|
107 |
this.getForm().getValues(item); |
|
108 |
return theDefinition.getAvailableValues(item); |
|
109 |
} |
|
110 |
} |
|
111 |
return theDefinition.getAvailableValues(); |
|
99 | 112 |
} |
100 | 113 |
|
101 | 114 |
@Override |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/DefaultToolsSwingManager.java | ||
---|---|---|
1 | 1 |
package org.gvsig.tools.swing.impl; |
2 | 2 |
|
3 | 3 |
import org.gvsig.tools.swing.api.FilteredListModel; |
4 |
import java.awt.BorderLayout; |
|
5 | 4 |
import java.awt.Color; |
6 | 5 |
import java.awt.Component; |
7 |
import java.awt.Cursor; |
|
8 | 6 |
import java.awt.Dimension; |
9 | 7 |
import java.awt.Toolkit; |
10 | 8 |
import java.awt.datatransfer.DataFlavor; |
11 | 9 |
import java.awt.datatransfer.StringSelection; |
12 | 10 |
import java.awt.datatransfer.Transferable; |
13 |
import java.awt.event.ActionEvent; |
|
14 | 11 |
import java.awt.event.ActionListener; |
15 | 12 |
import java.awt.image.BufferedImage; |
16 | 13 |
import java.awt.image.WritableRaster; |
17 |
import java.beans.PropertyChangeEvent; |
|
18 | 14 |
import java.io.File; |
19 | 15 |
import java.lang.reflect.InvocationTargetException; |
20 | 16 |
import java.lang.reflect.Method; |
21 |
import javax.swing.AbstractAction; |
|
22 | 17 |
import javax.swing.AbstractButton; |
23 |
import javax.swing.Action; |
|
24 |
import javax.swing.BorderFactory; |
|
25 | 18 |
import javax.swing.ComboBoxModel; |
26 | 19 |
import javax.swing.Icon; |
27 | 20 |
import javax.swing.ImageIcon; |
... | ... | |
30 | 23 |
import javax.swing.JComponent; |
31 | 24 |
import javax.swing.JLabel; |
32 | 25 |
import javax.swing.JList; |
33 |
import javax.swing.JMenuItem; |
|
34 |
import javax.swing.JPanel; |
|
35 |
import javax.swing.JPopupMenu; |
|
36 | 26 |
import javax.swing.JScrollPane; |
37 | 27 |
import javax.swing.JSlider; |
38 | 28 |
import javax.swing.JTabbedPane; |
... | ... | |
41 | 31 |
import javax.swing.JViewport; |
42 | 32 |
import javax.swing.border.TitledBorder; |
43 | 33 |
import javax.swing.table.TableModel; |
44 |
import javax.swing.text.DefaultEditorKit; |
|
45 | 34 |
import javax.swing.text.JTextComponent; |
46 | 35 |
import javax.swing.tree.TreeModel; |
47 | 36 |
import org.apache.commons.lang3.StringUtils; |
... | ... | |
87 | 76 |
import org.gvsig.tools.swing.impl.bookmarkshistory.DefaultHistoryController; |
88 | 77 |
import org.gvsig.tools.swing.impl.pickercontroller.DataTypePickerControllerImpl; |
89 | 78 |
|
79 |
@SuppressWarnings("UseSpecificCatch") |
|
90 | 80 |
public class DefaultToolsSwingManager implements ToolsSwingManager { |
91 |
private static final String CLEAR_BUTTON_NAME = "ClearButton"; |
|
92 | 81 |
|
93 |
|
|
94 | 82 |
private Dimension maxPhysicalSizeOfBufferedImage; |
95 | 83 |
private JWebBrowserFactory webBrowserfactory; |
96 | 84 |
|
... | ... | |
335 | 323 |
|
336 | 324 |
@Override |
337 | 325 |
public void setDefaultPopupMenu(final JTextComponent component) { |
338 |
this.setDefaultPopupMenu(component, null);
|
|
326 |
ContextMenuUtils.setDefaultContextMenu(component);
|
|
339 | 327 |
} |
340 | 328 |
|
341 | 329 |
@Override |
342 | 330 |
public void setDefaultPopupMenu(final JTextComponent component, String title) { |
343 |
JPopupMenu popupMenu = new JPopupMenu(); |
|
344 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
345 |
|
|
346 |
Action copyAction = component.getActionMap().get(DefaultEditorKit.copyAction); |
|
347 |
Action cutAction = component.getActionMap().get(DefaultEditorKit.cutAction); |
|
348 |
Action pasteAction = component.getActionMap().get(DefaultEditorKit.pasteAction); |
|
349 |
Action selectAllAction = component.getActionMap().get(DefaultEditorKit.selectAllAction); |
|
350 |
|
|
351 |
if (copyAction == null |
|
352 |
&& cutAction == null |
|
353 |
&& pasteAction == null |
|
354 |
&& selectAllAction == null) { |
|
355 |
copyAction = component.getActionMap().get(i18nManager.getTranslation("copy")); |
|
356 |
cutAction = component.getActionMap().get(i18nManager.getTranslation("cut")); |
|
357 |
pasteAction = component.getActionMap().get(i18nManager.getTranslation("paste")); |
|
358 |
selectAllAction = component.getActionMap().get(i18nManager.getTranslation("SelectAll")); |
|
359 |
} else { |
|
360 |
copyAction.putValue(Action.NAME, i18nManager.getTranslation("copy")); |
|
361 |
cutAction.putValue(Action.NAME, i18nManager.getTranslation("cut")); |
|
362 |
pasteAction.putValue(Action.NAME, i18nManager.getTranslation("paste")); |
|
363 |
selectAllAction.putValue(Action.NAME, i18nManager.getTranslation("SelectAll")); |
|
364 |
} |
|
365 |
|
|
366 |
final String title2; |
|
367 |
if (title == null) { |
|
368 |
title2 = i18nManager.getTranslation("text_editor"); |
|
369 |
} else { |
|
370 |
title2 = title; |
|
371 |
} |
|
372 |
Action textEditorAction = new AbstractAction(i18nManager.getTranslation("text_editor")) { |
|
373 |
@Override |
|
374 |
public void actionPerformed(ActionEvent e) { |
|
375 |
DefaultZoomDialog dialog = new DefaultZoomDialog(component, title2, component.getText()); |
|
376 |
dialog.setEditable(component.isEditable()); |
|
377 |
dialog.setAlwaysOnTop(true); |
|
378 |
dialog.setVisible(true); |
|
379 |
if (component.isEditable() && component.isEnabled()) { |
|
380 |
component.setText(dialog.getText()); |
|
381 |
} |
|
382 |
} |
|
383 |
}; |
|
384 |
final JMenuItem menuCut = new JMenuItem(cutAction); |
|
385 |
final JMenuItem menuPaste = new JMenuItem(pasteAction); |
|
386 |
|
|
387 |
popupMenu.add(textEditorAction); |
|
388 |
popupMenu.addSeparator(); |
|
389 |
|
|
390 |
popupMenu.add(menuCut); |
|
391 |
popupMenu.add(copyAction); |
|
392 |
popupMenu.add(menuPaste); |
|
393 |
popupMenu.add(selectAllAction); |
|
394 |
|
|
395 |
if (component.isEnabled() && component.isEditable()) { |
|
396 |
menuCut.setEnabled(true); |
|
397 |
menuPaste.setEnabled(true); |
|
398 |
} else { |
|
399 |
menuCut.setEnabled(false); |
|
400 |
menuPaste.setEnabled(false); |
|
401 |
} |
|
402 |
component.addPropertyChangeListener((PropertyChangeEvent evt) -> { |
|
403 |
if (evt == null) { |
|
404 |
return; |
|
405 |
} |
|
406 |
if (evt.getPropertyName().equalsIgnoreCase("enabled")) { |
|
407 |
boolean enabled = component.isEnabled(); |
|
408 |
menuCut.setEnabled(enabled); |
|
409 |
menuPaste.setEnabled(enabled); |
|
410 |
} else if (evt.getPropertyName().equalsIgnoreCase("editable")) { |
|
411 |
boolean editable = component.isEditable(); |
|
412 |
menuCut.setEnabled(editable); |
|
413 |
menuPaste.setEnabled(editable); |
|
414 |
} |
|
415 |
}); |
|
416 |
component.setComponentPopupMenu(popupMenu); |
|
331 |
ContextMenuUtils.setDefaultContextMenu(component, title); |
|
417 | 332 |
} |
418 |
|
|
419 |
@Override |
|
420 |
public String showZoomDialog(Component parent, String title, String text, boolean editable) { |
|
421 |
DefaultZoomDialog dialog = new DefaultZoomDialog(parent, title, text); |
|
422 |
dialog.setEditable(editable); |
|
423 |
dialog.setAlwaysOnTop(true); |
|
424 |
dialog.setVisible(true); |
|
425 |
if (editable) { |
|
426 |
return dialog.getText(); |
|
427 |
} |
|
428 |
return text; |
|
429 |
} |
|
430 | 333 |
|
431 | 334 |
@Override |
432 | 335 |
public void setDefaultPopupMenu(JComboBox component) { |
433 |
this.setDefaultPopupMenu((JTextComponent) component.getEditor().getEditorComponent(), null);
|
|
336 |
ContextMenuUtils.setDefaultContextMenu(component);
|
|
434 | 337 |
} |
435 | 338 |
|
436 | 339 |
@Override |
437 | 340 |
public void setDefaultPopupMenu(JComboBox component, String title) { |
438 |
this.setDefaultPopupMenu((JTextComponent) component.getEditor().getEditorComponent(), title);
|
|
341 |
ContextMenuUtils.setDefaultContextMenu(component, title);
|
|
439 | 342 |
} |
440 | 343 |
|
441 | 344 |
@Override |
... | ... | |
530 | 433 |
|
531 | 434 |
@Override |
532 | 435 |
public void addClearButton(JTextComponent text) { |
533 |
this.addClearButton(text, null);
|
|
436 |
ClearButtonUtils.addClearButton(text, null);
|
|
534 | 437 |
} |
535 | 438 |
|
536 | 439 |
@Override |
537 | 440 |
public void addClearButton(JComboBox combo) { |
538 |
try { |
|
539 |
JTextComponent text = (JTextComponent) combo.getEditor().getEditorComponent(); |
|
540 |
this.addClearButton(text, null); |
|
541 |
} catch (Throwable th) { |
|
542 |
// Si no puede a?adir el boton no hace nada. |
|
543 |
} |
|
441 |
ClearButtonUtils.addClearButton(combo); |
|
544 | 442 |
} |
545 | 443 |
|
546 | 444 |
@Override |
547 | 445 |
public boolean hasClearButton(final JComboBox combo) { |
548 |
try { |
|
549 |
JTextComponent text = (JTextComponent) combo.getEditor().getEditorComponent(); |
|
550 |
return this.hasClearButton(text); |
|
551 |
} catch (Throwable th) { |
|
552 |
return false; |
|
553 |
} |
|
446 |
return ClearButtonUtils.hasClearButton(combo); |
|
554 | 447 |
} |
555 | 448 |
|
556 | 449 |
@Override |
557 | 450 |
public void removeClearButton(final JComboBox combo) { |
558 |
try { |
|
559 |
JTextComponent text = (JTextComponent) combo.getEditor().getEditorComponent(); |
|
560 |
this.removeClearButton(text); |
|
561 |
} catch (Throwable th) { |
|
562 |
// Si no puede a?adir el boton no hace nada. |
|
563 |
} |
|
451 |
ClearButtonUtils.removeClearButton(combo); |
|
564 | 452 |
} |
565 | 453 |
|
566 | 454 |
@Override |
567 | 455 |
public boolean hasClearButton(final JTextComponent text) { |
568 |
for (Component component : text.getComponents()) { |
|
569 |
if( component instanceof JButton && |
|
570 |
StringUtils.equalsIgnoreCase(CLEAR_BUTTON_NAME, component.getName()) ) { |
|
571 |
return true; |
|
572 |
} |
|
573 |
} |
|
574 |
return false; |
|
456 |
return ClearButtonUtils.hasClearButton(text); |
|
575 | 457 |
} |
576 | 458 |
|
577 | 459 |
@Override |
578 | 460 |
public void removeClearButton(final JTextComponent text) { |
579 |
for (Component component : text.getComponents()) { |
|
580 |
if( component instanceof JButton && |
|
581 |
StringUtils.equalsIgnoreCase(CLEAR_BUTTON_NAME, component.getName()) ) { |
|
582 |
text.remove(component); |
|
583 |
return; |
|
584 |
} |
|
585 |
} |
|
461 |
ClearButtonUtils.removeClearButton(text); |
|
586 | 462 |
} |
587 | 463 |
|
588 | 464 |
@Override |
589 | 465 |
public void addClearButton(final JTextComponent text, final ActionListener action) { |
590 |
JPanel panel = new JPanel(); |
|
591 |
final JButton btnClear = new JButton(getIcon("picker-cleartext")); |
|
592 |
panel.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); |
|
593 |
btnClear.setBorderPainted(false); |
|
594 |
btnClear.setBorder(BorderFactory.createEmptyBorder(0,1,0,2)); |
|
595 |
btnClear.setBorderPainted(false); |
|
596 |
btnClear.setFocusPainted(false); |
|
597 |
btnClear.setContentAreaFilled(false); |
|
598 |
btnClear.setOpaque(false); |
|
599 |
btnClear.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); |
|
600 |
btnClear.setName(CLEAR_BUTTON_NAME); |
|
601 |
if (action == null) { |
|
602 |
btnClear.addActionListener((ActionEvent e) -> { |
|
603 |
text.setText(""); |
|
604 |
}); |
|
605 |
} else { |
|
606 |
btnClear.addActionListener(action); |
|
466 |
ClearButtonUtils.addClearButton(text, action); |
|
467 |
} |
|
468 |
|
|
469 |
public String showZoomDialog(Component parent, String title, String text, boolean editable) { |
|
470 |
DefaultZoomDialog dialog = new DefaultZoomDialog(parent, title, text); |
|
471 |
dialog.setEditable(editable); |
|
472 |
dialog.setAlwaysOnTop(true); |
|
473 |
dialog.setVisible(true); |
|
474 |
if (editable) { |
|
475 |
return dialog.getText(); |
|
607 | 476 |
} |
608 |
panel.setOpaque(false); |
|
609 |
panel.setLayout(new BorderLayout()); |
|
610 |
panel.add(btnClear, BorderLayout.NORTH); |
|
611 |
text.setLayout(new BorderLayout()); |
|
612 |
text.add(panel, BorderLayout.EAST); |
|
613 |
|
|
614 |
text.addPropertyChangeListener((PropertyChangeEvent evt) -> { |
|
615 |
if (evt == null) { |
|
616 |
return; |
|
617 |
} |
|
618 |
if (evt.getPropertyName().equalsIgnoreCase("enabled")) { |
|
619 |
boolean enabled = text.isEnabled(); |
|
620 |
btnClear.setEnabled(enabled); |
|
621 |
} else if (evt.getPropertyName().equalsIgnoreCase("editable")) { |
|
622 |
boolean editable = text.isEditable(); |
|
623 |
btnClear.setEnabled(editable); |
|
624 |
} |
|
625 |
}); |
|
477 |
return text; |
|
626 | 478 |
} |
627 |
|
|
479 |
|
|
628 | 480 |
@Override |
629 | 481 |
public SimpleImage createSimpleImage() { |
630 | 482 |
SimpleImage x = new DefaultSimpleImage(); |
... | ... | |
815 | 667 |
} |
816 | 668 |
return null; |
817 | 669 |
} |
670 |
|
|
818 | 671 |
} |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/TimestampPickerControllerImpl.java | ||
---|---|---|
1 |
package org.gvsig.tools.swing.impl.pickercontroller; |
|
2 |
|
|
3 |
import java.sql.Time; |
|
4 |
import java.sql.Timestamp; |
|
5 |
import java.text.DateFormat; |
|
6 |
import java.util.Date; |
|
7 |
import javax.swing.JButton; |
|
8 |
import javax.swing.JSpinner; |
|
9 |
import javax.swing.text.JTextComponent; |
|
10 |
import javax.swing.text.MaskFormatter; |
|
11 |
import org.gvsig.tools.dataTypes.DataTypes; |
|
12 |
import org.gvsig.tools.swing.api.pickercontroller.AbstractPickerController; |
|
13 |
import org.gvsig.tools.swing.api.pickercontroller.TimestampPickerController; |
|
14 |
import org.gvsig.tools.swing.impl.pickercontroller.nullablespinner.NullableSpinnerUtils; |
|
15 |
|
|
16 |
/** |
|
17 |
* |
|
18 |
* @author gvSIG Team |
|
19 |
*/ |
|
20 |
@SuppressWarnings("UseSpecificCatch") |
|
21 |
public class TimestampPickerControllerImpl |
|
22 |
extends AbstractPickerController<Timestamp> |
|
23 |
implements TimestampPickerController { |
|
24 |
|
|
25 |
|
|
26 |
public static void selfRegister() { |
|
27 |
} |
|
28 |
|
|
29 |
private final DatePickerControllerImpl dateController; |
|
30 |
private final TimePickerControllerImpl timeController; |
|
31 |
private final JSpinner spnMileseconds; |
|
32 |
|
|
33 |
public TimestampPickerControllerImpl(JTextComponent txtDate, JButton btnDate, JSpinner spnTime, JSpinner spnMileseconds) { |
|
34 |
this.dateController = new DatePickerControllerImpl(txtDate, btnDate); |
|
35 |
this.timeController = new TimePickerControllerImpl(spnTime); |
|
36 |
if( spnMileseconds==null ) { |
|
37 |
spnMileseconds = new JSpinner(); |
|
38 |
} |
|
39 |
this.spnMileseconds = spnMileseconds; |
|
40 |
NullableSpinnerUtils.ofIntegers(this.spnMileseconds, 0, 0, 999, 1); |
|
41 |
} |
|
42 |
|
|
43 |
@Override |
|
44 |
public void uninstall() { |
|
45 |
this.dateController.uninstall(); |
|
46 |
this.timeController.uninstall(); |
|
47 |
} |
|
48 |
|
|
49 |
@Override |
|
50 |
public boolean isValid() { |
|
51 |
return this.dateController.isValid() && this.timeController.isValid(); |
|
52 |
} |
|
53 |
|
|
54 |
@Override |
|
55 |
public boolean isEmpty() { |
|
56 |
return this.dateController.isEmpty()&& this.timeController.isEmpty(); |
|
57 |
} |
|
58 |
|
|
59 |
@Override |
|
60 |
public Timestamp get() { |
|
61 |
Time time = this.timeController.get(); |
|
62 |
Date date = this.dateController.get(); |
|
63 |
if( date == null || time == null ) { |
|
64 |
return null; |
|
65 |
} |
|
66 |
int millis = 0; |
|
67 |
if( this.spnMileseconds.isVisible() ) { |
|
68 |
if( this.spnMileseconds.getValue()==null ) { |
|
69 |
return null; |
|
70 |
} |
|
71 |
millis = ((Number)this.spnMileseconds.getValue()).intValue(); |
|
72 |
} |
|
73 |
Timestamp timestamp = new Timestamp( |
|
74 |
date.getYear(), |
|
75 |
date.getMonth(), |
|
76 |
date.getDate(), |
|
77 |
time.getHours(), |
|
78 |
time.getMinutes(), |
|
79 |
time.getSeconds(), |
|
80 |
millis |
|
81 |
); |
|
82 |
return timestamp; |
|
83 |
} |
|
84 |
|
|
85 |
@Override |
|
86 |
public void set(Timestamp timestamp) { |
|
87 |
if( timestamp==null ) { |
|
88 |
this.dateController.set(null); |
|
89 |
this.timeController.set(null); |
|
90 |
this.spnMileseconds.setValue(null); |
|
91 |
return; |
|
92 |
} |
|
93 |
Time time = new Time(timestamp.getTime()); |
|
94 |
Date date = new Date(timestamp.getTime()); |
|
95 |
this.dateController.set(date); |
|
96 |
this.timeController.set(time); |
|
97 |
} |
|
98 |
|
|
99 |
@Override |
|
100 |
public void setEnabled(boolean enabled) { |
|
101 |
this.dateController.setEnabled(enabled); |
|
102 |
this.timeController.setEnabled(enabled); |
|
103 |
this.spnMileseconds.setEnabled(enabled); |
|
104 |
} |
|
105 |
|
|
106 |
@Override |
|
107 |
public boolean isEnabled() { |
|
108 |
return this.dateController.isEnabled(); |
|
109 |
} |
|
110 |
|
|
111 |
@Override |
|
112 |
public void coerceAndSet(Object value) { |
|
113 |
this.set( |
|
114 |
(Timestamp) this.coerce( |
|
115 |
DataTypes.TIMESTAMP, |
|
116 |
value, |
|
117 |
new Timestamp(new Date().getTime()) |
|
118 |
) |
|
119 |
); |
|
120 |
} |
|
121 |
|
|
122 |
@Override |
|
123 |
public DateFormat getDateFormat() { |
|
124 |
return this.dateController.getDateFormat(); |
|
125 |
} |
|
126 |
|
|
127 |
@Override |
|
128 |
public MaskFormatter getMask() { |
|
129 |
return this.dateController.getMask(); |
|
130 |
} |
|
131 |
|
|
132 |
@Override |
|
133 |
public void setEmptyText(String emptyText) { |
|
134 |
this.dateController.setEmptyText(emptyText); |
|
135 |
} |
|
136 |
|
|
137 |
} |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/TestView.xml | ||
---|---|---|
25 | 25 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
26 | 26 |
</super> |
27 | 27 |
<at name="id">/home/jjdelcerro/datos/devel/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/TestView.xml</at> |
28 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE</at> |
|
28 |
<at name="path">datos/devel/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/TestView.xml</at> |
|
29 |
<at name="rowspecs">CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE</at> |
|
29 | 30 |
<at name="colspecs">FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE</at> |
30 | 31 |
<at name="components"> |
31 | 32 |
<object classname="java.util.LinkedList"> |
... | ... | |
73 | 74 |
</at> |
74 | 75 |
</object> |
75 | 76 |
</at> |
76 |
<at name="name"></at>
|
|
77 |
<at name="width">60</at>
|
|
77 |
<at name="width">47</at>
|
|
78 |
<at name="name"/>
|
|
78 | 79 |
<at name="text">Fichero</at> |
79 | 80 |
<at name="fill"> |
80 | 81 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
81 | 82 |
<at name="name">fill</at> |
82 | 83 |
</object> |
83 | 84 |
</at> |
84 |
<at name="height">15</at>
|
|
85 |
<at name="height">16</at>
|
|
85 | 86 |
</object> |
86 | 87 |
</at> |
87 | 88 |
</object> |
... | ... | |
133 | 134 |
</at> |
134 | 135 |
</object> |
135 | 136 |
</at> |
136 |
<at name="name"></at>
|
|
137 |
<at name="width">60</at>
|
|
137 |
<at name="width">47</at>
|
|
138 |
<at name="name"/>
|
|
138 | 139 |
<at name="text">Color</at> |
139 | 140 |
<at name="fill"> |
140 | 141 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
141 | 142 |
<at name="name">fill</at> |
142 | 143 |
</object> |
143 | 144 |
</at> |
144 |
<at name="height">15</at>
|
|
145 |
<at name="height">16</at>
|
|
145 | 146 |
</object> |
146 | 147 |
</at> |
147 | 148 |
</object> |
... | ... | |
193 | 194 |
</at> |
194 | 195 |
</object> |
195 | 196 |
</at> |
196 |
<at name="name"></at>
|
|
197 |
<at name="width">60</at>
|
|
197 |
<at name="width">47</at>
|
|
198 |
<at name="name"/>
|
|
198 | 199 |
<at name="text">Fecha</at> |
199 | 200 |
<at name="fill"> |
200 | 201 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
201 | 202 |
<at name="name">fill</at> |
202 | 203 |
</object> |
203 | 204 |
</at> |
204 |
<at name="height">15</at>
|
|
205 |
<at name="height">16</at>
|
|
205 | 206 |
</object> |
206 | 207 |
</at> |
207 | 208 |
</object> |
... | ... | |
253 | 254 |
</at> |
254 | 255 |
</object> |
255 | 256 |
</at> |
256 |
<at name="name"></at>
|
|
257 |
<at name="width">60</at>
|
|
257 |
<at name="width">47</at>
|
|
258 |
<at name="name"/>
|
|
258 | 259 |
<at name="text">Fichero2</at> |
259 | 260 |
<at name="fill"> |
260 | 261 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
261 | 262 |
<at name="name">fill</at> |
262 | 263 |
</object> |
263 | 264 |
</at> |
264 |
<at name="height">15</at>
|
|
265 |
<at name="height">16</at>
|
|
265 | 266 |
</object> |
266 | 267 |
</at> |
267 | 268 |
</object> |
... | ... | |
314 | 315 |
</object> |
315 | 316 |
</at> |
316 | 317 |
<at name="name">txtFile1</at> |
317 |
<at name="width">708</at>
|
|
318 |
<at name="height">19</at>
|
|
318 |
<at name="width">1249</at>
|
|
319 |
<at name="height">22</at>
|
|
319 | 320 |
</object> |
320 | 321 |
</at> |
321 | 322 |
</object> |
... | ... | |
368 | 369 |
</object> |
369 | 370 |
</at> |
370 | 371 |
<at name="name">txtColor1</at> |
371 |
<at name="width">708</at>
|
|
372 |
<at name="height">19</at>
|
|
372 |
<at name="width">1249</at>
|
|
373 |
<at name="height">22</at>
|
|
373 | 374 |
</object> |
374 | 375 |
</at> |
375 | 376 |
</object> |
... | ... | |
422 | 423 |
</object> |
423 | 424 |
</at> |
424 | 425 |
<at name="name">txtDate</at> |
425 |
<at name="width">708</at>
|
|
426 |
<at name="height">19</at>
|
|
426 |
<at name="width">1249</at>
|
|
427 |
<at name="height">22</at>
|
|
427 | 428 |
</object> |
428 | 429 |
</at> |
429 | 430 |
</object> |
... | ... | |
478 | 479 |
<at name="scrollableTracksViewportHeight">true</at> |
479 | 480 |
<at name="scrollableTracksViewportWidth">true</at> |
480 | 481 |
<at name="name">txtFile2</at> |
481 |
<at name="width">705</at>
|
|
482 |
<at name="width">1247</at>
|
|
482 | 483 |
<at name="scollBars"> |
483 | 484 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
484 | 485 |
<at name="name">scollBars</at> |
... | ... | |
506 | 507 |
</at> |
507 | 508 |
</object> |
508 | 509 |
</at> |
509 |
<at name="height">414</at>
|
|
510 |
<at name="height">530</at>
|
|
510 | 511 |
</object> |
511 | 512 |
</at> |
512 | 513 |
</object> |
... | ... | |
559 | 560 |
</object> |
560 | 561 |
</at> |
561 | 562 |
<at name="actionCommand">...</at> |
563 |
<at name="opaque">false</at> |
|
562 | 564 |
<at name="name">btnFile1</at> |
563 |
<at name="width">49</at>
|
|
565 |
<at name="width">41</at>
|
|
564 | 566 |
<at name="text">...</at> |
565 |
<at name="height">25</at>
|
|
567 |
<at name="height">24</at>
|
|
566 | 568 |
</object> |
567 | 569 |
</at> |
568 | 570 |
</object> |
... | ... | |
615 | 617 |
</object> |
616 | 618 |
</at> |
617 | 619 |
<at name="actionCommand">...</at> |
620 |
<at name="opaque">false</at> |
|
618 | 621 |
<at name="name">btnColor1</at> |
619 |
<at name="width">49</at>
|
|
622 |
<at name="width">41</at>
|
|
620 | 623 |
<at name="text">...</at> |
621 |
<at name="height">25</at>
|
|
624 |
<at name="height">24</at>
|
|
622 | 625 |
</object> |
623 | 626 |
</at> |
624 | 627 |
</object> |
... | ... | |
671 | 674 |
</object> |
672 | 675 |
</at> |
673 | 676 |
<at name="actionCommand">...</at> |
677 |
<at name="opaque">false</at> |
|
674 | 678 |
<at name="name">btnDate</at> |
675 |
<at name="width">49</at>
|
|
679 |
<at name="width">41</at>
|
|
676 | 680 |
<at name="text">...</at> |
677 |
<at name="height">25</at>
|
|
681 |
<at name="height">24</at>
|
|
678 | 682 |
</object> |
679 | 683 |
</at> |
680 | 684 |
</object> |
... | ... | |
727 | 731 |
</object> |
728 | 732 |
</at> |
729 | 733 |
<at name="actionCommand">...</at> |
734 |
<at name="opaque">false</at> |
|
730 | 735 |
<at name="name">btnFile2</at> |
731 |
<at name="width">49</at>
|
|
736 |
<at name="width">41</at>
|
|
732 | 737 |
<at name="text">...</at> |
733 |
<at name="height">25</at>
|
|
738 |
<at name="height">24</at>
|
|
734 | 739 |
</object> |
735 | 740 |
</at> |
736 | 741 |
</object> |
... | ... | |
738 | 743 |
</object> |
739 | 744 |
</at> |
740 | 745 |
</item> |
746 |
<item > |
|
747 |
<at name="value"> |
|
748 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
749 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
750 |
<at name="cellconstraints"> |
|
751 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
752 |
<at name="column">2</at> |
|
753 |
<at name="row">9</at> |
|
754 |
<at name="colspan">1</at> |
|
755 |
<at name="rowspan">1</at> |
|
756 |
<at name="halign">default</at> |
|
757 |
<at name="valign">default</at> |
|
758 |
<at name="insets" object="insets">0,0,0,0</at> |
|
759 |
</object> |
|
760 |
</at> |
|
761 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
762 |
</super> |
|
763 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
764 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
765 |
<at name="beanproperties"> |
|
766 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
767 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
768 |
<at name="properties"> |
|
769 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
770 |
<at name="border"> |
|
771 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
772 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
773 |
<at name="name">border</at> |
|
774 |
</super> |
|
775 |
<at name="borders"> |
|
776 |
<object classname="java.util.LinkedList"> |
|
777 |
<item > |
|
778 |
<at name="value"> |
|
779 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
780 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
781 |
<at name="name">border</at> |
|
782 |
</super> |
|
783 |
</object> |
|
784 |
</at> |
|
785 |
</item> |
|
786 |
</object> |
|
787 |
</at> |
|
788 |
</object> |
|
789 |
</at> |
|
790 |
<at name="width">47</at> |
|
791 |
<at name="name"/> |
|
792 |
<at name="text">Hora</at> |
|
793 |
<at name="fill"> |
|
794 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
795 |
<at name="name">fill</at> |
|
796 |
</object> |
|
797 |
</at> |
|
798 |
<at name="height">16</at> |
|
799 |
</object> |
|
800 |
</at> |
|
801 |
</object> |
|
802 |
</at> |
|
803 |
</object> |
|
804 |
</at> |
|
805 |
</item> |
|
806 |
<item > |
|
807 |
<at name="value"> |
|
808 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
809 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
810 |
<at name="cellconstraints"> |
|
811 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
812 |
<at name="column">4</at> |
|
813 |
<at name="row">9</at> |
|
814 |
<at name="colspan">1</at> |
|
815 |
<at name="rowspan">1</at> |
|
816 |
<at name="halign">default</at> |
|
817 |
<at name="valign">default</at> |
|
818 |
<at name="insets" object="insets">0,0,0,0</at> |
|
819 |
</object> |
|
820 |
</at> |
|
821 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
822 |
</super> |
|
823 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
824 |
<at name="beanclass">javax.swing.JSpinner</at> |
|
825 |
<at name="beanproperties"> |
|
826 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
827 |
<at name="classname">javax.swing.JSpinner</at> |
|
828 |
<at name="properties"> |
|
829 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
830 |
<at name="opaque">false</at> |
|
831 |
<at name="name">spnTime</at> |
|
832 |
<at name="width">1249</at> |
|
833 |
<at name="height">22</at> |
|
834 |
</object> |
|
835 |
</at> |
|
836 |
</object> |
|
837 |
</at> |
|
838 |
</object> |
|
839 |
</at> |
|
840 |
</item> |
|
841 |
<item > |
|
842 |
<at name="value"> |
|
843 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
844 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
845 |
<at name="cellconstraints"> |
|
846 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
847 |
<at name="column">2</at> |
|
848 |
<at name="row">11</at> |
|
849 |
<at name="colspan">1</at> |
|
850 |
<at name="rowspan">1</at> |
|
851 |
<at name="halign">default</at> |
|
852 |
<at name="valign">default</at> |
|
853 |
<at name="insets" object="insets">0,0,0,0</at> |
|
854 |
</object> |
|
855 |
</at> |
|
856 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
857 |
</super> |
|
858 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
859 |
<at name="beanclass">com.jeta.forms.components.label.JETALabel</at> |
|
860 |
<at name="beanproperties"> |
|
861 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
862 |
<at name="classname">com.jeta.forms.components.label.JETALabel</at> |
|
863 |
<at name="properties"> |
|
864 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
865 |
<at name="border"> |
|
866 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
867 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
868 |
<at name="name">border</at> |
|
869 |
</super> |
|
870 |
<at name="borders"> |
|
871 |
<object classname="java.util.LinkedList"> |
|
872 |
<item > |
|
873 |
<at name="value"> |
|
874 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
875 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
876 |
<at name="name">border</at> |
|
877 |
</super> |
|
878 |
</object> |
|
879 |
</at> |
|
880 |
</item> |
|
881 |
</object> |
|
882 |
</at> |
|
883 |
</object> |
|
884 |
</at> |
|
885 |
<at name="width">47</at> |
|
886 |
<at name="name"/> |
|
887 |
<at name="text">Datetime</at> |
|
888 |
<at name="fill"> |
|
889 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
890 |
<at name="name">fill</at> |
|
891 |
</object> |
|
892 |
</at> |
|
893 |
<at name="height">16</at> |
|
894 |
</object> |
|
895 |
</at> |
|
896 |
</object> |
|
897 |
</at> |
|
898 |
</object> |
|
899 |
</at> |
|
900 |
</item> |
|
901 |
<item > |
|
902 |
<at name="value"> |
|
903 |
<object classname="com.jeta.forms.store.memento.FormMemento"> |
|
904 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
905 |
<at name="cellconstraints"> |
|
906 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
907 |
<at name="column">4</at> |
|
908 |
<at name="row">11</at> |
|
909 |
<at name="colspan">1</at> |
|
910 |
<at name="rowspan">1</at> |
|
911 |
<at name="halign">default</at> |
|
912 |
<at name="valign">default</at> |
|
913 |
<at name="insets" object="insets">0,0,0,0</at> |
|
914 |
</object> |
|
915 |
</at> |
|
916 |
<at name="componentclass">com.jeta.forms.gui.form.FormComponent</at> |
|
917 |
</super> |
|
918 |
<at name="id">embedded.1159577791</at> |
|
919 |
<at name="rowspecs">CENTER:DEFAULT:NONE</at> |
|
920 |
<at name="colspecs">FILL:DEFAULT:GROW(0.6),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.2),FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.2)</at> |
|
921 |
<at name="components"> |
|
922 |
<object classname="java.util.LinkedList"> |
|
923 |
<item > |
|
924 |
<at name="value"> |
|
925 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
926 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
927 |
<at name="cellconstraints"> |
|
928 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
929 |
<at name="column">1</at> |
|
930 |
<at name="row">1</at> |
|
931 |
<at name="colspan">1</at> |
|
932 |
<at name="rowspan">1</at> |
|
933 |
<at name="halign">default</at> |
|
934 |
<at name="valign">default</at> |
|
935 |
<at name="insets" object="insets">0,0,0,0</at> |
|
936 |
</object> |
|
937 |
</at> |
|
938 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
939 |
</super> |
|
940 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
941 |
<at name="beanclass">javax.swing.JTextField</at> |
|
942 |
<at name="beanproperties"> |
|
943 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
944 |
<at name="classname">javax.swing.JTextField</at> |
|
945 |
<at name="properties"> |
|
946 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
947 |
<at name="border"> |
|
948 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
949 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
950 |
<at name="name">border</at> |
|
951 |
</super> |
|
952 |
<at name="borders"> |
|
953 |
<object classname="java.util.LinkedList"> |
|
954 |
<item > |
|
955 |
<at name="value"> |
|
956 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
957 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
958 |
<at name="name">border</at> |
|
959 |
</super> |
|
960 |
</object> |
|
961 |
</at> |
|
962 |
</item> |
|
963 |
</object> |
|
964 |
</at> |
|
965 |
</object> |
|
966 |
</at> |
|
967 |
<at name="name">txtDatetime</at> |
|
968 |
<at name="width">674</at> |
|
969 |
<at name="height">22</at> |
|
970 |
</object> |
|
971 |
</at> |
|
972 |
</object> |
|
973 |
</at> |
|
974 |
</object> |
|
975 |
</at> |
|
976 |
</item> |
|
977 |
<item > |
|
978 |
<at name="value"> |
|
979 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
980 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
981 |
<at name="cellconstraints"> |
|
982 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
983 |
<at name="column">3</at> |
|
984 |
<at name="row">1</at> |
|
985 |
<at name="colspan">1</at> |
|
986 |
<at name="rowspan">1</at> |
|
987 |
<at name="halign">default</at> |
|
988 |
<at name="valign">default</at> |
|
989 |
<at name="insets" object="insets">0,0,0,0</at> |
|
990 |
</object> |
|
991 |
</at> |
|
992 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
993 |
</super> |
|
994 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
995 |
<at name="beanclass">javax.swing.JButton</at> |
|
996 |
<at name="beanproperties"> |
|
997 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
998 |
<at name="classname">javax.swing.JButton</at> |
|
999 |
<at name="properties"> |
|
1000 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
1001 |
<at name="border"> |
|
1002 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
1003 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
1004 |
<at name="name">border</at> |
|
1005 |
</super> |
|
1006 |
<at name="borders"> |
|
1007 |
<object classname="java.util.LinkedList"> |
|
1008 |
<item > |
|
1009 |
<at name="value"> |
|
1010 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
1011 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
1012 |
<at name="name">border</at> |
|
1013 |
</super> |
|
1014 |
</object> |
|
1015 |
</at> |
|
1016 |
</item> |
|
1017 |
</object> |
|
1018 |
</at> |
|
1019 |
</object> |
|
1020 |
</at> |
|
1021 |
<at name="actionCommand">...</at> |
|
1022 |
<at name="opaque">false</at> |
|
1023 |
<at name="name">btnDatetime</at> |
|
1024 |
<at name="width">41</at> |
|
1025 |
<at name="text">...</at> |
|
1026 |
<at name="height">24</at> |
|
1027 |
</object> |
|
1028 |
</at> |
|
1029 |
</object> |
|
1030 |
</at> |
|
1031 |
</object> |
|
1032 |
</at> |
|
1033 |
</item> |
|
1034 |
<item > |
|
1035 |
<at name="value"> |
|
1036 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
1037 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
1038 |
<at name="cellconstraints"> |
|
1039 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
1040 |
<at name="column">5</at> |
|
1041 |
<at name="row">1</at> |
|
1042 |
<at name="colspan">1</at> |
|
1043 |
<at name="rowspan">1</at> |
|
1044 |
<at name="halign">default</at> |
|
1045 |
<at name="valign">default</at> |
|
1046 |
<at name="insets" object="insets">0,0,0,0</at> |
|
1047 |
</object> |
|
1048 |
</at> |
|
1049 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
1050 |
</super> |
|
1051 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
1052 |
<at name="beanclass">javax.swing.JSpinner</at> |
|
1053 |
<at name="beanproperties"> |
|
1054 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
1055 |
<at name="classname">javax.swing.JSpinner</at> |
|
1056 |
<at name="properties"> |
|
1057 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
1058 |
<at name="opaque">false</at> |
|
1059 |
<at name="name">spnDatetime</at> |
|
1060 |
<at name="width">249</at> |
|
1061 |
<at name="height">22</at> |
|
1062 |
</object> |
|
1063 |
</at> |
|
1064 |
</object> |
|
1065 |
</at> |
|
1066 |
</object> |
|
1067 |
</at> |
|
1068 |
</item> |
|
1069 |
<item > |
|
1070 |
<at name="value"> |
|
1071 |
<object classname="com.jeta.forms.store.memento.BeanMemento"> |
|
1072 |
<super classname="com.jeta.forms.store.memento.ComponentMemento"> |
|
1073 |
<at name="cellconstraints"> |
|
1074 |
<object classname="com.jeta.forms.store.memento.CellConstraintsMemento"> |
|
1075 |
<at name="column">7</at> |
|
1076 |
<at name="row">1</at> |
|
1077 |
<at name="colspan">1</at> |
|
1078 |
<at name="rowspan">1</at> |
|
1079 |
<at name="halign">default</at> |
|
1080 |
<at name="valign">default</at> |
|
1081 |
<at name="insets" object="insets">0,0,0,0</at> |
|
1082 |
</object> |
|
1083 |
</at> |
|
1084 |
<at name="componentclass">com.jeta.forms.gui.form.StandardComponent</at> |
|
1085 |
</super> |
|
1086 |
<at name="jetabeanclass">com.jeta.forms.gui.beans.JETABean</at> |
|
1087 |
<at name="beanclass">javax.swing.JSpinner</at> |
|
1088 |
<at name="beanproperties"> |
|
1089 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
1090 |
<at name="classname">javax.swing.JSpinner</at> |
|
1091 |
<at name="properties"> |
|
1092 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
1093 |
<at name="name">spnDatetimeMillis</at> |
|
1094 |
<at name="width">250</at> |
|
1095 |
<at name="height">22</at> |
|
1096 |
</object> |
|
1097 |
</at> |
|
1098 |
</object> |
|
1099 |
</at> |
|
1100 |
</object> |
|
1101 |
</at> |
|
1102 |
</item> |
|
1103 |
</object> |
|
1104 |
</at> |
|
1105 |
<at name="properties"> |
|
1106 |
<object classname="com.jeta.forms.store.memento.PropertiesMemento"> |
|
1107 |
<at name="classname">com.jeta.forms.gui.form.GridView</at> |
|
1108 |
<at name="properties"> |
|
1109 |
<object classname="com.jeta.forms.store.support.PropertyMap"> |
|
1110 |
<at name="border"> |
|
1111 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
1112 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
1113 |
<at name="name">border</at> |
|
1114 |
</super> |
|
1115 |
<at name="borders"> |
|
1116 |
<object classname="java.util.LinkedList"/> |
|
1117 |
</at> |
|
1118 |
</object> |
|
1119 |
</at> |
|
1120 |
<at name="name"/> |
|
1121 |
<at name="fill"> |
|
1122 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
|
1123 |
<at name="name">fill</at> |
|
1124 |
</object> |
|
1125 |
</at> |
|
1126 |
<at name="scollBars"> |
|
1127 |
<object classname="com.jeta.forms.store.properties.ScrollBarsProperty"> |
|
1128 |
<at name="name">scollBars</at> |
|
1129 |
<at name="verticalpolicy">21</at> |
|
1130 |
<at name="horizontalpolicy">31</at> |
|
1131 |
<at name="border"> |
|
1132 |
<object classname="com.jeta.forms.store.properties.CompoundBorderProperty"> |
|
1133 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
1134 |
<at name="name">border</at> |
|
1135 |
</super> |
|
1136 |
<at name="borders"> |
|
1137 |
<object classname="java.util.LinkedList"> |
|
1138 |
<item > |
|
1139 |
<at name="value"> |
|
1140 |
<object classname="com.jeta.forms.store.properties.DefaultBorderProperty"> |
|
1141 |
<super classname="com.jeta.forms.store.properties.BorderProperty"> |
|
1142 |
<at name="name">border</at> |
|
1143 |
</super> |
|
1144 |
</object> |
|
1145 |
</at> |
|
1146 |
</item> |
|
1147 |
</object> |
|
1148 |
</at> |
|
1149 |
</object> |
|
1150 |
</at> |
|
1151 |
</object> |
|
1152 |
</at> |
|
1153 |
</object> |
|
1154 |
</at> |
|
1155 |
</object> |
|
1156 |
</at> |
|
1157 |
<at name="cellpainters"> |
|
1158 |
<object classname="com.jeta.forms.store.support.Matrix"> |
|
1159 |
<at name="rows"> |
|
1160 |
<object classname="[Ljava.lang.Object;" size="1"> |
|
1161 |
<at name="item" index="0"> |
|
1162 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1163 |
</at> |
|
1164 |
</object> |
|
1165 |
</at> |
|
1166 |
</object> |
|
1167 |
</at> |
|
1168 |
<at name="rowgroups"> |
|
1169 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
1170 |
<at name="groups"> |
|
1171 |
<object classname="java.util.HashMap"/> |
|
1172 |
</at> |
|
1173 |
</object> |
|
1174 |
</at> |
|
1175 |
<at name="colgroups"> |
|
1176 |
<object classname="com.jeta.forms.store.memento.FormGroupSet"> |
|
1177 |
<at name="groups"> |
|
1178 |
<object classname="java.util.HashMap"/> |
|
1179 |
</at> |
|
1180 |
</object> |
|
1181 |
</at> |
|
1182 |
</object> |
|
1183 |
</at> |
|
1184 |
</item> |
|
741 | 1185 |
</object> |
742 | 1186 |
</at> |
743 | 1187 |
<at name="properties"> |
... | ... | |
755 | 1199 |
</at> |
756 | 1200 |
</object> |
757 | 1201 |
</at> |
758 |
<at name="name"></at>
|
|
1202 |
<at name="name"/>
|
|
759 | 1203 |
<at name="fill"> |
760 | 1204 |
<object classname="com.jeta.forms.store.properties.effects.PaintProperty"> |
761 | 1205 |
<at name="name">fill</at> |
... | ... | |
795 | 1239 |
<at name="cellpainters"> |
796 | 1240 |
<object classname="com.jeta.forms.store.support.Matrix"> |
797 | 1241 |
<at name="rows"> |
798 |
<object classname="[Ljava.lang.Object;" size="9">
|
|
1242 |
<object classname="[Ljava.lang.Object;" size="13">
|
|
799 | 1243 |
<at name="item" index="0"> |
800 | 1244 |
<object classname="[Ljava.lang.Object;" size="7"/> |
801 | 1245 |
</at> |
... | ... | |
823 | 1267 |
<at name="item" index="8"> |
824 | 1268 |
<object classname="[Ljava.lang.Object;" size="7"/> |
825 | 1269 |
</at> |
1270 |
<at name="item" index="9"> |
|
1271 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1272 |
</at> |
|
1273 |
<at name="item" index="10"> |
|
1274 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1275 |
</at> |
|
1276 |
<at name="item" index="11"> |
|
1277 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1278 |
</at> |
|
1279 |
<at name="item" index="12"> |
|
1280 |
<object classname="[Ljava.lang.Object;" size="7"/> |
|
1281 |
</at> |
|
826 | 1282 |
</object> |
827 | 1283 |
</at> |
828 | 1284 |
</object> |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/TestView.java | ||
---|---|---|
14 | 14 |
import javax.swing.JLabel; |
15 | 15 |
import javax.swing.JPanel; |
16 | 16 |
import javax.swing.JScrollPane; |
17 |
import javax.swing.JSpinner; |
|
17 | 18 |
import javax.swing.JTextArea; |
18 | 19 |
import javax.swing.JTextField; |
19 | 20 |
|
... | ... | |
28 | 29 |
JButton btnColor1 = new JButton(); |
29 | 30 |
JButton btnDate = new JButton(); |
30 | 31 |
JButton btnFile2 = new JButton(); |
32 |
JSpinner spnTime = new JSpinner(); |
|
33 |
JTextField txtDatetime = new JTextField(); |
|
34 |
JButton btnDatetime = new JButton(); |
|
35 |
JSpinner spnDatetime = new JSpinner(); |
|
36 |
JSpinner spnDatetimeMillis = new JSpinner(); |
|
31 | 37 |
|
32 | 38 |
/** |
33 | 39 |
* Default constructor |
... | ... | |
119 | 125 |
public JPanel createPanel() |
120 | 126 |
{ |
121 | 127 |
JPanel jpanel1 = new JPanel(); |
122 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE"); |
|
128 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:DEFAULT:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),CENTER:DEFAULT:NONE,CENTER:2DLU:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE,CENTER:DEFAULT:NONE");
|
|
123 | 129 |
CellConstraints cc = new CellConstraints(); |
124 | 130 |
jpanel1.setLayout(formlayout1); |
125 | 131 |
|
... | ... | |
157 | 163 |
|
158 | 164 |
btnFile1.setActionCommand("..."); |
159 | 165 |
btnFile1.setName("btnFile1"); |
166 |
btnFile1.setOpaque(false); |
|
160 | 167 |
btnFile1.setText("..."); |
161 | 168 |
jpanel1.add(btnFile1,cc.xy(6,2)); |
162 | 169 |
|
163 | 170 |
btnColor1.setActionCommand("..."); |
164 | 171 |
btnColor1.setName("btnColor1"); |
172 |
btnColor1.setOpaque(false); |
|
165 | 173 |
btnColor1.setText("..."); |
166 | 174 |
jpanel1.add(btnColor1,cc.xy(6,4)); |
167 | 175 |
|
168 | 176 |
btnDate.setActionCommand("..."); |
169 | 177 |
btnDate.setName("btnDate"); |
178 |
btnDate.setOpaque(false); |
|
170 | 179 |
btnDate.setText("..."); |
171 | 180 |
jpanel1.add(btnDate,cc.xy(6,6)); |
172 | 181 |
|
173 | 182 |
btnFile2.setActionCommand("..."); |
174 | 183 |
btnFile2.setName("btnFile2"); |
184 |
btnFile2.setOpaque(false); |
|
175 | 185 |
btnFile2.setText("..."); |
176 | 186 |
jpanel1.add(btnFile2,new CellConstraints(6,8,1,1,CellConstraints.DEFAULT,CellConstraints.TOP)); |
177 | 187 |
|
178 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9 }); |
|
188 |
JLabel jlabel5 = new JLabel(); |
|
189 |
jlabel5.setText("Hora"); |
|
190 |
jpanel1.add(jlabel5,cc.xy(2,9)); |
|
191 |
|
|
192 |
spnTime.setName("spnTime"); |
|
193 |
spnTime.setOpaque(false); |
|
194 |
jpanel1.add(spnTime,cc.xy(4,9)); |
|
195 |
|
|
196 |
JLabel jlabel6 = new JLabel(); |
|
197 |
jlabel6.setText("Datetime"); |
|
198 |
jpanel1.add(jlabel6,cc.xy(2,11)); |
|
199 |
|
|
200 |
jpanel1.add(createPanel1(),cc.xy(4,11)); |
|
201 |
addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13 }); |
|
179 | 202 |
return jpanel1; |
180 | 203 |
} |
181 | 204 |
|
205 |
public JPanel createPanel1() |
|
206 |
{ |
|
207 |
JPanel jpanel1 = new JPanel(); |
|
208 |
FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:GROW(0.6),FILL:4DLU:NONE,FILL:DEFAULT:NONE,FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.2),FILL:4DLU:NONE,FILL:DEFAULT:GROW(0.2)","CENTER:DEFAULT:NONE"); |
|
209 |
CellConstraints cc = new CellConstraints(); |
|
210 |
jpanel1.setLayout(formlayout1); |
|
211 |
|
|
212 |
txtDatetime.setName("txtDatetime"); |
|
213 |
jpanel1.add(txtDatetime,cc.xy(1,1)); |
|
214 |
|
|
215 |
btnDatetime.setActionCommand("..."); |
|
216 |
btnDatetime.setName("btnDatetime"); |
|
217 |
btnDatetime.setOpaque(false); |
|
218 |
btnDatetime.setText("..."); |
|
219 |
jpanel1.add(btnDatetime,cc.xy(3,1)); |
|
220 |
|
|
221 |
spnDatetime.setName("spnDatetime"); |
|
222 |
spnDatetime.setOpaque(false); |
|
223 |
jpanel1.add(spnDatetime,cc.xy(5,1)); |
|
224 |
|
|
225 |
spnDatetimeMillis.setName("spnDatetimeMillis"); |
|
226 |
jpanel1.add(spnDatetimeMillis,cc.xy(7,1)); |
|
227 |
|
|
228 |
addFillComponents(jpanel1,new int[]{ 2,4,6 },new int[0]); |
|
229 |
return jpanel1; |
|
230 |
} |
|
231 |
|
|
182 | 232 |
/** |
183 | 233 |
* Initializer |
184 | 234 |
*/ |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/nullablespinner/NullableSpinnerTimeModel.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
package org.gvsig.tools.swing.impl.pickercontroller.nullablespinner; |
|
7 |
|
|
8 |
import java.io.Serializable; |
|
9 |
import java.sql.Time; |
|
10 |
import java.util.Calendar; |
|
11 |
import java.util.Date; |
|
12 |
import javax.swing.SpinnerDateModel; |
|
13 |
|
|
14 |
/** |
|
15 |
* |
|
16 |
* @author jjdelcerro |
|
17 |
*/ |
|
18 |
public class NullableSpinnerTimeModel extends SpinnerDateModel implements Serializable |
|
19 |
{ |
|
20 |
private Comparable start, end; |
|
21 |
private Calendar value; |
|
22 |
private int calendarField; |
|
23 |
|
|
24 |
|
|
25 |
private boolean calendarFieldOK(int calendarField) { |
|
26 |
switch(calendarField) { |
|
27 |
case Calendar.ERA: |
|
28 |
case Calendar.YEAR: |
|
29 |
case Calendar.MONTH: |
|
30 |
case Calendar.WEEK_OF_YEAR: |
|
31 |
case Calendar.WEEK_OF_MONTH: |
|
32 |
case Calendar.DAY_OF_MONTH: |
|
33 |
case Calendar.DAY_OF_YEAR: |
|
34 |
case Calendar.DAY_OF_WEEK: |
|
35 |
case Calendar.DAY_OF_WEEK_IN_MONTH: |
|
36 |
case Calendar.AM_PM: |
|
37 |
case Calendar.HOUR: |
|
38 |
case Calendar.HOUR_OF_DAY: |
|
39 |
case Calendar.MINUTE: |
|
40 |
case Calendar.SECOND: |
|
41 |
case Calendar.MILLISECOND: |
|
42 |
return true; |
|
43 |
default: |
|
44 |
return false; |
|
45 |
} |
|
46 |
} |
|
47 |
|
|
48 |
public NullableSpinnerTimeModel(Date value, Comparable start, Comparable end, int calendarField) { |
|
49 |
if (!calendarFieldOK(calendarField)) { |
|
50 |
throw new IllegalArgumentException("invalid calendarField"); |
|
51 |
} |
|
52 |
if (!(((start == null) || (start.compareTo(value) <= 0)) && |
|
53 |
((end == null) || (end.compareTo(value) >= 0)))) { |
|
54 |
throw new IllegalArgumentException("(start <= value <= end) is false"); |
|
55 |
} |
|
56 |
this.start = start; |
|
57 |
this.end = end; |
|
58 |
this.calendarField = calendarField; |
|
59 |
if( value == null ) { |
|
60 |
this.value = null; |
|
61 |
} else { |
|
62 |
this.value = Calendar.getInstance(); |
|
63 |
this.value.setTime(value); |
|
64 |
} |
|
65 |
} |
|
66 |
|
|
67 |
public NullableSpinnerTimeModel() { |
|
68 |
this(null, null, null, Calendar.DAY_OF_MONTH); |
|
69 |
} |
|
70 |
|
|
71 |
@Override |
|
72 |
public void setStart(Comparable start) { |
|
73 |
if ((start == null) ? (this.start != null) : !start.equals(this.start)) { |
|
74 |
this.start = start; |
|
75 |
fireStateChanged(); |
|
76 |
} |
|
77 |
} |
|
78 |
|
|
79 |
@Override |
|
80 |
public Comparable getStart() { |
|
81 |
return start; |
|
82 |
} |
|
83 |
|
|
84 |
@Override |
|
85 |
public void setEnd(Comparable end) { |
|
86 |
if ((end == null) ? (this.end != null) : !end.equals(this.end)) { |
|
87 |
this.end = end; |
|
88 |
fireStateChanged(); |
|
89 |
} |
|
90 |
} |
|
91 |
|
|
92 |
@Override |
|
93 |
public Comparable getEnd() { |
|
94 |
return end; |
|
95 |
} |
|
96 |
|
|
97 |
@Override |
|
98 |
public void setCalendarField(int calendarField) { |
|
99 |
if (!calendarFieldOK(calendarField)) { |
|
100 |
throw new IllegalArgumentException("invalid calendarField"); |
|
101 |
} |
|
102 |
if (calendarField != this.calendarField) { |
|
103 |
this.calendarField = calendarField; |
|
104 |
fireStateChanged(); |
|
105 |
} |
|
106 |
} |
|
107 |
|
|
108 |
@Override |
|
109 |
public int getCalendarField() { |
|
110 |
return calendarField; |
|
111 |
} |
|
112 |
|
|
113 |
@Override |
|
114 |
public Object getNextValue() { |
|
115 |
if( value == null ) { |
|
116 |
return null; |
|
117 |
} |
|
118 |
Calendar cal = Calendar.getInstance(); |
|
119 |
cal.setTime(value.getTime()); |
|
120 |
cal.add(calendarField, 1); |
|
121 |
Date next = cal.getTime(); |
|
122 |
return ((end == null) || (end.compareTo(next) >= 0)) ? next : null; |
|
123 |
} |
|
124 |
|
|
125 |
@Override |
|
126 |
public Object getPreviousValue() { |
|
127 |
if( value == null ) { |
|
128 |
return null; |
|
129 |
} |
|
130 |
Calendar cal = Calendar.getInstance(); |
|
131 |
cal.setTime(value.getTime()); |
|
132 |
cal.add(calendarField, -1); |
|
133 |
Date prev = cal.getTime(); |
|
134 |
return ((start == null) || (start.compareTo(prev) <= 0)) ? prev : null; |
|
135 |
} |
|
136 |
|
|
137 |
|
|
138 |
@Override |
|
139 |
public Date getDate() { |
|
140 |
if( value==null ) { |
|
141 |
return null; |
|
142 |
} |
|
143 |
return value.getTime(); |
|
144 |
} |
|
145 |
|
|
146 |
public Time getTime() { |
|
147 |
if( value==null ) { |
|
148 |
return null; |
|
149 |
} |
|
150 |
Time time = new Time(value.getTime().getTime()); |
|
151 |
return time; |
|
152 |
} |
|
153 |
|
|
154 |
@Override |
|
155 |
public Object getValue() { |
|
156 |
if( value==null ) { |
|
157 |
return null; |
|
158 |
} |
|
159 |
return value.getTime(); |
|
160 |
} |
|
161 |
|
|
162 |
@Override |
|
163 |
public void setValue(Object value) { |
|
164 |
if ( value == null) { |
|
165 |
if( this.value!=null ) { |
|
166 |
this.value = null; |
|
167 |
fireStateChanged(); |
|
168 |
} |
|
169 |
return; |
|
170 |
} |
|
171 |
if (!(value instanceof Date)) { |
|
172 |
throw new IllegalArgumentException("illegal value"); |
|
173 |
} |
|
174 |
if (this.value==null || !value.equals(this.value.getTime())) { |
|
175 |
this.value = Calendar.getInstance(); |
|
176 |
this.value.setTime((Date)value); |
|
177 |
fireStateChanged(); |
|
178 |
} |
|
179 |
} |
|
180 |
} |
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/nullablespinner/NullableNumberEditor.java | ||
---|---|---|
1 |
/* |
|
2 |
* To change this license header, choose License Headers in Project Properties. |
|
3 |
* To change this template file, choose Tools | Templates |
|
4 |
* and open the template in the editor. |
|
5 |
*/ |
|
6 |
package org.gvsig.tools.swing.impl.pickercontroller.nullablespinner; |
|
7 |
|
|
8 |
import java.text.DecimalFormat; |
|
9 |
import java.text.NumberFormat; |
|
10 |
import java.text.ParseException; |
|
11 |
import java.util.Locale; |
|
12 |
import javax.swing.JFormattedTextField; |
|
13 |
import javax.swing.JSpinner; |
|
14 |
import javax.swing.JTextField; |
|
15 |
import javax.swing.text.DefaultFormatterFactory; |
|
16 |
import javax.swing.text.NumberFormatter; |
|
17 |
|
|
18 |
/** |
|
19 |
* |
|
20 |
* @author jjdelcerro |
|
21 |
*/ |
|
22 |
public class NullableNumberEditor extends NullableEditor { |
|
23 |
|
|
24 |
private static String getDefaultPattern(Locale loc) { |
|
25 |
if (loc == null) { |
|
26 |
loc = Locale.getDefault(); |
|
27 |
} |
|
28 |
DecimalFormat nf = (DecimalFormat) NumberFormat.getInstance(loc); |
|
29 |
// return nf.toLocalizedPattern(); |
|
30 |
return nf.toPattern(); |
|
31 |
} |
|
32 |
|
|
33 |
public NullableNumberEditor(JSpinner spinner) { |
|
34 |
this(spinner, getDefaultPattern(spinner.getLocale())); |
|
35 |
} |
|
36 |
|
Also available in: Unified diff