OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 156 Rev 180
Line 32... Line 32...
32
import java.util.ArrayList;
32
import java.util.ArrayList;
33
import java.util.Date;
33
import java.util.Date;
34
import java.util.List;
34
import java.util.List;
35
 
35
 
36
import javax.swing.JLabel;
36
import javax.swing.JLabel;
-
 
37
import javax.swing.JPanel;
37
import javax.swing.SwingConstants;
38
import javax.swing.SwingConstants;
38
 
39
 
39
public class ChequeFournisseurSQLElement extends ChequeSQLElement {
40
public class ChequeFournisseurSQLElement extends ChequeSQLElement {
40
 
41
 
41
    public ChequeFournisseurSQLElement() {
42
    public ChequeFournisseurSQLElement() {
Line 127... Line 128...
127
            public void addViews() {
128
            public void addViews() {
128
                this.setLayout(new GridBagLayout());
129
                this.setLayout(new GridBagLayout());
129
                final GridBagConstraints c = new DefaultGridBagConstraints();
130
                final GridBagConstraints c = new DefaultGridBagConstraints();
130
 
131
 
131
                // Montant
132
                // Montant
132
                JLabel labelMontant = new JLabel("Montant ");
133
                JLabel labelMontant = new JLabel("Montant", SwingConstants.RIGHT);
133
 
134
 
134
                this.add(labelMontant, c);
135
                this.add(labelMontant, c);
135
                c.gridx++;
136
                c.gridx++;
136
                c.weightx = 1;
137
                c.weightx = 1;
137
                this.add(this.textMontant, c);
138
                this.add(this.textMontant, c);
138
 
139
 
139
                // Date
140
                // Date
140
                JLabel labelDate = new JLabel("Date ");
141
                JLabel labelDate = new JLabel("Date", SwingConstants.RIGHT);
141
                c.weightx = 0;
142
                c.weightx = 0;
142
                c.gridx++;
143
                c.gridx++;
143
                labelDate.setHorizontalAlignment(SwingConstants.RIGHT);
144
                labelDate.setHorizontalAlignment(SwingConstants.RIGHT);
144
                this.add(labelDate, c);
145
                this.add(labelDate, c);
145
 
146
 
146
                JDate dateAchat = new JDate(true);
147
                JDate dateAchat = new JDate(true);
147
                c.gridx++;
148
                c.gridx++;
148
                c.gridwidth = GridBagConstraints.REMAINDER;
-
 
149
                this.add(dateAchat, c);
149
                this.add(dateAchat, c);
150
 
150
 
151
                c.gridy++;
151
                c.gridy++;
152
                c.gridx = 0;
152
                c.gridx = 0;
153
                JLabel labelFournisseurNom = new JLabel("Fournisseur ");
153
                JLabel labelFournisseurNom = new JLabel("Fournisseur", SwingConstants.RIGHT);
154
                this.add(labelFournisseurNom, c);
154
                this.add(labelFournisseurNom, c);
155
 
155
 
156
                final ElementComboBox nomFournisseur = new ElementComboBox();
156
                final ElementComboBox nomFournisseur = new ElementComboBox();
157
                c.gridx++;
157
                c.gridx++;
158
                c.gridwidth = GridBagConstraints.REMAINDER;
158
                c.gridwidth = 3;
159
                this.add(nomFournisseur, c);
159
                this.add(nomFournisseur, c);
160
 
160
 
-
 
161
                JPanel spacer = new JPanel();
-
 
162
                spacer.setOpaque(false);
-
 
163
                c.weighty = 1;
-
 
164
                c.gridy++;
-
 
165
                this.add(spacer, c);
-
 
166
 
161
                this.addRequiredSQLObject(nomFournisseur, "ID_FOURNISSEUR");
167
                this.addRequiredSQLObject(nomFournisseur, "ID_FOURNISSEUR");
162
                this.addRequiredSQLObject(this.textMontant, "MONTANT");
168
                this.addRequiredSQLObject(this.textMontant, "MONTANT");
163
                this.addRequiredSQLObject(dateAchat, "DATE_ACHAT");
169
                this.addRequiredSQLObject(dateAchat, "DATE_ACHAT");
164
            }
170
            }
165
        };
171
        };