drawcavans.java~28~

来自「Java画版程序。......................要求变态。」· JAVA~28~ 代码 · 共 45 行

JAVA~28~
45
字号
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(){    // this.transferFocus();     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 + =
减小字号Ctrl + -
显示快捷键?