📄 pcb.java
字号:
import java.awt.Color;
import java.awt.Graphics;
public class PCB {
//PCB管理类;
private String name;
private int time;
private int priority;
private String state;
private int size;
private int stmem;
public PCB next;
public PCB(){
}
public PCB(String name,int time,int priority,String state,int mem_begin){
this.name = name;
this.time = time;
this.priority = priority;
this.state = state;
this.size = mem_begin;
}
public void draw(Graphics g,int x,int y,int w,int h){
Color cold = g.getColor();
Color c = new Color(150,112,216);
Graphics gnew = g.create(x, y, w, h);
gnew.setColor(c);
gnew.fillRoundRect(0, 0, w, h,15,15);
gnew.setColor(Color.red);
gnew.drawString(this.getName()+" "+this.getState(), 18, 15);
g.setColor(cold);
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public int getTime() {
return time;
}
public void setTime(int time) {
this.time = time;
}
public int getStmem() {
return stmem;
}
public void setStmem(int stmem) {
this.stmem = stmem;
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -