jmri.jmrix
Class AbstractConnectionConfig

Show UML class diagram
java.lang.Object
  extended by jmri.jmrix.AbstractConnectionConfig
All Implemented Interfaces:
ConnectionConfig
Direct Known Subclasses:
AbstractNetworkConnectionConfig, AbstractSerialConnectionConfig, AbstractSimulatorConnectionConfig

public abstract class AbstractConnectionConfig
extends java.lang.Object
implements ConnectionConfig

Abstract base class for common implementation of the ConnectionConfig


Nested Class Summary
protected static class AbstractConnectionConfig.Option
           
 
Field Summary
protected  javax.swing.JPanel _details
           
protected  java.util.ArrayList<javax.swing.JComponent> additionalItems
           
protected  java.awt.GridBagConstraints cL
           
protected  java.lang.String connectionName
           
protected  javax.swing.JTextField connectionNameField
           
protected  javax.swing.JLabel connectionNameLabel
           
protected  java.awt.GridBagConstraints cR
           
protected  java.awt.GridBagLayout gbLayout
           
protected static org.slf4j.Logger log
           
protected  int NUMOPTIONS
           
protected  java.util.Hashtable<java.lang.String,AbstractConnectionConfig.Option> options
           
protected  UserPreferencesManager pref
           
(package private) static java.util.ResourceBundle rb
           
protected  javax.swing.JCheckBox showAdvanced
           
protected  java.lang.String systemPrefix
           
protected  javax.swing.JTextField systemPrefixField
           
protected  javax.swing.JLabel systemPrefixLabel
           
 
Constructor Summary
AbstractConnectionConfig()
          Ctor for a functional object with no prexisting adapter.
 
Method Summary
protected  int addStandardDetails(PortAdapter adapter, boolean incAdvanced, int i)
           
(package private) abstract  void checkInitDone()
           
abstract  java.lang.String getConnectionName()
           
abstract  boolean getDisabled()
           
abstract  java.lang.String getInfo()
           
abstract  java.lang.String getManufacturer()
           
abstract  void loadDetails(javax.swing.JPanel details)
           
abstract  void setDisabled(boolean disable)
           
protected abstract  void setInstance()
          Load the adapter with an appropriate object unless its already been set.
abstract  void setManufacturer(java.lang.String manufacturer)
           
(package private) abstract  void showAdvancedItems()
           
abstract  void updateAdapter()
           
 
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
dispose, getAdapter, name
 

Field Detail

pref

protected final UserPreferencesManager pref

NUMOPTIONS

protected int NUMOPTIONS

showAdvanced

protected javax.swing.JCheckBox showAdvanced

systemPrefixLabel

protected javax.swing.JLabel systemPrefixLabel

connectionNameLabel

protected javax.swing.JLabel connectionNameLabel

systemPrefixField

protected javax.swing.JTextField systemPrefixField

connectionNameField

protected javax.swing.JTextField connectionNameField

systemPrefix

protected java.lang.String systemPrefix

connectionName

protected java.lang.String connectionName

_details

protected javax.swing.JPanel _details

options

protected java.util.Hashtable<java.lang.String,AbstractConnectionConfig.Option> options

additionalItems

protected java.util.ArrayList<javax.swing.JComponent> additionalItems

rb

static java.util.ResourceBundle rb

gbLayout

protected java.awt.GridBagLayout gbLayout

cL

protected java.awt.GridBagConstraints cL

cR

protected java.awt.GridBagConstraints cR

log

protected static org.slf4j.Logger log
Constructor Detail

AbstractConnectionConfig

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

Method Detail

checkInitDone

abstract void checkInitDone()

updateAdapter

public abstract void updateAdapter()

setInstance

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


getInfo

public abstract java.lang.String getInfo()
Specified by:
getInfo in interface ConnectionConfig

loadDetails

public abstract void loadDetails(javax.swing.JPanel details)
Specified by:
loadDetails in interface ConnectionConfig

showAdvancedItems

abstract void showAdvancedItems()

addStandardDetails

protected int addStandardDetails(PortAdapter adapter,
                                 boolean incAdvanced,
                                 int i)

getManufacturer

public abstract java.lang.String getManufacturer()
Specified by:
getManufacturer in interface ConnectionConfig

setManufacturer

public abstract void setManufacturer(java.lang.String manufacturer)
Specified by:
setManufacturer in interface ConnectionConfig

getConnectionName

public abstract java.lang.String getConnectionName()
Specified by:
getConnectionName in interface ConnectionConfig

getDisabled

public abstract boolean getDisabled()
Specified by:
getDisabled in interface ConnectionConfig

setDisabled

public abstract void setDisabled(boolean disable)
Specified by:
setDisabled in interface ConnectionConfig


Copyright © 1997-2014 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