CSDN博客

img wbel

图像处理pic1.0版

发表于2004/7/11 21:59:00  1242人阅读

package graphics;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.Image.*;
import java.io.*;
import java.awt.image.*;
import java.awt.*;
import java.util.*;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
import javax.imageio.*;
public class Frame1 extends JFrame {
  final static int  R=2;
  final static int  G=1;
  final static int  B=0;
  final static int  ALPHA=3;
  JPanel contentPane;
  BorderLayout borderLayout1 = new BorderLayout();
  MenuBar menuBar1 = new MenuBar();
  Menu menu1 = new Menu();
  MenuItem menuItem1 = new MenuItem();
  Menu menu2 = new Menu();
  MenuItem menuItem2 = new MenuItem();
  JLabel lb=new JLabel();
  JPanel pl=new JPanel();
  MenuItem menuItem3 = new MenuItem();
  //主图像路径
  String strFile=null;
  String dir=null;
  //印章图像路径
  String strSealFile=null;
  String sealDir=null;
  MenuItem menuItem4 = new MenuItem();
  //主图像的像素数组
  int pixArray[]=null;
  int rArray[][]=null;
  int gArray[][]=null;
  int bArray[][]=null;
  int alpArray[][]=null;
  //定义印章图像的像素数组
  int sealPixArray[]=null;
  int sealRArray[][]=null;
  int sealGArray[][]=null;
  int sealBArray[][]=null;
  //主图像高、宽
  int h,w;
  //印章图像高、宽
  int sealH,sealW;

  MenuItem menuItem5 = new MenuItem();
  MenuItem menuItem6 = new MenuItem();
  MenuItem menuItem7 = new MenuItem();
  MenuItem menuItem8 = new MenuItem();
  MenuItem menuItem9 = new MenuItem();
  MenuItem menuItem10 = new MenuItem();
  Menu menu3 = new Menu();
  MenuItem menuItem11 = new MenuItem();
  public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
      jbInit();
    }
    catch(Exception e) {
      e.printStackTrace();
    }
  }


  private void jbInit() throws Exception  {
    contentPane = (JPanel) this.getContentPane();
    contentPane.setLayout(borderLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Pic");
    menu1.setLabel("File");
    menuItem1.setLabel("open");
    menuItem1.addActionListener(new Frame1_menuItem1_actionAdapter(this));
    menu2.setLabel("Edit");
    menuItem2.setLabel("toBandW");
    menuItem2.addActionListener(new Frame1_menuItem2_actionAdapter(this));
   // menuItem2.addActionListener(new Frame1_menuItem2_actionAdapter(this));
    menuItem3.setLabel("zhifangtujunyun");
    menuItem3.addActionListener(new Frame1_menuItem3_actionAdapter(this));
    //menuItem3.addActionListener(new Frame1_menuItem3_actionAdapter(this));
    menuItem4.setLabel("RGBtoGray");
    menuItem4.addActionListener(new Frame1_menuItem4_actionAdapter(this));
    menuItem5.setLabel("linearRange");
    menuItem5.addActionListener(new Frame1_menuItem5_actionAdapter(this));
    menuItem6.setLabel("addSeal");
    menuItem6.addActionListener(new Frame1_menuItem6_actionAdapter(this));
    menuItem7.setLabel("addSeals");
    menuItem7.addActionListener(new Frame1_menuItem7_actionAdapter(this));
    menuItem8.setLabel("toHalf");
    menuItem8.addActionListener(new Frame1_menuItem8_actionAdapter(this));
    menuItem9.setLabel("save");
    menuItem9.addActionListener(new Frame1_menuItem9_actionAdapter(this));
    menuItem10.setLabel("exit");
    menuItem10.addActionListener(new Frame1_menuItem10_actionAdapter(this));
    menu3.setLabel("Help");
    menuItem11.setLabel("about");
    menuItem11.addActionListener(new Frame1_menuItem11_actionAdapter(this));
    menuBar1.add(menu1);
    menuBar1.add(menu2);
    menuBar1.add(menu3);
    menu1.add(menuItem1);
    menu1.add(menuItem9);
    menu1.add(menuItem10);
    menu2.add(menuItem2);
    menu2.add(menuItem3);
    menu2.add(menuItem4);
    menu2.add(menuItem5);
    menu2.add(menuItem6);
    menu2.add(menuItem7);
    menu2.add(menuItem8);
    setMenuBar(menuBar1);
    contentPane.add(pl,BorderLayout.CENTER);
    pl.add(lb);
    menu3.add(menuItem11);
  }

   protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
      System.exit(0);
    }
  }


  void menuItem1_actionPerformed(ActionEvent e) {


   FileDialog fd=new FileDialog(this,"Open");
    fd.show();
    if(fd.getFile()!=null){
      strFile = fd.getFile();
      dir=fd.getDirectory();
    }
    ImageIcon source=new ImageIcon(dir+strFile);
    h=source.getIconHeight();
    w=source.getIconWidth();
        lb.setIcon(source);
        lb.repaint();
    //为什么下面的代码,需要对rgb,alp数组进行初始化,而不需要对pixArray进行初始化?
    rArray=new int[h][w];
    gArray=new int[h][w];
    bArray=new int[h][w];
    alpArray=new int[h][w];

    pixArray=getPixArray(dir+strFile,w,h);
    rArray=getColorArray(pixArray,w,h,R);
    gArray=getColorArray(pixArray,w,h,G);
    bArray=getColorArray(pixArray,w,h,B);
    alpArray=getColorArray(pixArray,w,h,ALPHA);

  }

 

  void menuItem4_actionPerformed(ActionEvent e) {
            Image im=Toolkit.getDefaultToolkit().getImage(dir+strFile);
            //int h=im.getHeight(null);
            //int w=im.getWidth(null);
            int[][] graArray=new int[h][w];
      //getPixArray(dir+strFile);
      //getRArray(pixArray);
      ///getGArray(pixArray);
      //getBArray(pixArray);
      //getAlpArray(pixArray);
      graArray=RGBtoGray(rArray,gArray,bArray,w,h);
      Image pic=createImage(new MemoryImageSource(w,h,arrayTransform(graArray,w,h),0,w));
      ImageIcon ic=new ImageIcon(pic);
      lb.setIcon(ic);
      lb.repaint();

  }

  public static void main(String args[])
  {
          new Frame1().show();
  }
  public int[][] getGrayArray(int[][] r,int[][] g,int[][] b,int w,int h)
  {
          int gray[][];
          gray=new int[h][w];
          for(int i=0;i<h;i++)
          {
            for(int j=0;j<w;j++)
            {
              gray[i][j] = (int) (r[i][j] * 0.3 + g[i][j] * 0.59 + b[i][j] * 0.11);
            }
          }
          return  gray;

  }
  public int[]getPixArray(String path,int w,int h)
  {
    Image im=Toolkit.getDefaultToolkit().getImage(path);
    int[] pix=new int[w*h];
    PixelGrabber pg=null;
    try{
      pg = new PixelGrabber(im, 0, 0, w, h, pix, 0,
                            w);
      if(pg.grabPixels()!=true)
        try{
          throw new java.awt.AWTException("pg error"+pg.status());
        }catch(Exception eq)
        {
                eq.printStackTrace();
                }
    } catch(Exception ex){
            ex.printStackTrace();

      }
   return pix;
  }
public int[][] getColorArray(int[] sourceArray,int w,int h,int  color)
{
       int index=0;

       int[][] array=new int[h][w];
        for(int i=0;i<h;i++)
        {
          for(int j=0;j<w;j++)
          {
            array[i][j] = (sourceArray[index] >>color*8) & 0xff;
            index++;
          }
        }
      return array;
}

public int[] linearRange(int[] grayArray,double a,double b)
{
        int[] grArray=new int[grayArray.length];
        for(int i=0;i<grayArray.length;i++)
        {
                grArray[i]=(int)(grayArray[i]*a-b);
                if(grArray[i]<0)
                grArray[i]=0;
                if(grArray[i]>255)
                grArray[i]=255;

        }
        return grArray;
}
public int[][] RGBtoGray(int[][] r,int[][] g,int[][] b,int w,int h)
{
  int[][] gray=new int[h][w];
  gray=getGrayArray(r,g,b,w,h);
  for(int i=0;i<h;i++)
  {
    for(int j=0;j<w;j++)
    {
      gray[i][j] = (255 << 24) | gray[i][j] << 16 | gray[i][j] << 8 | gray[i][j];
    }
  }
  return gray;
}
public int[] RGBtoBW(int[][] r,int[][]g,int[][]b,int p)
{
  int[][] gray=new int[h][w];
  gray=getGrayArray(r,g,b,w,h);
  for(int i=0;i<h;i++)
  {
    for (int j = 0; j < w; j++) {
      if (gray[i][j] < p) gray[i][j] = 0;
      else
        gray[i][j] = 255;
    }
  }

  return  arrayTransform(gray,w,h);
}
//直方图均匀化
public int[] zftjy(int[] gr)
{
  double[] v=new double[256];
  int pixel=w*h;
  double[] hs=new double[256];//计算每个灰度级的像素个数在整个图像中所占的百分比
  double[] hp=new double[256];//计算图像各灰度级的累计分布hp
  int[] gray=new int[gr.length];//直方图匀化后的像素矩阵
  //求出原图f的灰度直方图,
  for(int i=0;i<gr.length;i++)
  {
    v[gr[i]]++;
  }
  for(int i=0;i<256;i++)
  {
    hs[i]=v[i]/pixel;
  }
  for(int i=0;i<256;i++)
  {
    for(int j=0;j<=i;j++)
    {
      hp[i] = hp[i] + hs[j];
    }
  }
  hp[0]=0;
  for(int i=0;i<gr.length;i++)
  {
    gray[i]=(int)(255*hp[gr[i]]);
  }
  return gray;
}
  void menuItem5_actionPerformed(ActionEvent e) {
    int[] gray=arrayTransform(getGrayArray(rArray,gArray,bArray,w,h),w,h);
    gray=linearRange(gray,1.2,20);
    for(int i=0;i<gray.length;i++)
    {
      gray[i]=(255<<24)|(gray[i]<<16)|(gray[i]<<8)|gray[i];
    }
    Image im=createImage(new MemoryImageSource(w,h,gray,0,w));
    lb.setIcon(new ImageIcon(im));
    lb.repaint();
  }
 /* public void  arrayInit(String path)
  {
    pixArray=getPixArray(path,w,h);
    getRArray(pixArray,w,h);
    getGArray(pixArray,w,h);
    getBArray(pixArray,w,h);
    getAlpArray(pixArray,w,h);
  }*/

  void menuItem2_actionPerformed(ActionEvent e) {
    int[] gray=RGBtoBW(rArray,gArray,bArray,150);
    for(int i=0;i<gray.length;i++)
    {
      gray[i]=(255<<24)|(gray[i]<<16)|(gray[i]<<8)|gray[i];
    }
    Image im=createImage(new MemoryImageSource(w,h,gray,0,w));
    lb.setIcon(new ImageIcon(im));
    lb.repaint();

  }

  void menuItem3_actionPerformed(ActionEvent e) {
    int[] gray=zftjy(arrayTransform(getGrayArray(rArray,gArray,bArray,w,h),w,h));
       // gray=linearRange(gray,1.2,20);
        for(int i=0;i<gray.length;i++)
        {
          gray[i]=(255<<24)|(gray[i]<<16)|(gray[i]<<8)|gray[i];
        }
        Image im=createImage(new MemoryImageSource(w,h,gray,0,w));
        lb.setIcon(new ImageIcon(im));
        lb.repaint();

  }
 public void getSealDimension(String path)
 {
   ImageIcon source=new ImageIcon(path);
    sealH=source.getIconHeight();
    sealW=source.getIconWidth();
 }
 public void  sealImgInit()
 {

 }
 public int[] arrayTransform(int[][] original,int w,int h)
 {
   int[] array=new int[w*h];
   int index=0;
   for(int i=0;i<h;i++)
   {
     for(int j=0;j<w;j++)
     {
       array[index]=original[i][j];
       index++;
     }
   }
   return array;
 }
 public int[][] arrayTransform(int[] original,int w,int h)
 {
   int[][] array=new int[h][w];
   int index=0;
   for(int i=0;i<h;i++)
   {
     for(int j=0;j<w;j++)
     {
       array[i][j]=original[index];
       index++;
     }
   }
   return array;
 }
public int[][] addSeal(int[][] source,int[][] seal,int srcW,int srcH,int sealW,
                      int sealH,int Xoffset,int Yoffset)
 {
   int[][] des=new int[srcH][srcW];
   //分五个部分处理印章和原图像的像素 上,左 印章 右 下
   //处理印章上面部分的原图像像素数组
   for(int i=0;i<Yoffset;i++)
   {
     for(int j=0;j<srcW;j++)
     {
       des[i][j]=source[i][j];
     }
   }
   //处理印章左边部分的原图像像素
  /* for(int i=Yoffset;i<Yoffset+sealH;i++)
   {
     for(int j=0;j<Xoffset;j++)
     {
       des[i][j]=source[i][j];
     }
   }
   //处理印章右边部分原图像的像素
   for(int i=Yoffset;i<Yoffset+sealH;i++)
   {
     for(int j=Xoffset+sealW;j<srcW;j++)
     {
       des[i][j]=source[i][j];
     }
   }*/
   //处理印章下面原图像的像素数组
   for(int i=Yoffset+sealH;i<srcH;i++)
  {
    for(int j=0;j<srcW;j++)
    {
      des[i][j]=source[i][j];
    }
  }
  //处理印章部分的像素
  int indexH=0;
  //System.out.print(seal[10][133]);
  for(int i=Yoffset;i<Yoffset+sealH;i++)
  {
    int indexW=0;
    for(int j=Xoffset;j<Xoffset+sealW;j++)
    {
      des[i][j]=seal[indexH][indexW];
      indexW++;
    }
    indexH++;
  }
  int width=Xoffset+sealW/2;
  boolean sign=false;

  //在印章图像上得到圆形轨迹
  //处理印章图像左边
  int[] traceX1=new int[sealH];
  int[] traceX2=new int[sealH];

  for(int i=0;i<sealH;i++)
  {

    traceX1[i]=(int)(Xoffset+sealW/2-Math.pow((Math.pow(sealH/2,2)-Math.pow(sealH/2-i,2)),0.5));
    traceX2[i]=(int)(Xoffset+sealW/2+Math.pow((Math.pow(sealH/2,2)-Math.pow(sealH/2-i,2)),0.5));
    //System.out.println(traceX[i]);
  }
  int index=0;
  for(int i=Yoffset;i<Yoffset+sealH;i++)
  {
    for(int j=0;j<traceX1[index];j++)
    {
      des[i][j]=source[i][j];

    }
    for(int k=traceX2[index];k<srcW;k++)
    {
      des[i][k]=source[i][k];
    }
    index++;
   }
   //处理印章右边部分(得到圆形印章)

 return des;
 }
  void menuItem6_actionPerformed(ActionEvent e) {
        FileDialog fd=new FileDialog(this,"open seal");
        //fd.setFilenameFilter(new dirFilter());
        fd.show();
        if(fd.getFile()!=null){
          strSealFile = fd.getFile();
         sealDir=fd.getDirectory();
          }
        ImageIcon source=new ImageIcon(sealDir+strSealFile);
        sealH=source.getIconHeight();
        sealW=source.getIconWidth();

        sealRArray=new int[sealH][sealW];
        sealGArray=new int[sealH][sealW];
        sealBArray=new int[sealH][sealW];

        System.out.print(sealH+":"+sealW);

        sealPixArray=getPixArray(sealDir+strSealFile,sealW,sealH);

        System.out.println(sealPixArray.length);

        sealRArray=getColorArray(sealPixArray,sealW,sealH,R);
        sealGArray=getColorArray(sealPixArray,sealW,sealH,G);
        sealBArray=getColorArray(sealPixArray,sealW,sealH,B);
        int[][] src=new int[h][w];
        int[][] sel=new int[sealH][sealW];
        int[] des=new int[h*w];

        src=arrayTransform(pixArray,w,h);
        sel=arrayTransform(sealPixArray,sealW,sealH);
        System.out.println(sealPixArray[0]);
        System.out.print(sel[0][0]);
        des=arrayTransform(addSeal(src,sel,w,h,sealW,sealH,300,400),w,h);
        Image im=createImage(new MemoryImageSource(w,h,des,0,w));
        //lb.setSize(w/2,h/2);
        lb.setIcon(new ImageIcon(im));
        lb.repaint();

  }

  void menuItem7_actionPerformed(ActionEvent e) {
        String[] srcFiles=null;
        JFileChooser fc=new JFileChooser();
        fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        fc.showDialog(this,"open");
        System.out.print(fc.getCurrentDirectory());
        String temp=fc.getCurrentDirectory().toString();
        sort(temp);
       }
       public ArrayList getDirectory(String directory)
       {
         File file=new File(directory);
         if (!file.isDirectory()) return null;
         ArrayList files=new ArrayList();
         files.add(directory);
         String[] _files=file.list();
         String tmp=null;
         for (int i=0; i<_files.length; i++)
         {
           tmp=directory+"//"+_files[i];
           if (getDirectory(tmp)!=null) files.addAll(getDirectory(tmp));
         }
         return files;
       }
     public void sort(String directory)
       {
         ArrayList arr=getDirectory(directory);
         Object[] files=arr.toArray();
         Arrays.sort(files,new Comparator(){public int compare(Object obj1,Object obj2) { return ((String)obj1).length()-((String)obj2).length();}});
         for (int i=0; i<files.length; i++)
           System.out.println(files[i]);
       }

  void menuItem8_actionPerformed(ActionEvent e) {
   int hh=h/2;
   int ww=w/2;
   int[][] rr=new int[hh][ww];
   int[][] gg=new int[hh][ww];
   int[][] bb=new int[hh][ww];
   int[] pp=new int[hh*ww];
   for(int i=0;i<hh;i++)
   {
     for(int j=0;j<ww;j++)
     {
       rr[i][j]=rArray[i*2][j*2];
       gg[i][j]=gArray[i*2][j*2];
       bb[i][j]=bArray[i*2][j*2];
     }
     /*
     rr[i]=rArray[i*2];
     gg[i]=gArray[i*2];
     bb[i]=bArray[i*2];*/
   }
   int[] r=arrayTransform(rr,ww,hh);
   int[] g=arrayTransform(gg,ww,hh);
   int[] b=arrayTransform(bb,ww,hh);
   for(int i=0;i<hh*ww;i++)
   {
     pp[i]=(255<<24)|(r[i]<<16)|(g[i]<<8)|b[i];
   }
   Image im=createImage(new MemoryImageSource(ww,hh,pp,0,ww));
   lb.setIcon(new ImageIcon(im));
   lb.repaint();
  }

  void menuItem9_actionPerformed(ActionEvent e) {
    Icon ic=lb.getIcon();
    //lb.getGraphics().copyArea(0,0);
    //ImageIO.
    //lb.getGraphics().
    /*Image img=lb.createImage(w,h);
    Graphics gr=img.getGraphics();
    gr.drawImage(lb.getIcon(),0,0,null);
    RepaintManager rm=RepaintManager.currentManager(this);
    lb.setBackground(Color.red);
    lb.setForeground(Color.BLUE);
    lb.repaint();*/
    ImageIcon ii=(ImageIcon)ic;
    Image src=ii.getImage();
    //Image src=rm.getOffscreenBuffer(lb,w,h);
    //Image src=(Image)ic;
    int ww=src.getWidth(null);
    int hh=src.getHeight(null);
    BufferedImage bi=new BufferedImage(ww,hh,BufferedImage.TYPE_INT_BGR);
    bi.getGraphics().drawImage(src,0,0,ww,hh,null);
    try{
      FileOutputStream out = new FileOutputStream(dir + "newfile.jpg");
      JPEGImageEncoder je = JPEGCodec.createJPEGEncoder(out);
      je.encode(bi);
    }catch(Exception ex){}

  }

  void menuItem10_actionPerformed(ActionEvent e) {
//this.exi
    System.exit(0);
  }

  void menuItem11_actionPerformed(ActionEvent e) {
  about ab=new about();
  ab.setSize(200,200);
  ab.show();
 
  }
}


class Frame1_menuItem1_actionAdapter implements java.awt.event.ActionListener {
  Frame1 adaptee;

  Frame1_menuItem1_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.menuItem1_actionPerformed(e);
  }
}
class Frame1_menuItem4_actionAdapter implements java.awt.event.ActionListener {
  Frame1 adaptee;

  Frame1_menuItem4_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.menuItem4_actionPerformed(e);
  }
}

class Frame1_menuItem5_actionAdapter implements java.awt.event.ActionListener {
  Frame1 adaptee;

  Frame1_menuItem5_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.menuItem5_actionPerformed(e);
  }
}

class Frame1_menuItem2_actionAdapter implements java.awt.event.ActionListener {
  Frame1 adaptee;

  Frame1_menuItem2_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.menuItem2_actionPerformed(e);
  }
}

class Frame1_menuItem3_actionAdapter implements java.awt.event.ActionListener {
  Frame1 adaptee;

  Frame1_menuItem3_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.menuItem3_actionPerformed(e);
  }
}

class Frame1_menuItem6_actionAdapter implements java.awt.event.ActionListener {
  Frame1 adaptee;

  Frame1_menuItem6_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.menuItem6_actionPerformed(e);
  }
}
class dirFilter implements FilenameFilter {

//private String extension;

/*public dirFilter(String extension) {
this.extension = extension;
} */

public boolean accept(File file,String str) {
if(file.isFile()) {
return false;
}
return true;
}
}

