001package jmri.jmrix.marklin.swing;
002
003import jmri.jmrix.marklin.MarklinSystemConnectionMemo;
004
005/**
006 * JPanel extension to handle automatic creation of window title and help
007 * reference for Marklin panels
008 * <p>
009 * For use with JmriAbstractAction, etc
010 *
011 * @author Bob Jacobsen Copyright 2010
012 * @since 2.11.3
013 */
014public abstract class MarklinPanel extends jmri.util.swing.JmriPanel implements MarklinPanelInterface {
015
016    /**
017     * make "memo" object available as convenience
018     */
019    protected MarklinSystemConnectionMemo memo;
020
021    @Override
022    public void initComponents(MarklinSystemConnectionMemo memo) {
023        this.memo = memo;
024    }
025
026    @Override
027    public void initContext(Object context) {
028        if (context instanceof MarklinSystemConnectionMemo) {
029            initComponents((MarklinSystemConnectionMemo) context);
030        }
031    }
032
033}