📄 drawcavans.java~26~
字号:
package myframe;/** * Title: * Description: * Copyright: Copyright (c) 2002 * Company: * @author * @version 1.0 */import javax.swing.*;import java.awt.*;import java.util.*;import myshape.*;import myshapeaction.*;public class DrawCavans extends JLabel implements GraphicsEditor { public DrawCavans() { } public static int width,height; int w=10,h=10; private int t1,t2; public void changeView(int ince){ t1+=w*ince; t2+=h*ince; } public void setWidthHeight(){ width=this.getWidth(); height=this.getHeight(); } public void paintComponent(Graphics g){ g=g.create(t1,t2,width,height); Iterator iterator=drawedItemList.iterator(); while(iterator.hasNext()){ ((MyShape)iterator.next()).paint(g); } } // Graphics2D g1=(Graphics2D)g;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -