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.meu.actions;
2
 
3
import java.util.List;
4
 
5
import org.openconcerto.modules.extensionbuilder.Extension;
6
import org.openconcerto.ui.DefaultListModel;
7
 
8
public class AllKnownActionsListModel extends DefaultListModel {
181 ilm 9
    private final Extension extension;
74 ilm 10
 
181 ilm 11
    public AllKnownActionsListModel(Extension extension) {
12
        final List<ActionDescriptor> l = extension.getActionDescriptors();
74 ilm 13
        this.addAll(l);
181 ilm 14
        this.extension = extension;
74 ilm 15
    }
181 ilm 16
 
17
    public void addAction() {
18
        final ActionDescriptor obj = new ActionDescriptor("Action_" + this.size());
19
        this.addElement(obj);
20
        this.extension.addCreateAction(obj);
21
 
22
    }
74 ilm 23
}