java 类图

立即使用

package com.serialport.utils

Class ArrayUtils

+ concat(byte[] firstArray, byte[] secondArray) :byte[]

Class ShowUtils

+ message(String message) :void

+ warningMessage(String message) :void

+ errorMessage(String message) :void

+ plainMessage(String title, String message):void

package com.serialport.ui

Class MainFrame

+WIDTH : int =550;// 程序界面宽度

+ HEIGHT :int = 555;

- mDataView : JTextArea

- mScrollDataView :JScrollPane

- mSerialPortPanel :JPanel

- mSerialPortLabel :JLabel

- mBaudrateLabel :JLabel

- mCommChoice :JComboBox

- mDataBitLabel :JLabel

- mStopBitLabel :JLabel

- mParityLabel :JLabel

- mBaudrateChoice :JComboBox

- mDataBitChoice :JComboBox

- mStopBitChoice :JComboBox

- mParityChoice :JComboBox

- ButtonGroup mDataChoice :ButtonGroup

- mDataASCIIChoice :JRadioButton

- mDataHexChoice :JRadioButton

- mOperatePanel :JPanel

- mDataInput :

- mSerialPortOperate :JButton

- mSendCommand :JButton

- mhelp :JButton

- mClear :JButton

- mCommList :List<String>

- t mSerialport :SerialPor

+ MainFrame():void

- initView() : void

- initData(): void

- actionListener(): void

- openSerialPort(java.awt.event.ActionEvent evt): void

- closeSerialPort(java.awt.event.ActionEvent evt): void

- WriteToFile(String savepath): void

- mSendCommand(java.awt.event.ActionEvent evt): void

+ main(String args[]):void


package com.serialport.manager

SerialPortManager

+ findPorts() : ArrayList<String>

+ getPortTypeName(int portType) : String

+ openPort(String portName, int baudrate,int dataBit,int stopBit,int pairity) : SerialPort

+ closePort(SerialPort serialPort) :void

+ sendToPort(SerialPort serialPort, byte[] order) :void

+ readFromPort(SerialPort serialPort) :byte[]

+ addListener(SerialPort serialPort,DataAvailableListener listener):void

















Class SerialPortListener

-mDataAvailableListener

+ SerialPortListener(DataAvailableListener mDataAvailableListener)

+ serialEvent(SerialPortEvent serialPortEvent) : void

Class DataAvailableListener

dataAvailable() :void

537
0
3
发布时间: 2020-07-09