Package jmri.jmrix.bidib.netbidib
Class ConnectionConfig
- java.lang.Object
-
- jmri.jmrix.AbstractConnectionConfig
-
- jmri.jmrix.AbstractNetworkConnectionConfig
-
- jmri.jmrix.bidib.netbidib.ConnectionConfig
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.util.EventListener,ConnectionConfig
public class ConnectionConfig extends AbstractNetworkConnectionConfig implements java.awt.event.ActionListener
Definition of objects to handle configuring a netBiDiB layout connection via a NetBiDiBAdapter object.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.jmrix.AbstractConnectionConfig
AbstractConnectionConfig.Option
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAME-
Fields inherited from class jmri.jmrix.AbstractNetworkConnectionConfig
adapter, adNameField, adNameFieldLabel, hostNameField, hostNameFieldLabel, init, intervalSpinner, outputIntervalLabel, outputIntervalReset, outputIntervalSpinner, portField, portFieldLabel, serviceTypeField, serviceTypeFieldLabel, showAutoConfig
-
Fields inherited from class jmri.jmrix.AbstractConnectionConfig
_details, additionalItems, cL, connectionNameField, connectionNameLabel, cR, gbLayout, NUMOPTIONS, options, showAdvanced, systemPrefixField, systemPrefixLabel
-
-
Constructor Summary
Constructors Constructor Description ConnectionConfig()Ctor for an object being created during load process; Swing init is deferred.ConnectionConfig(NetworkPortAdapter p)Ctor for a connection configuration with no preexisting adapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(java.awt.event.ActionEvent e)connection changed action eventintaddStandardDetails(PortAdapter adapter, boolean incAdvanced, int i)voiddispose()Done with this ConnectionConfig object.booleanisAutoConfigPossible()booleanisHostNameAdvanced()voidloadDetails(javax.swing.JPanel details)Load the Swing widgets needed to configure this connection into a specified JPanel.java.lang.Stringname()voidsetAutoNetworkConfig()Actions to be done if network autoconfig has changed.protected voidsetInstance()Load the adapter with an appropriate object unless it's already been set.-
Methods inherited from class jmri.jmrix.AbstractNetworkConnectionConfig
addStandardDetails, checkInitDone, checkOptionValueValidity, getAdapter, getConnectionName, getDisabled, getInfo, getManufacturer, isPortAdvanced, setDisabled, setManufacturer, showAdvancedItems, updateAdapter
-
Methods inherited from class jmri.jmrix.AbstractConnectionConfig
addNameEntryCheckers, isDirty, isRestartRequired, register
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConnectionConfig
public ConnectionConfig()
Ctor for an object being created during load process; Swing init is deferred.
-
ConnectionConfig
public ConnectionConfig(NetworkPortAdapter p)
Ctor for a connection configuration with no preexisting adapter.setInstance()will fill the adapter member.- Parameters:
p- network port adapter.
-
-
Method Detail
-
name
public java.lang.String name()
- Specified by:
namein interfaceConnectionConfig
-
setInstance
protected void setInstance()
Load the adapter with an appropriate object unless it's already been set.- Specified by:
setInstancein classAbstractNetworkConnectionConfig
-
loadDetails
public void loadDetails(javax.swing.JPanel details)
Load the Swing widgets needed to configure this connection into a specified JPanel. Used during the configuration process to fill out the preferences window with content specific to this Connection type. The JPanel contents need to handle their own gets/sets to the underlying Connection content.- Specified by:
loadDetailsin interfaceConnectionConfig- Overrides:
loadDetailsin classAbstractNetworkConnectionConfig- Parameters:
details- the specific Swing object to be configured and filled
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
connection changed action event- Specified by:
actionPerformedin interfacejava.awt.event.ActionListener- Parameters:
e- - Action event
-
addStandardDetails
public int addStandardDetails(PortAdapter adapter, boolean incAdvanced, int i)
- Overrides:
addStandardDetailsin classAbstractConnectionConfig
-
setAutoNetworkConfig
public void setAutoNetworkConfig()
Actions to be done if network autoconfig has changed. If autoconfig is set, disable input to the hostname field - it is then filled from the device list combo box- Overrides:
setAutoNetworkConfigin classAbstractNetworkConnectionConfig
-
isHostNameAdvanced
public boolean isHostNameAdvanced()
- Overrides:
isHostNameAdvancedin classAbstractNetworkConnectionConfig
-
isAutoConfigPossible
public boolean isAutoConfigPossible()
- Overrides:
isAutoConfigPossiblein classAbstractNetworkConnectionConfig
-
dispose
public void dispose()
Description copied from interface:ConnectionConfigDone with this ConnectionConfig object. Invoked inJmrixConfigPanewhen switching away from this particular mode.- Specified by:
disposein interfaceConnectionConfig- Overrides:
disposein classAbstractNetworkConnectionConfig
-
-