Package jmri.jmrix
Class AbstractSerialConnectionConfig
java.lang.Object
jmri.jmrix.AbstractConnectionConfig
jmri.jmrix.AbstractSerialConnectionConfig
- All Implemented Interfaces:
ConnectionConfig
- Direct Known Subclasses:
AbstractDCCppSerialConnectionConfig,AbstractXNetSerialConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig,ConnectionConfig
Abstract base class for common implementation of the SerialConnectionConfig.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classNested classes/interfaces inherited from class jmri.jmrix.AbstractConnectionConfig
AbstractConnectionConfig.Option -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SerialPortAdapterprotected JLabelprotected String[]protected boolean(package private) Stringprotected JLabelprotected JButtonprotected JSpinner(package private) UserPreferencesManagerprotected JLabelFields inherited from class jmri.jmrix.AbstractConnectionConfig
_details, additionalItems, cL, connectionNameField, connectionNameLabel, cR, gbLayout, NUMOPTIONS, options, showAdvanced, systemPrefixField, systemPrefixLabel -
Constructor Summary
ConstructorsConstructorDescriptionCtor for a functional object with no preexisting adapter.Ctor for an object being created during load process. -
Method Summary
Modifier and TypeMethodDescriptionprotected intaddStandardDetails(boolean incAdvanced, int i) protected voidComplete connection adapter initialization, adding desired options to the Connection Configuration pane.voiddispose()Done with this ConnectionConfig object.protected ResourceBundleThis is purely here for systems that do not implement the SystemConnectionMemo and can be removed once they have been migrated.booleangetInfo()protected String[]This provides a method to return potentially meaningful names that are used in OS to help identify ports against Hardware.Provide a vector of valid port names, each a String.booleanbooleanvoidloadDetails(JPanel details) Load the Swing widgets needed to configure this connection into a specified JPanel.voidvoidsetDisabled(boolean disabled) protected abstract voidLoad the adapter with an appropriate object unless it's already been set.voidsetManufacturer(String manufacturer) protected voidvoidprotected static voidHandle friendly port names.Methods inherited from class jmri.jmrix.AbstractConnectionConfig
addNameEntryCheckers, addStandardDetails, isDirty, isRestartRequired, registerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jmri.jmrix.ConnectionConfig
name
-
Field Details
-
init
-
p
-
portBox
-
portBoxLabel
-
baudBox
-
baudBoxLabel
-
baudList
-
outputIntervalSpinner
-
outputIntervalLabel
-
outputIntervalReset
-
adapter
-
v
-
originalList
-
invalidPort
-
-
Constructor Details
-
AbstractSerialConnectionConfig
Ctor for an object being created during load process.- Parameters:
p- port being configured
-
AbstractSerialConnectionConfig
-
AbstractSerialConnectionConfig
public AbstractSerialConnectionConfig()Ctor for a functional object with no preexisting adapter. Expect that the subclass setInstance() will fill the adapter member.
-
-
Method Details
-
getAdapter
-
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
- Specified by:
checkInitDonein classAbstractConnectionConfig
-
updateAdapter
- Specified by:
updateAdapterin classAbstractConnectionConfig
-
setInstance
Load the adapter with an appropriate object unless it's already been set.- Specified by:
setInstancein classAbstractConnectionConfig
-
getInfo
- Specified by:
getInfoin interfaceConnectionConfig- Specified by:
getInfoin classAbstractConnectionConfig
-
refreshPortBox
-
loadDetails
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- Specified by:
loadDetailsin classAbstractConnectionConfig- Parameters:
details- the specific Swing object to be configured and filled
-
showAdvancedItems
- Specified by:
showAdvancedItemsin classAbstractConnectionConfig
-
addStandardDetails
-
isPortAdvanced
-
isBaudAdvanced
-
getManufacturer
- Specified by:
getManufacturerin interfaceConnectionConfig- Specified by:
getManufacturerin classAbstractConnectionConfig
-
setManufacturer
- Specified by:
setManufacturerin interfaceConnectionConfig- Specified by:
setManufacturerin classAbstractConnectionConfig
-
getDisabled
- Specified by:
getDisabledin interfaceConnectionConfig- Specified by:
getDisabledin classAbstractConnectionConfig
-
setDisabled
- Specified by:
setDisabledin interfaceConnectionConfig- Specified by:
setDisabledin classAbstractConnectionConfig
-
getConnectionName
- Specified by:
getConnectionNamein interfaceConnectionConfig- Specified by:
getConnectionNamein classAbstractConnectionConfig
-
dispose
Description copied from interface:ConnectionConfigDone with this ConnectionConfig object. Invoked inJmrixConfigPanewhen switching away from this particular mode.- Specified by:
disposein interfaceConnectionConfig- Overrides:
disposein classAbstractConnectionConfig
-
updateSerialPortNames
protected static void updateSerialPortNames(String portName, JComboBox<String> portCombo, Vector<String> portList) Handle friendly port names. Note that this changes the selection in portCombo, so that should be tracked after this returns.- Parameters:
portName- The currently-selected port nameportCombo- The combo box that's displaying the available portsportList- The list of valid (unfriendly) port names
-
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.- Returns:
- Valid port names in the form used to select them later.
-
getPortFriendlyNames
This provides a method to return potentially meaningful names that are used in OS to help identify ports against Hardware.- Returns:
- array of friendly port names
-
getActionModelResourceBundle
This is purely here for systems that do not implement the SystemConnectionMemo and can be removed once they have been migrated.- Returns:
- Resource bundle for action model
-