betterclock.java

来自「操作系统课程设计:页面置换算法!!!很好的操作系统大作业」· Java 代码 · 共 70 行

JAVA
70
字号
package util;import java.awt.Color;import java.awt.Label;import java.util.Calendar;/* * To change this template, choose Tools | Templates * and open the template in the editor. */import java.util.Random;import java.util.logging.Level;import java.util.logging.Logger;/** * * @author Administrator */public class BetterClock extends PageReplace{        private int BlockNum = 0;    private int[] Block = null;    private boolean[] BlockRecA = null;    private boolean[] BlockRecM = null;    double []efficiency=null;    int[] seq=null;    Label[] label=null;    String nextSeq = null;    String lastSeq = null;    Label next = null;    Label last = null;    Label efficiencyLabel = null;                    public BetterClock(int[]s,double[] eff,Label[] l,Label next,Label last,Label efficiencyLabel)    {               this.seq = s;        this.label = l;        this.next = next;        this.last = last;        efficiency= eff;        this.efficiencyLabel = efficiencyLabel;        char[] show = new char[40];        for (int i = 0,j=0; i < seq.length; i++) {            show[j++] = (char)(seq[i]+48);            show[j++] = ' ';        }        nextSeq = new String().valueOf(show);        lastSeq = "";                      this.BlockNum = l.length;                this.Block = new int[l.length];        for (int i = 0; i < Block.length; i++) {            Block[i] = 0;        }        this.BlockRecA = new boolean[l.length];        for (int i = 0; i < BlockRecA.length; i++) {            BlockRecA[i] = false;        }                this.BlockRecM = new boolean[l.length];        for (int i = 0; i < BlockRecM.length; i++) {            BlockRecM[i] = false;        }            }    public void run()    {      next.setVisible(true);      next.setText("寰呰

⌨️ 快捷键说明

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