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.action;
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
import org.openconcerto.modules.extensionbuilder.translation.menu.MenuTranslationItemEditor;
9
import org.openconcerto.ui.group.Item;
10
 
11
public class ActionListPanel extends EditableListPanel {
12
 
13
    private ActionTranslationPanel tableTranslationPanel;
14
    private Extension extension;
15
 
16
    public ActionListPanel(Extension extension, ActionTranslationPanel tableTranslationPanel) {
17
        super(new AllKnownActionsListModel(extension), "Actions", "", false, false);
18
        this.extension = extension;
19
        this.tableTranslationPanel = tableTranslationPanel;
20
 
21
    }
22
 
23
    @Override
24
    public void addNewItem() {
25
    }
26
 
27
    @Override
28
    public void renameItem(Object item) {
29
 
30
    }
31
 
32
    @Override
33
    public void removeItem(Object item) {
34
    }
35
 
36
    @Override
37
    public void itemSelected(Object item) {
38
        if (item != null) {
181 ilm 39
            this.tableTranslationPanel.setRightPanel(new JScrollPane(new MenuTranslationItemEditor(new Item(item.toString()), this.extension)));
74 ilm 40
        } else {
181 ilm 41
            this.tableTranslationPanel.setRightPanel(new JPanel());
74 ilm 42
        }
43
 
44
    }
45
 
46
}