📄 driver.java
字号:
/** Author: David D. Riley * Date: Jan, 2005 * Nested Circles Driver (Figure 6.18) */public class Driver extends ThreeButtons { private ThreeButtonFrame window; private ShadowedRedDot redDot; /** post: A window is displayed * and a shadowed red dot is centered in the window * and the shadowed dot has a diameter of 200 pixels. */ public Driver() { window = new ThreeButtonFrame("Shadowed Red Dot"); window.setLayout(null); redDot = new ShadowedRedDot( window ); window.repaint(); } /** post: the shadowed dot誷 diameter is enlarged by 20% */ public void leftAction() { redDot.zoom( 20.0 ); } /** post: the shadowed dot誷 diameter is reset to 200 pixels */ public void midAction() { redDot.reset(); } /** post: the shadowed dot誷 diameter is reduced by 30% */ public void rightAction() { redDot.zoom( -30.0 ); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -