OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 74 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
74 ilm 1
package org.openconcerto.modules.extensionbuilder.translation.field;
2
 
3
import javax.swing.JPanel;
4
import javax.swing.JScrollPane;
5
 
6
import org.openconcerto.modules.extensionbuilder.Extension;
7
import org.openconcerto.modules.extensionbuilder.list.EditableListPanel;
8
 
9
public class AllTableListPanel extends EditableListPanel {
10
 
11
    private TableTranslationPanel tableTranslationPanel;
12
    private Extension extension;
13
 
14
    public AllTableListPanel(Extension extension, TableTranslationPanel tableTranslationPanel) {
15
        super(new AllKnownTableNameListModel(extension), "Tables", "", false, false);
16
        this.extension = extension;
17
        this.tableTranslationPanel = tableTranslationPanel;
18
    }
19
 
20
    @Override
21
    public void addNewItem() {
22
    }
23
 
24
    @Override
25
    public void renameItem(Object item) {
26
    }
27
 
28
    @Override
29
    public void removeItem(Object item) {
30
    }
31
 
32
    @Override
33
    public void itemSelected(Object item) {
34
        if (item != null) {
181 ilm 35
            this.tableTranslationPanel.setRightPanel(new JScrollPane(new TableTranslationEditorPanel(this.extension, (String) item)));
74 ilm 36
        } else {
181 ilm 37
            this.tableTranslationPanel.setRightPanel(new JPanel());
74 ilm 38
        }
39
 
40
    }
41
 
42
}