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