Je doit modifier se code de Ireport en java, pour ajouter un nouveau type de connexion a une base de donnée, seulement je ne comprend pas le code.
Je sais que c'est cette partie qu'il faut modifier, c'est deja bien llo
Il y a surement plein de variable et de command dont j'ignore l'existance,
Merci de votre aide

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
public void initAll(boolean isNewDatasource)
    {
        initComponents();
        if (isNewDatasource)
        {
            this.setStep(0);
            DefaultListModel dlm = new DefaultListModel();
            List types = MainFrame.getMainInstance().getConnectionImplementations();
            for (int i=0; i<types.size(); ++i)
            {
                String cName = "" + types.get(i);
 
                try {
                    IReportConnection c = (IReportConnection)Class.forName(cName,true, MainFrame.getMainInstance().getReportClassLoader()).newInstance();
                    String sName = c.getDescription(); 
                            //(String)c.getMethod("getConnectionTypeName",new Class[]{}).invoke(null, new Object[]{});
                    dlm.addElement(new Tag(c, sName));
 
                } catch (Throwable tw)
                {
                    tw.printStackTrace();
                }
            }
            jList1.setModel(dlm);
            this.jButtonSave.setEnabled(false);
            if (jList1.getModel().getSize() > 0)
            {
                jList1.setSelectedIndex(0);
            }
        }
 
 
        javax.swing.KeyStroke escape =  javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0, false);
        javax.swing.Action escapeAction = new javax.swing.AbstractAction() {