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

org.protege.editor.owl.ui.library.NewEntryPanel Maven / Gradle / Ivy

Go to download

OWL ontology editing infrastructure used by the Protege desktop application.

There is a newer version: 5.6.4-beta3
Show newest version
package org.protege.editor.owl.ui.library;

import org.protege.xmlcatalog.entry.Entry;

import javax.swing.*;
import java.util.ArrayList;
import java.util.List;

public abstract class NewEntryPanel extends JPanel {
	private static final long serialVersionUID = -706694344158933046L;
	
	private List listeners = new ArrayList<>();

	public abstract Entry getEntry();
	
	public void addListener(Runnable r) {
		listeners.add(r);
	}
	
	public void removeListener(Runnable r) {
	    listeners.remove(r);
	}
	
	public void clearListeners() {
		listeners.clear();
	}
	
	protected void fireListeners() {
		for (Runnable r : listeners) {
			r.run();
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy