Package jmri.jmrix
Class AbstractSimulatorConnectionConfig
java.lang.Object
jmri.jmrix.AbstractConnectionConfig
jmri.jmrix.AbstractSimulatorConnectionConfig
- All Implemented Interfaces:
ConnectionConfig
- Direct Known Subclasses:
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 Simulator
ConnectionConfig.
Currently uses the SerialPortAdapter, but this will change to the simulator adapter in due course.
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrix.AbstractConnectionConfig
AbstractConnectionConfig.Option -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SerialPortAdapterprotected String[]protected booleanFields 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.Create a connection configuration with a preexisting adapter. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidComplete connection adapter initialization, adding desired options to the Connection Configuration pane.voiddispose()Done with this ConnectionConfig object.booleangetInfo()voidloadDetails(JPanel details) Load the Swing widgets needed to configure this connection into a specified JPanel.voidsetDisabled(boolean disabled) protected abstract voidLoad the adapter with an appropriate object unless it's already been set.voidsetManufacturer(String manufacturer) protected voidvoidMethods 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
-
baudList
-
adapter
-
-
Constructor Details
-
AbstractSimulatorConnectionConfig
Create a connection configuration with a preexisting adapter. This is used principally when loading a configuration that defines this connection.- Parameters:
p- the adapter to create a connection configuration for
-
AbstractSimulatorConnectionConfig
public AbstractSimulatorConnectionConfig()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
This implementation always returns the localized value for "none".
- Specified by:
getInfoin interfaceConnectionConfig- Specified by:
getInfoin classAbstractConnectionConfig- Returns:
- the localized value for "none"
-
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
-
getManufacturer
- Specified by:
getManufacturerin interfaceConnectionConfig- Specified by:
getManufacturerin classAbstractConnectionConfig
-
setManufacturer
- Specified by:
setManufacturerin interfaceConnectionConfig- Specified by:
setManufacturerin classAbstractConnectionConfig
-
getConnectionName
- Specified by:
getConnectionNamein interfaceConnectionConfig- Specified by:
getConnectionNamein classAbstractConnectionConfig
-
getDisabled
- Specified by:
getDisabledin interfaceConnectionConfig- Specified by:
getDisabledin classAbstractConnectionConfig
-
setDisabled
- Specified by:
setDisabledin interfaceConnectionConfig- Specified by:
setDisabledin 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
-