001package jmri.jmrit.display.logixng;
002
003import java.util.AbstractMap;
004import java.util.Map;
005import java.util.Set;
006
007import jmri.jmrit.logixng.Category;
008import jmri.jmrit.logixng.DigitalActionFactory;
009import jmri.jmrit.logixng.DigitalActionBean;
010
011import org.openide.util.lookup.ServiceProvider;
012
013/**
014 * The factory for LogixNG Display classes.
015 *
016 * @author Daniel Bergqvist Copyright 2021
017 */
018@ServiceProvider(service = DigitalActionFactory.class)
019public class ActionFactory implements DigitalActionFactory {
020
021    @Override
022    public void init() {
023        CategoryDisplay.registerCategory();
024    }
025
026    @Override
027    public Set<Map.Entry<Category, Class<? extends DigitalActionBean>>> getActionClasses() {
028        Set<Map.Entry<Category, Class<? extends DigitalActionBean>>> actionClasses =
029                Set.of(
030                        new AbstractMap.SimpleEntry<>(CategoryDisplay.DISPLAY, ActionAudioIcon.class),
031                        new AbstractMap.SimpleEntry<>(CategoryDisplay.DISPLAY, ActionLayoutTurnout.class),
032                        new AbstractMap.SimpleEntry<>(CategoryDisplay.DISPLAY, ActionPositionable.class),
033                        new AbstractMap.SimpleEntry<>(CategoryDisplay.DISPLAY, ActionPositionableByClass.class),
034                        new AbstractMap.SimpleEntry<>(CategoryDisplay.DISPLAY, WindowManagement.class)
035                );
036
037        return actionClasses;
038    }
039
040}