Package jmri.jmrix.bidib.serialdriver
Class ConnectionConfig
- java.lang.Object
-
- jmri.jmrix.AbstractConnectionConfig
-
- jmri.jmrix.AbstractSerialConnectionConfig
-
- jmri.jmrix.bidib.serialdriver.ConnectionConfig
-
- All Implemented Interfaces:
ConnectionConfig
public class ConnectionConfig extends AbstractSerialConnectionConfig
Definition of objects to handle configuring a layout connection via a BiDiB SerialDriverAdapter 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.String
NAME
protected javax.swing.JTextField
portNameFilterField
protected javax.swing.JLabel
portNameFilterLabel
protected javax.swing.JTextField
rootNodeField
protected javax.swing.JLabel
rootNodeLabel
protected javax.swing.JCheckBox
useAutoScan
-
Fields inherited from class jmri.jmrix.AbstractSerialConnectionConfig
adapter, baudBox, baudBoxLabel, baudList, init, outputIntervalLabel, outputIntervalReset, outputIntervalSpinner, portBox, portBoxLabel
-
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 a functional Swing object with no existing adapterConnectionConfig(SerialPortAdapter p)
Ctor for an object being created during load process; Swing init is deferred.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
checkInitDone()
Complete connection adapter initialization, adding desired options to the Connection Configuration pane.java.util.Vector<java.lang.String>
getPortNames()
Provide a vector of valid port names, each a String.java.lang.String
name()
protected void
setInstance()
Load the adapter with an appropriate object unless it's already been set.protected void
showAdvancedItems()
void
updateAdapter()
-
Methods inherited from class jmri.jmrix.AbstractSerialConnectionConfig
addStandardDetails, dispose, getActionModelResourceBundle, getAdapter, getConnectionName, getDisabled, getInfo, getManufacturer, getPortFriendlyNames, isBaudAdvanced, isPortAdvanced, loadDetails, refreshPortBox, setDisabled, setManufacturer, updateSerialPortNames
-
Methods inherited from class jmri.jmrix.AbstractConnectionConfig
addNameEntryCheckers, addStandardDetails, isDirty, isRestartRequired, register
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
-
useAutoScan
protected javax.swing.JCheckBox useAutoScan
-
rootNodeLabel
protected javax.swing.JLabel rootNodeLabel
-
rootNodeField
protected javax.swing.JTextField rootNodeField
-
portNameFilterLabel
protected javax.swing.JLabel portNameFilterLabel
-
portNameFilterField
protected javax.swing.JTextField portNameFilterField
-
-
Constructor Detail
-
ConnectionConfig
public ConnectionConfig(SerialPortAdapter p)
Ctor for an object being created during load process; Swing init is deferred.- Parameters:
p
- SerialPortAdapter for existing adapter
-
ConnectionConfig
public ConnectionConfig()
Ctor for a functional Swing object with no existing adapter
-
-
Method Detail
-
name
public java.lang.String name()
-
setInstance
protected void setInstance()
Load the adapter with an appropriate object unless it's already been set.- Specified by:
setInstance
in classAbstractSerialConnectionConfig
-
getPortNames
public java.util.Vector<java.lang.String> getPortNames()
Provide a vector of valid port names, each a String. This may be implemented differently in subclasses that e.g. do loopback or use a custom port-access library.- Overrides:
getPortNames
in classAbstractSerialConnectionConfig
- Returns:
- Valid port names in the form used to select them later.
-
checkInitDone
protected void checkInitDone()
Complete connection adapter initialization, adding desired options to the Connection Configuration pane. Required action: set init to true. Optional actions:- fill in connectionNameField
- add ActionListeners to config fields eg. systemPrefixField to update adapter after change by the user
- Overrides:
checkInitDone
in classAbstractSerialConnectionConfig
-
showAdvancedItems
protected void showAdvancedItems()
- Overrides:
showAdvancedItems
in classAbstractSerialConnectionConfig
-
updateAdapter
public void updateAdapter()
- Overrides:
updateAdapter
in classAbstractSerialConnectionConfig
-
-