OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 156 Rev 174
Line 20... Line 20...
20
import org.openconcerto.erp.preferences.PrinterNXProps;
20
import org.openconcerto.erp.preferences.PrinterNXProps;
21
import org.openconcerto.ql.LabelCreator;
21
import org.openconcerto.ql.LabelCreator;
22
import org.openconcerto.ql.QLPrinter;
22
import org.openconcerto.ql.QLPrinter;
23
import org.openconcerto.sql.Configuration;
23
import org.openconcerto.sql.Configuration;
24
import org.openconcerto.sql.element.SQLComponent;
24
import org.openconcerto.sql.element.SQLComponent;
-
 
25
import org.openconcerto.sql.model.FieldPath;
25
import org.openconcerto.sql.model.SQLRowAccessor;
26
import org.openconcerto.sql.model.SQLRowAccessor;
26
import org.openconcerto.sql.model.SQLRowValues;
27
import org.openconcerto.sql.model.SQLRowValues;
-
 
28
import org.openconcerto.sql.model.graph.Path;
27
import org.openconcerto.sql.preferences.SQLPreferences;
29
import org.openconcerto.sql.preferences.SQLPreferences;
28
import org.openconcerto.sql.request.ListSQLRequest;
30
import org.openconcerto.sql.request.ListSQLRequest;
-
 
31
import org.openconcerto.sql.view.list.BaseSQLTableModelColumn;
29
import org.openconcerto.sql.view.list.IListe;
32
import org.openconcerto.sql.view.list.IListe;
30
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
33
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
31
import org.openconcerto.sql.view.list.RowAction.PredicateRowAction;
34
import org.openconcerto.sql.view.list.RowAction.PredicateRowAction;
-
 
35
import org.openconcerto.sql.view.list.SQLTableModelSource;
32
import org.openconcerto.ui.EmailComposer;
36
import org.openconcerto.ui.EmailComposer;
-
 
37
import org.openconcerto.utils.CollectionUtils;
33
import org.openconcerto.utils.ExceptionHandler;
38
import org.openconcerto.utils.ExceptionHandler;
34
 
39
 
35
import java.awt.Font;
40
import java.awt.Font;
36
import java.awt.event.ActionEvent;
41
import java.awt.event.ActionEvent;
37
import java.util.ArrayList;
42
import java.util.ArrayList;
38
import java.util.Arrays;
43
import java.util.Arrays;
39
import java.util.List;
44
import java.util.List;
-
 
45
import java.util.Set;
40
 
46
 
41
import javax.swing.AbstractAction;
47
import javax.swing.AbstractAction;
42
 
48
 
43
public class ClientNormalSQLElement extends ComptaSQLConfElement {
49
public class ClientNormalSQLElement extends ComptaSQLConfElement {
44
 
50
 
Line 178... Line 184...
178
            l.add("ID_COMPTE_PCE");
184
            l.add("ID_COMPTE_PCE");
179
        }
185
        }
180
        return l;
186
        return l;
181
    }
187
    }
182
 
188
 
-
 
189
    @Override
-
 
190
    protected void _initTableSource(SQLTableModelSource res) {
-
 
191
        super._initTableSource(res);
-
 
192
 
-
 
193
        res.getColumns().add(new BaseSQLTableModelColumn(getDirectory().getTranslator().getLabelFor(getTable().getField("CATEGORIES")), String.class) {
-
 
194
 
-
 
195
            @Override
-
 
196
            protected Object show_(SQLRowAccessor r) {
-
 
197
 
-
 
198
                return r.getString("CATEGORIES");
-
 
199
            }
-
 
200
 
-
 
201
            @Override
-
 
202
            public Set<FieldPath> getPaths() {
-
 
203
                Path p = new Path(getTable());
-
 
204
                return CollectionUtils.createSet(new FieldPath(p, "CATEGORIES"));
-
 
205
 
-
 
206
            }
-
 
207
        });
-
 
208
 
-
 
209
    }
-
 
210
 
183
    /*
211
    /*
184
     * (non-Javadoc)
212
     * (non-Javadoc)
185
     * 
213
     * 
186
     * @see org.openconcerto.devis.SQLElement#getComponent()
214
     * @see org.openconcerto.devis.SQLElement#getComponent()
187
     */
215
     */