⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memoirph.java

📁 这是一个在linux环境下
💻 JAVA
字号:
package fr.umlv.projet.fenetre.preformance;

import java.awt.Graphics;
import java.awt.Graphics2D;

import javax.swing.JPanel;
/**
 * The Panel to display the "Memory physics" in the Panel 
 * {@link fr.umlv.projet.fenetre.preformance.Preformance Preformance}. 
 * @author HUANG Wei & MA Xiao Jun
 *
 */
public class MemoirPh extends JPanel {
	private String Total = " ";
	private String Disponible = " ";
	private String CacheSys = " ";
	private static int w = 0;
	private static int h = 0;
	
	protected@Override void paintComponent(Graphics graphic){
		Graphics2D g = (Graphics2D)graphic; 
		super.paintComponent(g);
		w = this.getWidth();
		h = this.getHeight();
		g.drawString("Total",5,15);
		g.drawString(Total,w-5-Total.length()*7,15);
		
		g.drawString("Disponible",5,15+(h-25)/2);
		g.drawString(Disponible,w-5-Disponible.length()*7,15+(h-25)/2);
		
		g.drawString("CacheSys",5,h-10);
		g.drawString(CacheSys,w-5-CacheSys.length()*7,h-10);		
	}
	/**
	 * to refresh the datas of the Panel "Memory physics".
	 * @param Total the value total of Memory physics.
	 * @param Disponible the value of Memory(physics) free.
	 * @param CacheSys
	 */
	public void refresh(String Total,String Disponible,String CacheSys){
		this.Total = Total;
		this.Disponible = Disponible;
		this.CacheSys = CacheSys;
	}
}

⌨️ 快捷键说明

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