All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.andy2003.logging.output.BusNodeFactory Maven / Gradle / Ivy

The newest version!
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.github.andy2003.logging.output;

import com.github.andy2003.core.Bus;
import java.util.List;
import org.openide.nodes.ChildFactory;
import org.openide.nodes.Node;

/**
 *
 * @author dschanoeh
 */
public class BusNodeFactory extends ChildFactory {

    List busses;
    private NotifyDelete notify;

    public BusNodeFactory(List busses, NotifyDelete notify) {
        this.busses = busses;
        this.notify = notify;
    }

    @Override
    protected boolean createKeys(List list) {
        list.addAll(busses);

        return true;
    }

    @Override
    protected Node[] createNodesForKey(Bus key) {
        BusNode node = new BusNode(key, notify);
        return new Node[] {node};
    }

    public void update() {
        refresh(true);
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy