edu.uiuc.cs.seclab.modem.gui
Class SerialPortSelector
java.lang.Object
java.util.Observable
edu.uiuc.cs.seclab.modem.gui.SerialPortSelector
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener, javax.swing.event.ListSelectionListener
public class SerialPortSelector
- extends java.util.Observable
- implements javax.swing.event.ListSelectionListener, java.awt.event.ActionListener
Select serial port parameters.
For the USB-connected Maxstream module, you must have first
loaded the "ftdi-sio" module in Linux, so that the USB-to-serial
converter appears as /dev/ttyUSBx.
| Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
baudLst
protected javax.swing.JComboBox baudLst
curEnt
protected SerialPortSelector.ComPortEntry curEnt
dataBitsLst
protected javax.swing.JComboBox dataBitsLst
DFL_BAUD
public static final int DFL_BAUD
- See Also:
- Constant Field Values
DFL_DATA_BITS
public static final int DFL_DATA_BITS
- See Also:
- Constant Field Values
DFL_FLOW_CTRL
public static final int DFL_FLOW_CTRL
- See Also:
- Constant Field Values
DFL_PARITY
public static final int DFL_PARITY
- See Also:
- Constant Field Values
DFL_STOP_BITS
public static final int DFL_STOP_BITS
- See Also:
- Constant Field Values
flowCtlLst
protected javax.swing.JComboBox flowCtlLst
mainPnl
protected javax.swing.JPanel mainPnl
parityLst
protected javax.swing.JComboBox parityLst
port
protected gnu.io.SerialPort port
portLst
protected javax.swing.JList portLst
portPnl
protected SerialPortPanel portPnl
series2Box
protected javax.swing.JCheckBox series2Box
stopBitsLst
protected javax.swing.JComboBox stopBitsLst
SerialPortSelector
public SerialPortSelector()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
applyConfig
public void applyConfig()
throws gnu.io.UnsupportedCommOperationException
- Throws:
gnu.io.UnsupportedCommOperationException
closePort
public void closePort()
constructBaudLst
protected void constructBaudLst()
constructDataBitsLst
protected void constructDataBitsLst()
constructFlowCtlLst
protected void constructFlowCtlLst()
constructParityLst
protected void constructParityLst()
constructPortLst
protected void constructPortLst()
constructStopBitsLst
protected void constructStopBitsLst()
deselConfig
protected void deselConfig()
getComponent
public javax.swing.JPanel getComponent()
getPort
public gnu.io.SerialPort getPort()
isSeries2
public boolean isSeries2()
setConfigEnabled
protected void setConfigEnabled(boolean enabled)
setDefaultBaudRate
public void setDefaultBaudRate(int def)
setDefaultFlowControl
public void setDefaultFlowControl(int mode)
setDefaultStopBits
public void setDefaultStopBits(int def)
updateConfig
protected void updateConfig()
valueChanged
public void valueChanged(javax.swing.event.ListSelectionEvent e)
- Port selected
- Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener