OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 74 Rev 181
Line 21... Line 21...
21
        this.tableInfoPanel = tableInfoPanel;
21
        this.tableInfoPanel = tableInfoPanel;
22
    }
22
    }
23
 
23
 
24
    @Override
24
    @Override
25
    public void addNewItem() {
25
    public void addNewItem() {
26
        ((CreateTableListModel) dataModel).addNewTable();
26
        ((CreateTableListModel) this.dataModel).addNewTable();
27
    }
27
    }
28
 
28
 
29
    @Override
29
    @Override
30
    public void renameItem(Object item) {
30
    public void renameItem(Object item) {
31
        final TableDescritor e = (TableDescritor) item;
31
        final TableDescritor e = (TableDescritor) item;
32
        final Window w = SwingUtilities.windowForComponent(this);
32
        final Window w = SwingUtilities.windowForComponent(this);
33
        final String s = (String) JOptionPane.showInputDialog(w, "Nouveau nom", "Renommer la liste", JOptionPane.PLAIN_MESSAGE, null, null, e.getName());
33
        final String s = (String) JOptionPane.showInputDialog(w, "Nouveau nom", "Renommer la table", JOptionPane.PLAIN_MESSAGE, null, null, e.getName());
34
        if ((s != null) && (s.length() > 0)) {
34
        if ((s != null) && (s.length() > 0)) {
35
            e.setName(s);
35
            e.setName(s);
36
        }
36
        }
37
    }
37
    }
38
 
38
 
39
    @Override
39
    @Override
40
    public void removeItem(Object item) {
40
    public void removeItem(Object item) {
41
        ((CreateTableListModel) dataModel).removeElement(item);
41
        ((CreateTableListModel) this.dataModel).removeElement(item);
42
        extension.removeCreateTable((TableDescritor) item);
42
        this.extension.removeCreateTable((TableDescritor) item);
43
    }
43
    }
44
 
44
 
45
    @Override
45
    @Override
46
    public void itemSelected(Object item) {
46
    public void itemSelected(Object item) {
47
        if (item != null) {
47
        if (item != null) {
48
            TableDescritor n = (TableDescritor) item;
48
            TableDescritor n = (TableDescritor) item;
49
            System.out.println("TableListPanel..valueChanged():" + n);
49
            System.out.println("TableListPanel..valueChanged():" + n);
50
            final TableCreatePanel p = new TableCreatePanel(n, extension);
50
            final TableCreatePanel p = new TableCreatePanel(n, this.extension);
51
            tableInfoPanel.setRightPanel(new JScrollPane(p));
51
            this.tableInfoPanel.setRightPanel(new JScrollPane(p));
52
        } else {
52
        } else {
53
            tableInfoPanel.setRightPanel(new JPanel());
53
            this.tableInfoPanel.setRightPanel(new JPanel());
54
        }
54
        }
55
    }
55
    }
56
}
56
}