Package jmri.jmrix.pi.simulator
Class RaspberryPiSimulatorConnectionConfig
- java.lang.Object
-
- jmri.jmrix.AbstractConnectionConfig
-
- jmri.jmrix.pi.simulator.RaspberryPiSimulatorConnectionConfig
-
- All Implemented Interfaces:
ConnectionConfig
public class RaspberryPiSimulatorConnectionConfig extends AbstractConnectionConfig
Handle configuring a Raspberry Pi layout connection.This uses the
RaspberryPiAdapter
class to do the actual connection.- See Also:
RaspberryPiAdapter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.jmrix.AbstractConnectionConfig
AbstractConnectionConfig.Option
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
manuf
-
Fields inherited from class jmri.jmrix.AbstractConnectionConfig
_details, additionalItems, cL, connectionNameField, connectionNameLabel, cR, gbLayout, NUMOPTIONS, options, showAdvanced, systemPrefixField, systemPrefixLabel
-
-
Constructor Summary
Constructors Constructor Description RaspberryPiSimulatorConnectionConfig()
Ctor for a connection configuration with no preexisting adapter.RaspberryPiSimulatorConnectionConfig(RaspberryPiAdapter 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.RaspberryPiAdapter
getAdapter()
java.lang.String
getConnectionName()
boolean
getDisabled()
java.lang.String
getInfo()
java.lang.String
getManufacturer()
void
loadDetails(javax.swing.JPanel details)
Load the Swing widgets needed to configure this connection into a specified JPanel.java.lang.String
name()
void
setDisabled(boolean disable)
protected void
setInstance()
Load the adapter with an appropriate object unless it's already been set.void
setManufacturer(java.lang.String manufacturer)
protected void
showAdvancedItems()
void
updateAdapter()
-
Methods inherited from class jmri.jmrix.AbstractConnectionConfig
addNameEntryCheckers, addStandardDetails, dispose, isDirty, isRestartRequired, register
-
-
-
-
Field Detail
-
manuf
java.lang.String manuf
-
-
Constructor Detail
-
RaspberryPiSimulatorConnectionConfig
public RaspberryPiSimulatorConnectionConfig(RaspberryPiAdapter p)
Ctor for an object being created during load process; Swing init is deferred.- Parameters:
p
- the pre-existing adapter
-
RaspberryPiSimulatorConnectionConfig
public RaspberryPiSimulatorConnectionConfig()
Ctor for a connection configuration with no preexisting adapter.setInstance()
will fill the adapter member.
-
-
Method Detail
-
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
- Specified by:
checkInitDone
in classAbstractConnectionConfig
-
updateAdapter
public void updateAdapter()
- Specified by:
updateAdapter
in classAbstractConnectionConfig
-
showAdvancedItems
protected void showAdvancedItems()
- Specified by:
showAdvancedItems
in classAbstractConnectionConfig
-
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:
loadDetails
in interfaceConnectionConfig
- Specified by:
loadDetails
in classAbstractConnectionConfig
- Parameters:
details
- the specific Swing object to be configured and filled
-
setInstance
protected void setInstance()
Load the adapter with an appropriate object unless it's already been set.- Specified by:
setInstance
in classAbstractConnectionConfig
-
getAdapter
public RaspberryPiAdapter getAdapter()
-
getInfo
public java.lang.String getInfo()
- Specified by:
getInfo
in interfaceConnectionConfig
- Specified by:
getInfo
in classAbstractConnectionConfig
-
getManufacturer
public java.lang.String getManufacturer()
- Specified by:
getManufacturer
in interfaceConnectionConfig
- Specified by:
getManufacturer
in classAbstractConnectionConfig
-
setManufacturer
public void setManufacturer(java.lang.String manufacturer)
- Specified by:
setManufacturer
in interfaceConnectionConfig
- Specified by:
setManufacturer
in classAbstractConnectionConfig
-
name
public java.lang.String name()
-
getConnectionName
public java.lang.String getConnectionName()
- Specified by:
getConnectionName
in interfaceConnectionConfig
- Specified by:
getConnectionName
in classAbstractConnectionConfig
-
getDisabled
public boolean getDisabled()
- Specified by:
getDisabled
in interfaceConnectionConfig
- Specified by:
getDisabled
in classAbstractConnectionConfig
-
setDisabled
public void setDisabled(boolean disable)
- Specified by:
setDisabled
in interfaceConnectionConfig
- Specified by:
setDisabled
in classAbstractConnectionConfig
-
-