📄 memnoyau.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 of de Noyau" in the Panel
* {@link fr.umlv.projet.fenetre.preformance.Preformance Preformance}.
* @author HUANG Wei & Ma Xiao Jun
*
*/
public class MemNoyau extends JPanel {
private String Total = " ";
private String Paginee = " ";
private String NPaginee = " ";
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("Paginee",5,15+(h-25)/2);
g.drawString(Paginee,w-5-Paginee.length()*7,15+(h-25)/2);
g.drawString("non Paginee",5,h-10);
g.drawString(NPaginee,w-5-NPaginee.length()*7,h-10);
}
/**
* to refresh the datas of the Panel "Memory of de Noyau".
* @param Total
* @param Paginee
* @param NPaginee
*/
public void refresh(String Total,String Paginee,String NPaginee){
this.Total = Total;
this.Paginee = Paginee;
this.NPaginee = NPaginee;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -