001package jmri.jmrix.dccpp.swing.virtuallcd;
002
003import java.awt.Dimension;
004import java.util.Set;
005
006import javax.annotation.CheckForNull;
007
008import jmri.jmrix.dccpp.DCCppSystemConnectionMemo;
009
010/**
011 * Configuration for a VirtualLCD display.
012 *
013 * @author Daniel Bergqvist (C) 2026
014 */
015public interface VirtualLCDConfiguration {
016
017    enum DisplayConfig {
018        ConfigureVirtualLCD_AllDisplays("ConfigureVirtualLCD_AllDisplays"),
019        ConfigureVirtualLCD_OneDisplay("ConfigureVirtualLCD_OneDisplay"),
020        ConfigureVirtualLCD_IntervalDisplay("ConfigureVirtualLCD_IntervalDisplay"),
021        ConfigureVirtualLCD_SelectedDisplays("ConfigureVirtualLCD_SelectedDisplays");
022
023        private final String descr;
024
025        private DisplayConfig(String property) {
026            this.descr = Bundle.getMessage(property);
027        }
028
029        @Override
030        public String toString() {
031            return descr;
032        }
033    }
034
035    void setMemo(DCCppSystemConnectionMemo memo);
036
037    DCCppSystemConnectionMemo getMemo();
038
039    public boolean isMemoEditable();
040
041    void setDisplayConfig(DisplayConfig displayConfig);
042
043    DisplayConfig getDisplayConfig();
044
045    void setDisplayNo(int displayNo);
046
047    int getDisplayNo();
048
049    void setMinDisplayNo(int displayNo);
050
051    int getMinDisplayNo();
052
053    void setMaxDisplayNo(int displayNo);
054
055    int getMaxDisplayNo();
056
057    void setSelectedDisplays(Set<Integer> selectedDisplays);
058
059    Set<Integer> getSelectedDisplays();
060
061    /**
062     * Set the size of the LCD display.
063     * @param d the size or null if dynamic size
064     */
065    void setLCDSize(@CheckForNull Dimension d);
066
067    /**
068     * Get the size of the LCD display.
069     * @return the size or null if dynamic size
070     */
071    @CheckForNull
072    Dimension getLCDSize();
073
074}