Class ConfigPaneHelper

java.lang.Object
jmri.jmrix.openlcb.swing.protocoloptions.ConfigPaneHelper

public class ConfigPaneHelper extends Object
Helper class for implementing OpenLCB compatible port adapters. Common code for those adapters is factored out into functions in this class.
  • Constructor Details

  • Method Details

    • maybeAddOpenLCBProtocolOptionsButton

      public static void maybeAddOpenLCBProtocolOptionsButton(AbstractConnectionConfig connection, Collection<JComponent> additionalItems)
      Adds a button to the connection config setup panel that opens the openLCB protocol options. Does nothing if the adapter is not being used in OpenLCB mode. Helper function in the ConnectionConfig.loadDetails() function for OpenLCB compatible adapter configs. The loadDetails() function needs to be overridden with the following code: public void loadDetails(JPanel details) { setInstance(); ConfigPaneHelper.maybeAddOpenLCBProtocolOptionsButton(this, additionalItems); super.loadDetails(details); }
      Parameters:
      connection - the ConnectionConfig for the particular adapter calling.
      additionalItems - reference to the inherited additionalItems list from the AbstractConnectionConfig. The helper funciton will modify it in place.