001package jmri.jmrit.display.layoutEditor.LayoutEditorDialogs;
002
003import javax.annotation.Nonnull;
004
005import jmri.Turnout;
006import jmri.jmrit.display.layoutEditor.LayoutEditor;
007
008/**
009 * MVC Editor component for LayoutRHTurnout objects.
010 *
011 * @author Bob Jacobsen  Copyright (c) 2020
012 * 
013 */
014public class LayoutRHTurnoutEditor extends LayoutTurnoutEditor {
015
016    /**
017     * constructor method.
018     * @param layoutEditor main layout editor.
019     */
020    public LayoutRHTurnoutEditor(@Nonnull LayoutEditor layoutEditor) {
021        super(layoutEditor);
022    }
023
024    // set the continuing route Turnout State
025    @Override
026    protected void setContinuingRouteTurnoutState() {
027        layoutTurnout.setContinuingSense(Turnout.CLOSED);
028        if (editLayoutTurnoutStateComboBox.getSelectedIndex() == editLayoutTurnoutThrownIndex) {
029            layoutTurnout.setContinuingSense(Turnout.THROWN);
030        }
031    }
032    
033
034    // private final static org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(LayoutRHTurnoutEditor.class);
035}