OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 177 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 177 Rev 180
Line 57... Line 57...
57
import javax.swing.event.TableModelListener;
57
import javax.swing.event.TableModelListener;
58
 
58
 
59
public class ReglerMontantSQLComponent extends BaseSQLComponent {
59
public class ReglerMontantSQLComponent extends BaseSQLComponent {
60
 
60
 
61
    private RegleMontantTable table = new RegleMontantTable();
61
    private RegleMontantTable table = new RegleMontantTable();
62
    private DeviseField montant = new DeviseField(10);
62
    private DeviseField montant = new DeviseField(15);
63
    private JDate date;
63
    private JDate date;
64
    private JLabel labelWarning = new JLabelWarning();
64
    private JLabel labelWarning = new JLabelWarning();
65
    private JLabel labelWarningText = new JLabel("Le montant n'est pas valide!");
65
    private JLabel labelWarningText = new JLabel("Le montant n'est pas valide!");
66
 
66
 
67
    public ReglerMontantSQLComponent(SQLElement elt) {
67
    public ReglerMontantSQLComponent(SQLElement elt) {
68
        super(elt);
68
        super(elt);
69
    }
69
    }
70
 
70
 
-
 
71
    @Override
-
 
72
    public void select(SQLRowAccessor r) {
-
 
73
        super.select(r);
-
 
74
        if (r != null) {
-
 
75
            this.table.getRowValuesTable().insertFrom(r);
-
 
76
        }
-
 
77
    }
-
 
78
 
71
    public void addViews() {
79
    public void addViews() {
72
        this.setLayout(new GridBagLayout());
80
        this.setLayout(new GridBagLayout());
73
        final GridBagConstraints c = new DefaultGridBagConstraints();
81
        final GridBagConstraints c = new DefaultGridBagConstraints();
74
 
82
 
75
        // Echeance
83
        // Echeance
Line 113... Line 121...
113
        c.gridy++;
121
        c.gridy++;
114
        c.gridx = 0;
122
        c.gridx = 0;
115
        c.weightx = 0;
123
        c.weightx = 0;
116
        this.add(new JLabel("Montant réglé", SwingConstants.RIGHT), c);
124
        this.add(new JLabel("Montant réglé", SwingConstants.RIGHT), c);
117
        c.gridx++;
125
        c.gridx++;
118
        c.weightx = 0;
126
        c.weightx = 1;
119
        c.gridwidth = 1;
127
        c.gridwidth = 1;
120
        c.fill = GridBagConstraints.NONE;
128
        c.fill = GridBagConstraints.NONE;
-
 
129
        DefaultGridBagConstraints.lockMinimumSize(this.montant);
121
        this.add(this.montant, c);
130
        this.add(this.montant, c);
122
 
131
 
123
        // Warning
132
        // Warning
124
        c.gridx++;
133
        c.gridx++;
125
        c.gridwidth = 1;
134
        c.gridwidth = 1;