class Frame1_menuItem7_actionAdapter implements java.awt.event.ActionListener {
  Frame1 adaptee;

  Frame1_menuItem7_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.menuItem7_actionPerformed(e);
  }
}

class Frame1_menuItem8_actionAdapter implements java.awt.event.ActionListener {
  Frame1 adaptee;

  Frame1_menuItem8_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.menuItem8_actionPerformed(e);
  }
}

class Frame1_menuItem9_actionAdapter implements java.awt.event.ActionListener {
  Frame1 adaptee;

  Frame1_menuItem9_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.menuItem9_actionPerformed(e);
  }
}

class Frame1_menuItem10_actionAdapter implements java.awt.event.ActionListener {
  Frame1 adaptee;

  Frame1_menuItem10_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.menuItem10_actionPerformed(e);
  }
}
class about extends JFrame
{
  public about()
  {
    super("about pic");
    JLabel lb = new JLabel("<html>Pic1.0 write by tomcatlee 2004.7"+
                           "<p Color=red>tomcatlee2003@yahoo.com.cn</p></html");
    JPanel contentPane = (JPanel)this.getContentPane();
    contentPane.add(lb);
  }
}

class Frame1_menuItem11_actionAdapter implements java.awt.event.ActionListener {
  Frame1 adaptee;

  Frame1_menuItem11_actionAdapter(Frame1 adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.menuItem11_actionPerformed(e);
  }
}

0 0

相关博文

我的热门文章

img
取 消
img