001package jmri.jmrit.logixng.tools.swing;
002
003import java.util.EventListener;
004import java.util.HashMap;
005
006import jmri.NamedBean;
007
008/**
009 *
010 * @author Daniel Bergqvist copyright (c) 2019
011 * 
012 * @param <E> the type of NamedBean supported by this editor
013 */
014public interface AbstractLogixNGEditor<E extends NamedBean> {
015    
016    /**
017     * Create a custom listener event.
018     */
019    interface EditorEventListener extends EventListener {
020
021        /**
022         * An event that gets delivered from the editor
023         * @param data Contains a list of commands to be processed by the
024         *             listener recipient.
025         */
026        void editorEventOccurred(HashMap<String, String> data);
027    }
028    
029    
030    /**
031     * Add a listener.
032     *
033     * @param listener The recipient
034     */
035    void addEditorEventListener(EditorEventListener listener);
036    
037    /**
038     * Remove a listener -- not used.
039     *
040     * @param listener The recipient
041     */
042    public void removeEditorEventListener(EditorEventListener listener);
043    
044    void bringToFront();
045    
046}