jmri.jmrix
Class AbstractNetworkConnectionConfig

java.lang.Object
  extended by jmri.jmrix.AbstractConnectionConfig
      extended by jmri.jmrix.AbstractNetworkConnectionConfig
All Implemented Interfaces:
ConnectionConfig
Direct Known Subclasses:
ConnectionConfig, ConnectionConfig, ConnectionConfig, ConnectionConfig, ConnectionConfig, ConnectionConfig, ConnectionConfig, ConnectionConfig

public abstract class AbstractNetworkConnectionConfig
extends AbstractConnectionConfig
implements ConnectionConfig

Abstract base class for common implementation of the ConnectionConfig

Author:
Bob Jacobsen Copyright (C) 2001, 2003

Field Summary
protected  NetworkPortAdapter adapter
           
protected  JTextField hostNameField
           
protected  JLabel hostNameFieldLabel
           
protected  JTextField portField
           
protected  JLabel portFieldLabel
           
 
Fields inherited from class jmri.jmrix.AbstractConnectionConfig
_details, connectionName, connectionNameField, connectionNameLabel, NUMOPTIONS, opt1Box, opt1BoxLabel, opt1List, opt2Box, opt2BoxLabel, opt2List, pref, showAdvanced, systemPrefix, systemPrefixField, systemPrefixLabel
 
Constructor Summary
AbstractNetworkConnectionConfig()
          Ctor for a functional object with no prexisting adapter.
AbstractNetworkConnectionConfig(NetworkPortAdapter p)
          Ctor for an object being created during load process
 
Method Summary
protected  void addStandardDetails(boolean incAdvanced)
           
protected  void checkInitDone()
           
 void dispose()
           
 NetworkPortAdapter getAdapter()
           
 String getConnectionName()
           
 boolean getDisabled()
           
 String getInfo()
           
 String getManufacturer()
           
 boolean isHostNameAdvanced()
           
 boolean isPortAdvanced()
           
 void loadDetails(JPanel details)
           
 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()
           
 
Methods inherited from class jmri.jmrix.AbstractConnectionConfig
isOptList1Advanced, isOptList2Advanced
 
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

hostNameField

protected JTextField hostNameField

hostNameFieldLabel

protected JLabel hostNameFieldLabel

portField

protected JTextField portField

portFieldLabel

protected JLabel portFieldLabel

adapter

protected NetworkPortAdapter adapter
Constructor Detail

AbstractNetworkConnectionConfig

public AbstractNetworkConnectionConfig(NetworkPortAdapter p)
Ctor for an object being created during load process


AbstractNetworkConnectionConfig

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

Method Detail

checkInitDone

protected void checkInitDone()

getAdapter

public NetworkPortAdapter getAdapter()

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

loadDetails

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

showAdvancedItems

protected void showAdvancedItems()

addStandardDetails

protected void addStandardDetails(boolean incAdvanced)

isHostNameAdvanced

public boolean isHostNameAdvanced()

isPortAdvanced

public boolean isPortAdvanced()

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


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