Class ConfigPaneHelper


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void maybeAddOpenLCBProtocolOptionsButton​(AbstractConnectionConfig connection, java.util.Collection<javax.swing.JComponent> additionalItems)
      Adds a button to the connection config setup panel that opens the openLCB protocol options.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • maybeAddOpenLCBProtocolOptionsButton

        public static void maybeAddOpenLCBProtocolOptionsButton​(AbstractConnectionConfig connection,
                                                                java.util.Collection<javax.swing.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.