OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 21 | Rev 73 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21 Rev 25
Line 16... Line 16...
16
import org.openconcerto.ui.component.text.TextComponent;
16
import org.openconcerto.ui.component.text.TextComponent;
17
import org.openconcerto.ui.valuewrapper.ValueWrapper;
17
import org.openconcerto.ui.valuewrapper.ValueWrapper;
18
import org.openconcerto.utils.checks.ValidListener;
18
import org.openconcerto.utils.checks.ValidListener;
19
import org.openconcerto.utils.checks.ValidState;
19
import org.openconcerto.utils.checks.ValidState;
20
 
20
 
-
 
21
import java.awt.Component;
21
import java.beans.PropertyChangeListener;
22
import java.beans.PropertyChangeListener;
22
import java.util.Calendar;
23
import java.util.Calendar;
23
import java.util.Date;
24
import java.util.Date;
24
 
25
 
-
 
26
import javax.swing.JButton;
25
import javax.swing.JComponent;
27
import javax.swing.JComponent;
26
import javax.swing.text.JTextComponent;
28
import javax.swing.text.JTextComponent;
27
 
29
 
28
import org.jdesktop.swingx.JXDatePicker;
30
import org.jdesktop.swingx.JXDatePicker;
29
import org.jdesktop.swingx.calendar.JXMonthView;
31
import org.jdesktop.swingx.calendar.JXMonthView;
Line 61... Line 63...
61
        this.setMonthView(monthView);
63
        this.setMonthView(monthView);
62
 
64
 
63
        this.resetValue();
65
        this.resetValue();
64
    }
66
    }
65
 
67
 
-
 
68
    @Override
-
 
69
    public void updateUI() {
-
 
70
        super.updateUI();
-
 
71
        // can't change BasicDatePickerUI behavior, so do it here
-
 
72
        for (final Component child : this.getComponents()) {
-
 
73
            if (child instanceof JButton)
-
 
74
                ((JComponent) child).setOpaque(false);
-
 
75
        }
-
 
76
    }
-
 
77
 
66
    public final void resetValue() {
78
    public final void resetValue() {
67
        if (this.fillWithCurrentDate) {
79
        if (this.fillWithCurrentDate) {
68
            this.setValue(new Date());
80
            this.setValue(new Date());
69
        } else {
81
        } else {
70
            this.setValue(null);
82
            this.setValue(null);