OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

package org.openconcerto.modules.extensionbuilder.meu.actions;

import java.util.List;

import org.openconcerto.modules.extensionbuilder.Extension;
import org.openconcerto.ui.DefaultListModel;

public class AllKnownActionsListModel extends DefaultListModel {
    private final Extension extension;

    public AllKnownActionsListModel(Extension extension) {
        final List<ActionDescriptor> l = extension.getActionDescriptors();
        this.addAll(l);
        this.extension = extension;
    }

    public void addAction() {
        final ActionDescriptor obj = new ActionDescriptor("Action_" + this.size());
        this.addElement(obj);
        this.extension.addCreateAction(obj);

    }
}