framedcountertester.java

来自「书籍"Java_面向事件编程"的附带光盘代码」· Java 代码 · 共 32 行

JAVA
32
字号
import objectdraw.*;// allows testing of the FramedCounter classpublic class FramedCounterTester implements FrameIfc {        private FramedCounter count;        public FramedCounterTester( double x, double y,                             double width, double height,                             DrawingCanvas canvas ){                count = new FramedCounter(x, y, width, height, canvas);    }        // calls whichever method will update the contents of the display    // in this case, the count is increased by 1    public void update(){        count.increment(1);    }        // highlight the display    public void highlight(){        count.highlight();    }        // un-highlight the display    public void unHighlight(){        count.unHighlight();    }    }

⌨️ 快捷键说明

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