reseaubigger.java

来自「这是一个在linux环境下」· Java 代码 · 共 54 行

JAVA
54
字号
package fr.umlv.projet.fenetre.net;import java.awt.BorderLayout;import java.awt.Color;import java.awt.GridLayout;import javax.swing.JPanel;/** * The Panel contains two parts:state of data send and receive. * @author HUANG Wei & MA Xiao Jun. * */public class ReseauBigger extends JPanel {	private GraphicReseau send = new GraphicReseau();	private GraphicReseau recieve = new GraphicReseau();		public ReseauBigger(){		this.setLayout(new GridLayout(2,1));		JPanel Up = new JPanel();		Up.setLayout(new BorderLayout());		JPanel Down = new JPanel();		Down.setLayout(new BorderLayout());		Up.setBorder(javax.swing.BorderFactory.createTitledBorder(				javax.swing.BorderFactory.createEtchedBorder(),				"RECIEVE (KB/S)",				javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,				javax.swing.border.TitledBorder.DEFAULT_POSITION,				new java.awt.Font("Arial", 0, 10)));		Down.setBorder(javax.swing.BorderFactory.createTitledBorder(				javax.swing.BorderFactory.createEtchedBorder(),				"TRANSMIT (KB/S)",				javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,				javax.swing.border.TitledBorder.DEFAULT_POSITION,				new java.awt.Font("Arial", 0, 10)));		Up.add(recieve,BorderLayout.CENTER);		Down.add(send,BorderLayout.CENTER);		this.add(Up);		this.add(Down);	}		/**	 * to refresh two parts together	 * @param debut debut to define the abscissa of begining to draw de cell.	 * @param out value(kb) of data sended.	 *  @param in value(kb) of data received.	 */		public void refresh(int debut,int out,int in){		send.refresh(debut,out,Color.YELLOW);		recieve.refresh(debut,in,Color.GREEN);			}}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?