Skip to content
Permalink
Browse files

javadoc, jmrix inherit, whitespace

  • Loading branch information...
silverailscolo committed May 12, 2019
1 parent b0010e7 commit be95545d7771bf9623859bf4ad8d33339f95e9df
Showing with 903 additions and 326 deletions.
  1. +2 −1 java/src/jmri/jmrit/beantable/AddNewBeanPanel.java
  2. +1 −1 java/src/jmri/jmrit/beantable/AddNewDevicePanel.java
  3. +2 −2 java/src/jmri/jmrit/beantable/AddNewHardwareDevicePanel.java
  4. +11 −2 java/src/jmri/jmrix/AbstractConnectionConfig.java
  5. +1 −0 java/src/jmri/jmrix/AbstractMRTrafficController.java
  6. +10 −5 java/src/jmri/jmrix/AbstractNetworkConnectionConfig.java
  7. +13 −10 java/src/jmri/jmrix/AbstractSerialConnectionConfig.java
  8. +7 −3 java/src/jmri/jmrix/AbstractSimulatorConnectionConfig.java
  9. +13 −6 java/src/jmri/jmrix/AbstractStreamConnectionConfig.java
  10. +18 −9 java/src/jmri/jmrix/AbstractUsbConnectionConfig.java
  11. +2 −1 java/src/jmri/jmrix/ConnectionConfig.java
  12. +8 −1 java/src/jmri/jmrix/acela/serialdriver/ConnectionConfig.java
  13. +2 −2 java/src/jmri/jmrix/anyma/AnymaDMX_ConnectionConfig.java
  14. +6 −1 java/src/jmri/jmrix/bachrus/serialdriver/ConnectionConfig.java
  15. +2 −1 java/src/jmri/jmrix/can/Bundle.properties
  16. +3 −1 java/src/jmri/jmrix/can/Bundle_de.properties
  17. +3 −1 java/src/jmri/jmrix/can/Bundle_nl.properties
  18. +1 −1 java/src/jmri/jmrix/can/CanConfigurationManager.java
  19. +4 −0 java/src/jmri/jmrix/can/CanSystemConnectionMemo.java
  20. +3 −3 java/src/jmri/jmrix/can/ConfigurationManager.java
  21. +15 −7 java/src/jmri/jmrix/can/adapters/ConnectionConfig.java
  22. +5 −2 java/src/jmri/jmrix/can/adapters/gridconnect/can2usbino/serialdriver/ConnectionConfig.java
  23. +5 −1 java/src/jmri/jmrix/can/adapters/gridconnect/canrs/serialdriver/ConnectionConfig.java
  24. +7 −2 java/src/jmri/jmrix/can/adapters/gridconnect/canusb/serialdriver/ConnectionConfig.java
  25. +7 −2 java/src/jmri/jmrix/can/adapters/gridconnect/lccbuffer/serialdriver/ConnectionConfig.java
  26. +14 −5 java/src/jmri/jmrix/can/adapters/gridconnect/net/ConnectionConfig.java
  27. +6 −2 java/src/jmri/jmrix/can/adapters/gridconnect/net/MergConnectionConfig.java
  28. +6 −1 java/src/jmri/jmrix/can/adapters/lawicell/canusb/serialdriver/ConnectionConfig.java
  29. +1 −1 java/src/jmri/jmrix/can/adapters/loopback/Bundle.java
  30. +23 −5 java/src/jmri/jmrix/can/adapters/loopback/ConnectionConfig.java
  31. +2 −1 java/src/jmri/jmrix/can/adapters/loopback/LoopbackTrafficController.java
  32. +4 −4 java/src/jmri/jmrix/can/adapters/loopback/Port.java
  33. +2 −2 java/src/jmri/jmrix/can/adapters/loopback/configurexml/ConnectionConfigXml.java
  34. +0 −2 java/src/jmri/jmrix/can/cbus/CbusBundle.properties
  35. +4 −2 java/src/jmri/jmrix/can/cbus/CbusBundle_de.properties
  36. +5 −7 java/src/jmri/jmrix/can/cbus/CbusBundle_nl.properties
  37. +4 −3 java/src/jmri/jmrix/can/cbus/simulator/CbusDummyCS.java
  38. +3 −1 java/src/jmri/jmrix/can/cbus/simulator/CbusDummyCSSession.java
  39. +3 −2 java/src/jmri/jmrix/can/cbus/simulator/CbusDummyNode.java
  40. +4 −3 java/src/jmri/jmrix/can/cbus/simulator/CbusEventResponder.java
  41. +7 −7 java/src/jmri/jmrix/can/cbus/simulator/CbusSimulator.java
  42. +1 −1 java/src/jmri/jmrix/can/cbus/swing/simulator/SimulatorPane.java
  43. +1 −1 java/src/jmri/jmrix/can/swing/CanComponentFactory.java
  44. +1 −0 java/src/jmri/jmrix/cmri/serial/networkdriver/Bundle.java
  45. +8 −2 java/src/jmri/jmrix/cmri/serial/networkdriver/ConnectionConfig.java
  46. +9 −1 java/src/jmri/jmrix/cmri/serial/serialdriver/ConnectionConfig.java
  47. +10 −3 java/src/jmri/jmrix/cmri/serial/sim/ConnectionConfig.java
  48. +6 −1 java/src/jmri/jmrix/dcc4pc/serialdriver/ConnectionConfig.java
  49. +2 −1 java/src/jmri/jmrix/dccpp/AbstractDCCppSerialConnectionConfig.java
  50. +8 −3 java/src/jmri/jmrix/dccpp/DCCppStreamConnectionConfig.java
  51. +5 −1 java/src/jmri/jmrix/dccpp/dccppovertcp/ConnectionConfig.java
  52. +4 −2 java/src/jmri/jmrix/dccpp/network/ConnectionConfig.java
  53. +7 −2 java/src/jmri/jmrix/dccpp/serial/ConnectionConfig.java
  54. +6 −1 java/src/jmri/jmrix/dccpp/simulator/ConnectionConfig.java
  55. +6 −2 java/src/jmri/jmrix/direct/serial/ConnectionConfig.java
  56. +6 −2 java/src/jmri/jmrix/direct/simulator/ConnectionConfig.java
  57. +5 −1 java/src/jmri/jmrix/easydcc/networkdriver/ConnectionConfig.java
  58. +5 −1 java/src/jmri/jmrix/easydcc/serialdriver/ConnectionConfig.java
  59. +7 −3 java/src/jmri/jmrix/easydcc/simulator/ConnectionConfig.java
  60. +1 −1 java/src/jmri/jmrix/easydcc/simulator/SimulatorAdapter.java
  61. +5 −1 java/src/jmri/jmrix/ecos/networkdriver/ConnectionConfig.java
  62. +8 −1 java/src/jmri/jmrix/grapevine/serialdriver/ConnectionConfig.java
  63. +8 −1 java/src/jmri/jmrix/grapevine/simulator/ConnectionConfig.java
  64. +5 −1 java/src/jmri/jmrix/ieee802154/serialdriver/ConnectionConfig.java
  65. +5 −1 java/src/jmri/jmrix/ieee802154/xbee/ConnectionConfig.java
  66. +5 −1 java/src/jmri/jmrix/internal/ConnectionConfig.java
  67. +5 −1 java/src/jmri/jmrix/jmriclient/networkdriver/ConnectionConfig.java
  68. +2 −1 java/src/jmri/jmrix/lenz/AbstractXNetSerialConnectionConfig.java
  69. +5 −1 java/src/jmri/jmrix/lenz/XNetStreamConnectionConfig.java
  70. +6 −2 java/src/jmri/jmrix/lenz/hornbyelite/ConnectionConfig.java
  71. +5 −1 java/src/jmri/jmrix/lenz/li100/ConnectionConfig.java
  72. +7 −3 java/src/jmri/jmrix/lenz/li100f/ConnectionConfig.java
  73. +7 −3 java/src/jmri/jmrix/lenz/li101/ConnectionConfig.java
  74. +8 −3 java/src/jmri/jmrix/lenz/liusb/ConnectionConfig.java
  75. +7 −4 java/src/jmri/jmrix/lenz/liusbethernet/ConnectionConfig.java
  76. +6 −3 java/src/jmri/jmrix/lenz/liusbserver/ConnectionConfig.java
  77. +7 −3 java/src/jmri/jmrix/lenz/xnetsimulator/ConnectionConfig.java
  78. +11 −9 java/src/jmri/jmrix/lenz/xntcp/ConnectionConfig.java
  79. +8 −3 java/src/jmri/jmrix/lenz/ztc640/ConnectionConfig.java
  80. +6 −2 java/src/jmri/jmrix/loconet/Intellibox/ConnectionConfig.java
  81. +6 −1 java/src/jmri/jmrix/loconet/bluetooth/ConnectionConfig.java
  82. +3 −0 java/src/jmri/jmrix/loconet/hexfile/ConnectionConfig.java
  83. +2 −1 java/src/jmri/jmrix/loconet/locobuffer/ConnectionConfig.java
  84. +2 −1 java/src/jmri/jmrix/loconet/locobufferii/ConnectionConfig.java
  85. +2 −1 java/src/jmri/jmrix/loconet/locobufferusb/ConnectionConfig.java
  86. +2 −1 java/src/jmri/jmrix/loconet/loconetovertcp/ConnectionConfig.java
  87. +8 −1 java/src/jmri/jmrix/loconet/locormi/ConnectionConfig.java
  88. +9 −3 java/src/jmri/jmrix/loconet/ms100/ConnectionConfig.java
  89. +7 −2 java/src/jmri/jmrix/loconet/pr2/ConnectionConfig.java
  90. +6 −1 java/src/jmri/jmrix/loconet/pr3/ConnectionConfig.java
  91. +7 −2 java/src/jmri/jmrix/loconet/pr4/ConnectionConfig.java
  92. +7 −3 java/src/jmri/jmrix/loconet/streamport/LnStreamConnectionConfig.java
  93. +2 −1 java/src/jmri/jmrix/loconet/uhlenbrock/ConnectionConfig.java
  94. +2 −1 java/src/jmri/jmrix/loconet/usb_dcs240/ConnectionConfig.java
  95. +7 −1 java/src/jmri/jmrix/loconet/usb_dcs52/ConnectionConfig.java
  96. +8 −1 java/src/jmri/jmrix/maple/serialdriver/ConnectionConfig.java
  97. +9 −2 java/src/jmri/jmrix/maple/simulator/ConnectionConfig.java
  98. +5 −1 java/src/jmri/jmrix/marklin/networkdriver/ConnectionConfig.java
  99. +6 −0 java/src/jmri/jmrix/mqtt/MqttConnectionConfig.java
  100. +8 −3 java/src/jmri/jmrix/mrc/serialdriver/ConnectionConfig.java
  101. +9 −2 java/src/jmri/jmrix/mrc/simulator/ConnectionConfig.java
  102. +5 −0 java/src/jmri/jmrix/nce/networkdriver/ConnectionConfig.java
  103. +3 −0 java/src/jmri/jmrix/nce/serialdriver/ConnectionConfig.java
  104. +9 −9 java/src/jmri/jmrix/nce/simulator/ConnectionConfig.java
  105. +17 −20 java/src/jmri/jmrix/nce/simulator/SimulatorAdapter.java
  106. +4 −0 java/src/jmri/jmrix/nce/usbdriver/ConnectionConfig.java
  107. +9 −2 java/src/jmri/jmrix/oaktree/serialdriver/ConnectionConfig.java
  108. +7 −2 java/src/jmri/jmrix/oaktree/simulator/ConnectionConfig.java
  109. +12 −4 java/src/jmri/jmrix/pi/RaspberryPiConnectionConfig.java
  110. +10 −2 java/src/jmri/jmrix/powerline/cm11/ConnectionConfig.java
  111. +10 −2 java/src/jmri/jmrix/powerline/cp290/ConnectionConfig.java
  112. +10 −2 java/src/jmri/jmrix/powerline/insteon2412s/ConnectionConfig.java
  113. +9 −2 java/src/jmri/jmrix/powerline/serialdriver/ConnectionConfig.java
  114. +9 −2 java/src/jmri/jmrix/powerline/simulator/ConnectionConfig.java
  115. +8 −3 java/src/jmri/jmrix/qsi/serialdriver/ConnectionConfig.java
  116. +10 −3 java/src/jmri/jmrix/rfid/RfidStreamConnectionConfig.java
  117. +6 −0 java/src/jmri/jmrix/rfid/networkdriver/ConnectionConfig.java
  118. +8 −1 java/src/jmri/jmrix/rfid/serialdriver/ConnectionConfig.java
  119. +7 −4 java/src/jmri/jmrix/roco/z21/ConnectionConfig.java
  120. +6 −2 java/src/jmri/jmrix/roco/z21/Z21XNetConnectionConfig.java
  121. +16 −9 java/src/jmri/jmrix/roco/z21/simulator/Z21SimulatorConnectionConfig.java
  122. +5 −1 java/src/jmri/jmrix/rps/serial/ConnectionConfig.java
  123. +8 −1 java/src/jmri/jmrix/secsi/serialdriver/ConnectionConfig.java
  124. +9 −2 java/src/jmri/jmrix/secsi/simulator/ConnectionConfig.java
  125. +7 −3 java/src/jmri/jmrix/sprog/SprogCSStreamConnectionConfig.java
  126. +7 −2 java/src/jmri/jmrix/sprog/pi/pisprognano/ConnectionConfig.java
  127. +6 −2 java/src/jmri/jmrix/sprog/pi/pisprogone/ConnectionConfig.java
  128. +7 −2 java/src/jmri/jmrix/sprog/pi/pisprogonecs/ConnectionConfig.java
  129. +6 −2 java/src/jmri/jmrix/sprog/serialdriver/ConnectionConfig.java
  130. +6 −2 java/src/jmri/jmrix/sprog/simulator/ConnectionConfig.java
  131. +7 −2 java/src/jmri/jmrix/sprog/sprog/ConnectionConfig.java
  132. +7 −2 java/src/jmri/jmrix/sprog/sprogCS/ConnectionConfig.java
  133. +7 −4 java/src/jmri/jmrix/sprog/sprognano/ConnectionConfig.java
  134. +5 −1 java/src/jmri/jmrix/srcp/networkdriver/ConnectionConfig.java
  135. +5 −1 java/src/jmri/jmrix/tams/serialdriver/ConnectionConfig.java
  136. +9 −1 java/src/jmri/jmrix/tams/simulator/ConnectionConfig.java
  137. +5 −1 java/src/jmri/jmrix/tmcc/serialdriver/ConnectionConfig.java
  138. +5 −1 java/src/jmri/jmrix/tmcc/simulator/ConnectionConfig.java
  139. +6 −1 java/src/jmri/jmrix/wangrow/serialdriver/ConnectionConfig.java
  140. +6 −1 java/src/jmri/jmrix/xpa/serialdriver/ConnectionConfig.java
  141. +12 −5 java/src/jmri/jmrix/zimo/mx1/ConnectionConfig.java
  142. +8 −3 java/src/jmri/jmrix/zimo/mxulf/ConnectionConfig.java
  143. +5 −1 java/src/jmri/jmrix/ztc/ztc611/ConnectionConfig.java
@@ -16,7 +16,7 @@
import javax.swing.JTextField;

/**
* JPanel to create a new JMRI devices HiJacked to serve other beantable tables.
* JPanel to create a new JMRI devices (used to add Memory, Block).
*
* @author Bob Jacobsen Copyright (C) 2009
* @author Pete Cressman Copyright (C) 2010
@@ -159,4 +159,5 @@ private void rangeState() {
JCheckBox _range;
JCheckBox _autoSys;
JLabel finishLabel = new JLabel(Bundle.getMessage("LabelNumberToAdd"));

}
@@ -13,7 +13,7 @@
import javax.swing.JTextField;

/**
* JPanel to create a new JMRI devices HiJacked to serve other beantable tables.
* JPanel to create a new JMRI devices (used to add IdTag).
*
* @author Bob Jacobsen Copyright (C) 2009
* @author Pete Cressman Copyright (C) 2010
@@ -15,7 +15,7 @@
import javax.swing.JTextField;

/**
* JPanel to create a new JMRI devices HiJacked to serve other beantable tables.
* JPanel to create a new JMRI hardware devices (used to add Turnout, Sensor, Reporter).
*
* @author Bob Jacobsen Copyright (C) 2009
* @author Pete Cressman Copyright (C) 2010
@@ -51,7 +51,7 @@ public AddNewHardwareDevicePanel(JTextField sysAddress, JTextField userName, JCo
c.gridy = 1;
c.anchor = java.awt.GridBagConstraints.WEST;
c.weightx = 1.0;
c.fill = java.awt.GridBagConstraints.HORIZONTAL; // text field will expand
c.fill = java.awt.GridBagConstraints.HORIZONTAL; // text field will expand
c.gridy = 0;
p.add(prefixBox, c);
c.gridx = 3;
@@ -82,6 +82,15 @@ public Object stringToValue(String text) throws java.text.ParseException {
}
}

/**
* Complete connection adapter initialization, adding desired options to the
* Connection Configuration pane. Required action: set init to true.
* Optional actions:
* <ul>
* <li>fill in connectionNameField</li>
* <li>add ActionListeners to config fields eg. systemPrefixField to update adapter after change by the user</li>
* </ul>
*/
abstract protected void checkInitDone();

abstract public void updateAdapter();
@@ -175,7 +184,7 @@ public String getItem() {

/**
* Load the adapter with an appropriate object
* <i>unless</I> it's already been set.
* <i>unless</i> it's already been set.
*/
abstract protected void setInstance();

@@ -191,7 +200,7 @@ public String getItem() {
* JPanel contents need to handle their own gets/sets to the underlying
* Connection content.
*
* @param details The specific Swing object to be configured and filled.
* @param details the specific Swing object to be configured and filled
*/
@Override
abstract public void loadDetails(final JPanel details);
@@ -122,6 +122,7 @@ public AbstractMRTrafficController() {
protected void setSynchronizeRx(boolean val) {
synchronizeRx = val;
}

protected boolean getSynchronizeRx() {
return synchronizeRx;
}
@@ -42,14 +42,17 @@ public AbstractNetworkConnectionConfig(NetworkPortAdapter p) {
}

/**
* Create a connection configuration without a preexisting adapter. Expect
* that the subclass setInstance() will fill the adapter member.
* Ctor for a functional object with no preexisting adapter. Expect that the
* subclass setInstance() will fill the adapter member.
*/
public AbstractNetworkConnectionConfig() {
}

protected boolean init = false;

/**
* {@inheritDoc}
*/
@Override
protected void checkInitDone() {
log.debug("init called for {}", name());
@@ -264,8 +267,7 @@ public NetworkPortAdapter getAdapter() {
}

/**
* Load the adapter with an appropriate object
* <i>unless</I> its already been set.
* {@inheritDoc}
*/
@Override
abstract protected void setInstance();
@@ -284,7 +286,10 @@ protected void checkOptionValueValidity(String i, JComboBox<String> opt) {
adapter.setOptionState(i, (String) opt.getSelectedItem());
}
}


/**
* {@inheritDoc}
*/
@Override
public void loadDetails(final JPanel details) {
_details = details;
@@ -50,11 +50,6 @@ public AbstractSerialConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
addToActionList();
}

@Override
public jmri.jmrix.SerialPortAdapter getAdapter() {
return adapter;
}

/**
* Ctor for a functional object with no preexisting adapter. Expect that the
* subclass setInstance() will fill the adapter member.
@@ -64,13 +59,19 @@ public AbstractSerialConnectionConfig() {
addToActionList();
}

@Override
public jmri.jmrix.SerialPortAdapter getAdapter() {
return adapter;
}

protected boolean init = false;

/**
* {@inheritDoc}
*/
@Override
protected void checkInitDone() {
if (log.isDebugEnabled()) {
log.debug("init called for {}", name());
}
log.debug("init called for {}", name());
if (init) {
return;
}
@@ -178,8 +179,7 @@ public void updateAdapter() {
protected jmri.jmrix.SerialPortAdapter adapter = null;

/**
* Load the adapter with an appropriate object
* <i>unless</I> its already been set.
* {@inheritDoc}
*/
@Override
abstract protected void setInstance();
@@ -292,6 +292,9 @@ public void refreshPortBox() {

String value;

/**
* {@inheritDoc}
*/
@Override
@SuppressWarnings("UseOfObsoleteCollectionType")
public void loadDetails(final JPanel details) {
@@ -54,13 +54,15 @@ public AbstractSimulatorConnectionConfig() {

protected boolean init = false;

/**
* {@inheritDoc}
*/
@Override
protected void checkInitDone() {
log.debug("init called for ()", name());
if (init) {
return;
}

if (adapter.getSystemConnectionMemo() != null) {
systemPrefixField.addActionListener(new ActionListener() {
@Override
@@ -138,8 +140,7 @@ public void updateAdapter() {
protected jmri.jmrix.SerialPortAdapter adapter = null;

/**
* Load the adapter with an appropriate object
* <i>unless</I> it's already been set.
* {@inheritDoc}
*/
@Override
abstract protected void setInstance();
@@ -156,6 +157,9 @@ public String getInfo() {
return Bundle.getMessage("none");
}

/**
* {@inheritDoc}
*/
@Override
public void loadDetails(final JPanel details) {
_details = details;
@@ -36,20 +36,24 @@ public AbstractStreamConnectionConfig(jmri.jmrix.AbstractStreamPortController p)
adapter = p;
}

@Override
public jmri.jmrix.AbstractStreamPortController getAdapter() {
return adapter;
}

/**
* Ctor for a functional object with no preexisting adapter.
* Ctor for a functional object with no preexisting adapter. Expect that the
* subclass setInstance() will fill the adapter member.
*/
public AbstractStreamConnectionConfig() {
adapter = null;
}

@Override
public jmri.jmrix.AbstractStreamPortController getAdapter() {
return adapter;
}

protected boolean init = false;

/**
* {@inheritDoc}
*/
@Override
protected void checkInitDone() {
log.debug("init called for {}", name());
@@ -144,6 +148,9 @@ public String getInfo() {
return Bundle.getMessage("none");
}

/**
* {@inheritDoc}
*/
@Override
public void loadDetails(final JPanel details) {
_details = details;
@@ -32,6 +32,20 @@
* @author George Warner Copyright (c) 2017-2018
*/
abstract public class AbstractUsbConnectionConfig extends AbstractConnectionConfig {

/**
* Create a connection configuration with a preexisting adapter. This is
* used principally when loading a configuration that defines this
* connection.
*
* @param p the adapter to create a connection configuration for
*/
public AbstractUsbConnectionConfig(UsbPortAdapter p) {
adapter = p;
//addToActionList();
log.debug("* AbstractUSBConnectionConfig({})", p);
}

/**
* Ctor for a functional object with no preexisting adapter. Expect that the
* subclass setInstance() will fill the adapter member.
@@ -41,12 +55,6 @@ public AbstractUsbConnectionConfig() {
log.debug("* AbstractUSBConnectionConfig()");
}

public AbstractUsbConnectionConfig(UsbPortAdapter p) {
adapter = p;
//addToActionList();
log.debug("* AbstractUSBConnectionConfig({})", p);
}

protected UsbPortAdapter adapter = null;

@Override
@@ -57,11 +65,12 @@ public UsbPortAdapter getAdapter() {

protected boolean init = false;

/**
* {@inheritDoc}
*/
@Override
protected void checkInitDone() {
if (log.isDebugEnabled()) {
log.debug("init called for " + name());
}
log.debug("init called for {}", name());
if (!init) {
if (adapter.getSystemConnectionMemo() != null) {
systemPrefixField.addActionListener(new ActionListener() {
@@ -34,7 +34,8 @@
* content specific to this Connection type.
* The JPanel contents need to handle their own
* gets/sets to the underlying Connection content.
* @param details The specific Swing object to be configured and filled.
*
* @param details the specific Swing object to be configured and filled
*/
public void loadDetails(JPanel details);

@@ -26,14 +26,18 @@ public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
}

/**
* Create a connection configuration without a preexisting adapter.
* Ctor for a connection configuration with no preexisting adapter.
* {@link setInstance()} will fill the adapter member.
*/
public ConnectionConfig() {
super();
}

JButton b = new JButton(Bundle.getMessage("ConfigNodesTitle"));

/**
* {@inheritDoc}
*/
@Override
public void loadDetails(JPanel details) {
// have to embed the usual one in a new JPanel
@@ -52,6 +56,9 @@ public String name() {
return "Acela";
}

/**
* {@inheritDoc}
*/
@Override
protected void setInstance() {
if (adapter == null) {
@@ -30,7 +30,8 @@ public AnymaDMX_ConnectionConfig(AnymaDMX_UsbPortAdapter p) {
}

/**
* Ctor for a functional Swing object with no preexisting adapter
* Ctor for a connection configuration with no preexisting adapter.
* {@link setInstance()} will fill the adapter member.
*/
public AnymaDMX_ConnectionConfig() {
this(new AnymaDMX_UsbPortAdapter());
@@ -54,7 +55,6 @@ public void updateAdapter() {
*/
@Override
protected void setInstance() {
log.debug("* setInstance()");
if (adapter == null) {
adapter = new AnymaDMX_UsbPortAdapter();
}
@@ -23,7 +23,8 @@ public ConnectionConfig(jmri.jmrix.SerialPortAdapter p) {
}

/**
* Create a connection configuration without a preexisting adapter.
* Ctor for a connection configuration with no preexisting adapter.
* {@link setInstance()} will fill the adapter member.
*/
public ConnectionConfig() {
super();
@@ -42,10 +43,14 @@ public String name() {
return new String[]{};
}

/**
* {@inheritDoc}
*/
@Override
protected void setInstance() {
if (adapter == null) {
adapter = new SerialDriverAdapter();
}
}

}

0 comments on commit be95545

Please sign in to comment.
You can’t perform that action at this time.