jmri.jmrix
Class AbstractSerialConnectionConfig

Show UML class diagram
java.lang.Object
  extended by jmri.jmrix.AbstractConnectionConfig
      extended by jmri.jmrix.AbstractSerialConnectionConfig
All Implemented Interfaces:
ConnectionConfig
Direct Known Subclasses:
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

public abstract class AbstractSerialConnectionConfig
extends AbstractConnectionConfig
implements ConnectionConfig

Abstract base class for common implementation of the ConnectionConfig


Nested Class Summary
(package private)  class AbstractSerialConnectionConfig.ComboBoxRenderer
           
 
Nested classes/interfaces inherited from class jmri.jmrix.AbstractConnectionConfig
AbstractConnectionConfig.Option
 
Field Summary
protected  SerialPortAdapter adapter
           
protected  JComboBox baudBox
           
protected  JLabel baudBoxLabel
           
protected  String[] baudList
           
protected  boolean init
           
(package private)  String invalidPort
           
protected static org.slf4j.Logger log
           
(package private)  Vector<String> originalList
           
(package private)  UserPreferencesManager p
           
protected  JComboBox portBox
           
protected  JLabel portBoxLabel
           
(package private)  Vector<String> v
           
(package private)  String value
           
 
Fields inherited from class jmri.jmrix.AbstractConnectionConfig
_details, additionalItems, cL, connectionName, connectionNameField, connectionNameLabel, cR, gbLayout, NUMOPTIONS, options, pref, rb, showAdvanced, systemPrefix, systemPrefixField, systemPrefixLabel
 
Constructor Summary
AbstractSerialConnectionConfig()
          Ctor for a functional object with no prexisting adapter.
AbstractSerialConnectionConfig(PortAdapter p)
          Ctor for an object being created during load process
AbstractSerialConnectionConfig(SerialPortAdapter p)
           
 
Method Summary
protected  int addStandardDetails(boolean incAdvanced, int i)
           
protected  void addToActionList()
           
protected  void checkInitDone()
           
 void dispose()
           
protected  ResourceBundle getActionModelResourceBundle()
          This is purely here for systems that do not impliement the SystemConnectionMemo Acela, CAN BUS, CMRI, Grapevine, QSI, Zimo & RPS and can be removed one they have been migrated
 SerialPortAdapter getAdapter()
           
 String getConnectionName()
           
 boolean getDisabled()
           
 String getInfo()
           
 String getManufacturer()
           
protected  String[] getPortFriendlyNames()
          This provides a method to return potentially meaningfull names that are used in OS to help identify ports againsts Hardware.
protected  Vector<String> getPortNames()
           
 boolean isBaudAdvanced()
           
 boolean isPortAdvanced()
           
 void loadDetails(JPanel details)
           
 void refreshPortBox()
           
protected  void removeFromActionList()
           
 void setDisabled(boolean disabled)
           
protected abstract  void setInstance()
          Load the adapter with an appropriate object unless its already been set.
 void setManufacturer(String manufacturer)
           
protected  void showAdvancedItems()
           
 void updateAdapter()
           
protected static void updateSerialPortNames(String portName, JComboBox portCombo, Vector<String> portList)
           
 
Methods inherited from class jmri.jmrix.AbstractConnectionConfig
addStandardDetails
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.jmrix.ConnectionConfig
name
 

Field Detail

init

protected boolean init

p

UserPreferencesManager p

portBox

protected JComboBox portBox

portBoxLabel

protected JLabel portBoxLabel

baudBox

protected JComboBox baudBox

baudBoxLabel

protected JLabel baudBoxLabel

baudList

protected String[] baudList

adapter

protected SerialPortAdapter adapter

v

Vector<String> v

originalList

Vector<String> originalList

invalidPort

String invalidPort

value

String value

log

protected static final org.slf4j.Logger log
Constructor Detail

AbstractSerialConnectionConfig

public AbstractSerialConnectionConfig(PortAdapter p)
Ctor for an object being created during load process


AbstractSerialConnectionConfig

public AbstractSerialConnectionConfig(SerialPortAdapter p)

AbstractSerialConnectionConfig

public AbstractSerialConnectionConfig()
Ctor for a functional object with no prexisting adapter. Expect that the subclass setInstance() will fill the adapter member.

Method Detail

getAdapter

public SerialPortAdapter getAdapter()
Specified by:
getAdapter in interface ConnectionConfig

checkInitDone

protected void checkInitDone()
Specified by:
checkInitDone in class AbstractConnectionConfig

updateAdapter

public void updateAdapter()
Specified by:
updateAdapter in class AbstractConnectionConfig

setInstance

protected abstract void setInstance()
Load the adapter with an appropriate object unless its already been set.

Specified by:
setInstance in class AbstractConnectionConfig

getInfo

public String getInfo()
Specified by:
getInfo in interface ConnectionConfig
Specified by:
getInfo in class AbstractConnectionConfig

refreshPortBox

public void refreshPortBox()

loadDetails

public void loadDetails(JPanel details)
Specified by:
loadDetails in interface ConnectionConfig
Specified by:
loadDetails in class AbstractConnectionConfig

showAdvancedItems

protected void showAdvancedItems()
Specified by:
showAdvancedItems in class AbstractConnectionConfig

addStandardDetails

protected int addStandardDetails(boolean incAdvanced,
                                 int i)

isPortAdvanced

public boolean isPortAdvanced()

isBaudAdvanced

public boolean isBaudAdvanced()

getManufacturer

public String getManufacturer()
Specified by:
getManufacturer in interface ConnectionConfig
Specified by:
getManufacturer in class AbstractConnectionConfig

setManufacturer

public void setManufacturer(String manufacturer)
Specified by:
setManufacturer in interface ConnectionConfig
Specified by:
setManufacturer in class AbstractConnectionConfig

getDisabled

public boolean getDisabled()
Specified by:
getDisabled in interface ConnectionConfig
Specified by:
getDisabled in class AbstractConnectionConfig

setDisabled

public void setDisabled(boolean disabled)
Specified by:
setDisabled in interface ConnectionConfig
Specified by:
setDisabled in class AbstractConnectionConfig

getConnectionName

public String getConnectionName()
Specified by:
getConnectionName in interface ConnectionConfig
Specified by:
getConnectionName in class AbstractConnectionConfig

dispose

public void dispose()
Specified by:
dispose in interface ConnectionConfig

updateSerialPortNames

protected static void updateSerialPortNames(String portName,
                                            JComboBox portCombo,
                                            Vector<String> portList)

getPortNames

protected Vector<String> getPortNames()

getPortFriendlyNames

protected String[] getPortFriendlyNames()
This provides a method to return potentially meaningfull names that are used in OS to help identify ports againsts Hardware.


getActionModelResourceBundle

protected ResourceBundle getActionModelResourceBundle()
This is purely here for systems that do not impliement the SystemConnectionMemo Acela, CAN BUS, CMRI, Grapevine, QSI, Zimo & RPS and can be removed one they have been migrated


addToActionList

protected void addToActionList()

removeFromActionList

protected void removeFromActionList()


Copyright © 1997-2013 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads