001package jmri.jmrix.can.cbus.swing.modules; 002 003 004import javax.annotation.Nonnull; 005 006import jmri.jmrix.can.cbus.node.CbusNode; 007import jmri.jmrix.can.cbus.node.CbusNodeNVTableDataModel; 008 009import org.openide.util.lookup.ServiceProvider; 010 011/** 012 * Returns configuration objects for an unknown module 013 * 014 * @author Andrew Crosland Copyright (C) 2021 015 */ 016@ServiceProvider(service = CbusConfigPaneProvider.class) 017public class UnknownPaneProvider extends CbusConfigPaneProvider { 018 019 String type = Bundle.getMessage("Unknown"); 020 021 public UnknownPaneProvider() { 022 super(); 023 } 024 025 /** {@inheritDoc} */ 026 @Override 027 @Nonnull 028 public String getModuleType() { 029 return type; 030 } 031 032 /** {@inheritDoc} */ 033 @Override 034 public String getNVNameByIndex(int index) { 035 return Bundle.getMessage("UnknownNv"); 036 } 037 038 /** {@inheritDoc} */ 039 @Override 040 public AbstractEditNVPane getEditNVFrameInstance() { 041 return _nVarEditFrame; 042 } 043 044 /** {@inheritDoc} */ 045 @Override 046 public AbstractEditNVPane getEditNVFrame(CbusNodeNVTableDataModel dataModel, CbusNode node) { 047 if (_nVarEditFrame == null ){ 048 _nVarEditFrame = new UnknownEditNVPane(dataModel, node); 049 } 050 return _nVarEditFrame.getContent(); 051 } 052}