??xml version="1.0" encoding="utf-8" standalone="yes"?>日韩和欧美的一区,国产精品久久97,成人免费福利视频http://www.aygfsteel.com/jayliu/category/1271.htmlWe are extremely fortunate not to know precisely the kind of world we live in zh-cnTue, 27 Feb 2007 12:38:16 GMTTue, 27 Feb 2007 12:38:16 GMT60SWT/Jface开发入门指?十一) http://www.aygfsteel.com/jayliu/archive/2005/11/06/18399.htmlq?/dc:creator>q?/author>Sun, 06 Nov 2005 05:09:00 GMThttp://www.aygfsteel.com/jayliu/archive/2005/11/06/18399.htmlhttp://www.aygfsteel.com/jayliu/comments/18399.htmlhttp://www.aygfsteel.com/jayliu/archive/2005/11/06/18399.html#Feedback3http://www.aygfsteel.com/jayliu/comments/commentRss/18399.htmlhttp://www.aygfsteel.com/jayliu/services/trackbacks/18399.htmlJFace中的工具条和菜单

前一节中我们单介l了一?/SPAN>Action。其实所谓的Action是一个最常用的事Ӟ举个例子来说Q对于一个按钮来说它可以有多个事Ӟ比如按键Q焦点,鼠标Q等{等{吧Q但是实际上在用程序的时候,我们最兛_的,是按下去这个按钮会发生什么,q个其实是所谓的Action。如果大家以前做q?/SPAN>swing/awt变成的话Q应该对Action不会陌生?/SPAN>

?/SPAN>JFace里面Q一?/SPAN>Action可以对应多个GUI对象Q这些对象就是所谓的Contribution Item。比如我们在一般程序里面很常见的“文件”菜单,下面都会有“新建”,“保存”等{。同时我们可以在工具条上攄相应的按钮,那么q些都是有相同的功能Q在JFace里面我们可以只写一?/SPAN>ActionQ然后把它映到不同?/SPAN>ContributionItem去,而不必ؓ每个部g都写一串处理事件?/SPAN>

我们下面q是通过一个简单的例子来说明,?/SPAN>JFace中怎么使用菜单和工hq两U最基本也是最有用?/SPAN>Contribution Item?/SPAN>

我们q个E序写得很傻Q就是一个光U秃的窗口上做了一个菜单和工具条按钮,功能也只有一个,是每次点一下,弹Z个输入框来问你名字是什么,然后昄一?/SPAN>Hello, xxx之类的?/SPAN>

首先我们q是来写一?/SPAN>Actionc:

 1 
 2 public class SayHiAction extends Action {
 3     private Shell shell;
 4 
 5     public SayHiAction(Shell shell) {
 6         super();
 7         this.shell = shell;
 8         this.setText("Say&Hi@Ctrl+H");
 9     }
10 
11     @Override
12     public void run() {
13         InputDialog input = new InputDialog(shell, "Input your name",
14                 "Please input your name here:"nullnull);
15         if (input.open() == Window.OK) {
16             MessageDialog.openInformation(shell, "Hello""Hello, "
17                     + input.getValue() + "!");
18         }
19 
20     }
21 
22 }
23 



代码D?/SPAN> 17

q只是一个很单的Actionc,没有太多可说的?/SPAN>

然后我们创徏一?/SPAN>ApplicationWindowc:

 1 
 2 public class Hiyou extends ApplicationWindow {
 3 
 4     private SayHiAction hiaction;
 5     public Hiyou(Shell parentShell) {
 6         super(parentShell);
 7         hiaction=new SayHiAction(getShell());
 8         addMenuBar();
 9         addToolBar(SWT.FLAT | SWT.WRAP);
10     }
11 
12     @Override
13     protected ToolBarManager createToolBarManager(int style) {
14         ToolBarManager toolbar=new ToolBarManager();
15         toolbar.add(hiaction);
16         return toolbar;
17     }
18 
19     @Override
20     protected MenuManager createMenuManager() {
21         MenuManager menubar=new MenuManager();
22         MenuManager fileMenu=new MenuManager("&File");
23         fileMenu.add(hiaction);
24         menubar.add(fileMenu);
25         return menubar;
26     }
27 
28     /**
29      * @param args
30      */
31     public static void main(String[] args) {
32         Hiyou window=new Hiyou(null);
33         window.setBlockOnOpen(true);
34         window.open();
35         Display.getCurrent().dispose();
36     }
37 
38 }
39 

 

代码D?/SPAN> 18

大家可能已经注意CQ在q里面我们重载了createMenuManager?/SPAN>createToolBarManager两个ҎQ它们的用途就和名字一P一个是用来创徏菜单的,一个是用来创徏工具条的。重载了q两个方法以后,通过在构造函C调用addMenuBar?/SPAN>addToolBar让工h和菜单显C出来?/SPAN>

q里值得一提的?/SPAN>MenuManager?/SPAN>ToolBarManagerc,如果大家M?/SPAN>API文档的话会发现它们都是所谓的contribution managerQ实CIConntributionManager接口Q,你可以通过q些contribution manager来实现对特定lg的管理(d删除{等Q?/SPAN>

具体到菜单的创徏Q看了我们上面的代码很明白了,q接调用相?/SPAN>MenuManager?/SPAN>addҎ?/SPAN>actiond上就可以了?/SPAN>JFace会自动找到这?/SPAN>Action?/SPAN>getTextҎ讄菜单的文字。如果是有好几层菜单Q那么只要在重新new一?/SPAN>MenuManagerd到已有的MenuManager里面可以了。就象前面代码中的:

menubar.add(fileMenu);



至于工具条就更简单了Q创Z?/SPAN>ToolBarManager然后直接add对应?/SPAN>Action可以了?/SPAN>

d图标

如果菜单只是文字q没有什么,如果你的工具条都是文字是不是会显得干巴巴的?其实只要我们?/SPAN>ActionImageDescriptor可以了Q比如你可以自己M个图标保存到Action的包下面Q我M一?/SPAN>hi.gifQ,然后?/SPAN>Action的构造函数改写成q样Q?BR>

public SayHiAction(Shell shell) {
        
super();
        
this.shell = shell;
        
this.setText("Say&Hi@Ctrl+H");
        
this.setImageDescriptor(ImageDescriptor.createFromFile(this.getClass(),
                
"hi.gif"));
    }



大家注意最后一句话Q就是ؓaction讄图标的。然后再q行一下就会发现菜单和工具栏都有图标了?/SPAN>

l束?o:p>

q一pd的文章陆陆箋l写C天,也就写完了。回头看一下,虽然内容都很显Q不q我觉得?/SPAN>swt?/SPAN>JFace中文资料~Z的今天,可能也可以给大家带来一些启q。今后我q会写一?/SPAN>eclipseq_开发的文章Q大家可以登陆到我的blogQ?/SPAN>http://blog.csdn.net/jayliuQ查看?/SPAN>

另外大家也可以登陆到在中?/SPAN>EclipseC֌Q?/SPAN>http://www.eclipseworld.orgQ,在那里你也可以找到很多的帮助和支持,当然Q你也可以在那里扑ֈ我?/SPAN>



]]>
SWT/Jface开发入门指??http://www.aygfsteel.com/jayliu/archive/2005/10/14/15537.htmlq?/dc:creator>q?/author>Fri, 14 Oct 2005 09:42:00 GMThttp://www.aygfsteel.com/jayliu/archive/2005/10/14/15537.htmlhttp://www.aygfsteel.com/jayliu/comments/15537.htmlhttp://www.aygfsteel.com/jayliu/archive/2005/10/14/15537.html#Feedback5http://www.aygfsteel.com/jayliu/comments/commentRss/15537.htmlhttp://www.aygfsteel.com/jayliu/services/trackbacks/15537.htmlJFace中的事g模式

大家好,因ؓ工作的事情搞了一个多月,现在l于暂时安定下来了。这一pd的文章我也会l箋往下写?/SPAN>

在这一节中Q我会向大家介绍JFace中的事g模式。其实我怿q篇文章的读者应该大部分都会接触eclipseQ这样可能也会接触过eclipse的插件开发。就是没有接触过Q大家也可能会有?/SPAN>eclipse里面新徏工程的时候出于各U原因(比如好奇心)点了plug-in project的时候吧。其实作Z个程序员来讲Q保持好奇是很重要的。如果你大概看过一?/SPAN>plug-in project的结构,虽然可能不能全部理解Q但是我怿也应该对Action之类有一些了解。我们这一节主要就是围l?/SPAN>Action来写的。ؓ了增加可L,我们首先介绍几个名词Q这些名词都可以?/SPAN>eclipse的文档中扑ֈ?/SPAN>

什么是Action

JFace中的一?/SPAN>Action可以单地理解成一?SPAN style="COLOR: blue">命o。那么它?SPAN style="COLOR: blue">事g有什么关pdQ比如说我点了一个菜单,那么点击本n是一个事Ӟ但是q个事g的媄响就是相应的命o被执行了。大家日怋用的一些Y件比?/SPAN>Office都是有菜单和工具栏的Q而一个菜单项和一个工h可能执行的是同一个命令。比?/SPAN>Word里面要新Z个文档的话可以通过?/SPAN>文g?/SPAN>菜单下的?/SPAN>新徏?/SPAN>实现Q也可以通过点击工具栏上相应的图标实现。这个新建地功能本n?/SPAN>JFace里面是可以?/SPAN>Action来实现的?/SPAN>

?/SPAN>JFace里面Q?/SPAN>Action可以兌到菜单,工具条,以及按钮Q也是ButtonQ。当然关于如何关联,我们会在后面向大家详l介l?/SPAN>

Action?/SPAN>JFace里面的定义是一个接?/SPAN>org.eclipse.jface.action.IAction。当然实际上你写E序的时候必自己来实现q个接口Q写qActioncL?/SPAN>

IAction里面最重要的方法是run()Q它也是事g触发以后执行的代码。其他的Ҏ都是一些辅助性的ҎQ不是我们要x的重炏Vؓ了能够将_֊集中在我们所x的事情上Q通常我们不是实现IAction接口Q而是通过l承org.eclipse.jface.action.Actionq个抽象cL实现Action。下面我们通过一个例子来说明Action的用法?BR>

Hello,Action!

首先我们先不用L面,先定义一个最单的ActioncR?BR>

 1 public class HelloAction extends Action{
 2     private Shell shell;
 3     
 4     public HelloAction(Shell shell) {    
 5         super("&Hello",Action.AS_PUSH_BUTTON);
 6         this.shell=shell;
 7     }
 8 
 9 
10     @Override
11     public void run() {
12         MessageDialog.openInformation(shell, "Hello""Hello,Action!");
13     }
14     
15 }
16 


代码D?/SPAN> 15

q段代码其实应该q是很好L的。带参的构造函数带q来一?/SPAN>Shell实例Q?/SPAN>run()Ҏ说明了这?/SPAN>Action的功能就是显CZ个对话框。第5行中的代码调用了父类的构造函敎ͼ其中W一个参数是Action对应的文本,前面?/SPAN>&W号表明?/SPAN>H是热键,而第二个参数则是一个风格参数。如果大家l向后看的话Q就会发现这?/SPAN>Action被附加在了一个按钮上面,而按钮上昄的文本就?/SPAN>HelloQ如果你定义的风g?/SPAN>AS_PUSH_BUTTON而是AS_RADIO_BUTTON的话׃发现按钮已经不是一个纯_的按钮了,而是一个单选钮。相应的其他风格可以参照Javadoc?BR>

 1 
 2 public class HelloJface extends ApplicationWindow {      
 3     public HelloJface(Shell shell) {
 4         super(shell);
 5     }
 6       @Override
 7     protected Control createContents(Composite parent) {
 8           HelloAction action=new HelloAction(parent.getShell());
 9           ActionContributionItem aci=new ActionContributionItem(action);
10           aci.fill(parent);
11           return parent;
12    }  
13    /**
14     * @param args
15     */
16    public static void main(String[] args) {
17 
18        HelloJface demo = new HelloJface(null);
19        demo.setBlockOnOpen(true);
20        demo.open();
21        Display.getCurrent().dispose();
22 
23    }
24 }


代码D?/SPAN> 16

和前面一节的代码相比Q我们只是修改了createContentsҎ。首先创Z一?/SPAN>HelloAction的实例,然后又创Z一?/SPAN>ActionContributionItem的实例,最后调用了q个实例?/SPAN>fillҎ按钮添加到H口中,q就是全部了。是不是很简单呢Q程序运行出来的效果如下图:

r_helloaction.JPG

?/SPAN> 16

可能看了q个例子Q你会认?/SPAN>ActionContributionItemq个c表C的是一个按钮了。但是实际上q不是的Q它在图形界面上表示成什么样子,随着不同?/SPAN>fill调用又有不同。在下一节中Q我会向大家深入介绍Contribution Item以及JFace中的菜单Q工h{的应用。这一节就到这里结束了Q因为刚刚换了工作环境,有很多事情需要去做,所以写得比较短Q请大家见谅Q)?/SPAN>

 



]]>
在WebLogic中用Hibernatehttp://www.aygfsteel.com/jayliu/archive/2005/07/11/7516.htmlq?/dc:creator>q?/author>Mon, 11 Jul 2005 11:17:00 GMThttp://www.aygfsteel.com/jayliu/archive/2005/07/11/7516.htmlhttp://www.aygfsteel.com/jayliu/comments/7516.htmlhttp://www.aygfsteel.com/jayliu/archive/2005/07/11/7516.html#Feedback1http://www.aygfsteel.com/jayliu/comments/commentRss/7516.htmlhttp://www.aygfsteel.com/jayliu/services/trackbacks/7516.html阅读全文

]]>
J2SE5.0新特?--变长参数(Varargs)http://www.aygfsteel.com/jayliu/archive/2005/05/22/5055.htmlq?/dc:creator>q?/author>Sun, 22 May 2005 08:46:00 GMThttp://www.aygfsteel.com/jayliu/archive/2005/05/22/5055.htmlhttp://www.aygfsteel.com/jayliu/comments/5055.htmlhttp://www.aygfsteel.com/jayliu/archive/2005/05/22/5055.html#Feedback0http://www.aygfsteel.com/jayliu/comments/commentRss/5055.htmlhttp://www.aygfsteel.com/jayliu/services/trackbacks/5055.html变长参数Q?/SPAN>VarargsQ?/SPAN>

与泛型一P变长参数?/SPAN>C++中有?/SPAN>Java中没有的一U语aҎ,在过d果我们想向一个函C递可变数量的函数Q就必须首先这些参数放入一个数l中Q然后将数组传递给函数。就如同下面所作的一P

Object[] arguments = { 640, "kb", "anybody", "Bill Gates" };

String result = MessageFormat.format(

                   "{3}:{0,number,integer}{1} ought to be enough for {2}  ",

                   arguments);

 

?/SPAN>J2SE5.0中,参数仍然是被攑օ一个数l中传给对应的方法,但是不同的是Q你不再需要手动的创徏数组Q而是只需要将那些参数|列出来Q其他的工作p拟机替你完成。所以现在我们可以这样写Q?/SPAN>

String result = MessageFormat.format(

                                     "{3}:{0,number,integer}{1} ought to be enough for {2}  ",

                                     640, "kb", "anybody", "Bill Gates");

 

我们通过一个示例函数来说明使用变长参数函数的定义。这个函数打印出一个hȝ几条狗的名字?/FONT>

private void printDogNames(String... dogs)

{

         System.out.println("I have " + dogs.length + " dogs:");

         for(String dogname:dogs)

         {

                   System.out.println(dogname);

         }

}

 

事实上变长参?/SPAN>dogs是一个数l?/SPAN>

一个函数的参数中只能有一个变长参敎ͼ所以类g面的定义?SPAN style="COLOR: red">不合?/SPAN>的:

private void printDogNames(String... dogs,float... dogage)

 

如果军_把函数参数设|ؓ可变长度的,你必L到这样一U情况,是调用的程序很可能会不l你传Q何的参数Q这个时候作为参数的数组length?/SPAN>0Q而这在语法上是完全合法的Q所以你必须在函数定义中考虑到这U情c?/SPAN>

 



]]>
SWT/Jface开发入门指南(三) http://www.aygfsteel.com/jayliu/archive/2005/05/19/4875.htmlq?/dc:creator>q?/author>Thu, 19 May 2005 09:33:00 GMThttp://www.aygfsteel.com/jayliu/archive/2005/05/19/4875.htmlhttp://www.aygfsteel.com/jayliu/comments/4875.htmlhttp://www.aygfsteel.com/jayliu/archive/2005/05/19/4875.html#Feedback1http://www.aygfsteel.com/jayliu/comments/commentRss/4875.htmlhttp://www.aygfsteel.com/jayliu/services/trackbacks/4875.html阅读全文

]]>
SWT/Jface开发入门指南(二)http://www.aygfsteel.com/jayliu/archive/2005/05/18/4460.htmlq?/dc:creator>q?/author>Wed, 18 May 2005 02:35:00 GMThttp://www.aygfsteel.com/jayliu/archive/2005/05/18/4460.htmlhttp://www.aygfsteel.com/jayliu/comments/4460.htmlhttp://www.aygfsteel.com/jayliu/archive/2005/05/18/4460.html#Feedback4http://www.aygfsteel.com/jayliu/comments/commentRss/4460.htmlhttp://www.aygfsteel.com/jayliu/services/trackbacks/4460.html?/SPAN>Hello, world!开始了?/SPAN>Display?/SPAN>Shell

在这一节中Q我们从前面所列D出来?/SPAN>Hello, world!E序开始对swtq行一些初步的探烦。所谓的初步是指Q我们会介绍~写swtE序的基本思\Q以及对两个重要的类:Display?/SPAN>Shell作一些介l?BR>

因ؓq一节和前一节是分成两个部分贴出来的Q所以我仍然?/SPAN>Hello, world!的代码段在下面列出来Q?/SPAN>

 1package swtjfacesample;
 2
 3import org.eclipse.swt.SWT;
 4import org.eclipse.swt.widgets.Display;
 5import org.eclipse.swt.widgets.Shell;
 6import org.eclipse.swt.widgets.Text;
 7
 8public class HelloSwt {
 9    /**
10     * Hello,world!
11     * 
12     * @param args
13     */

14       public static void main(String[] args) {
15        Display display = new Display();
16        Shell shell = new Shell(display);
17        
18        Text helloText = new Text(shell, SWT.CENTER);
19        helloText.setText("Hello,World!");
20        helloText.pack();
21        
22        shell.pack();
23        shell.open();
24
25        while (!shell.isDisposed()) {
26            if (!display.readAndDispatch()) {
27                display.sleep();
28            }

29        }

30        display.dispose();
31
32    }

33}


代码D?/EM> 2

q段E序虽然很简单,但是它反映了我们书写swtE序的步骤,q些步骤是:

1.      创徏一?/SPAN>Display对象

2.      创徏一个或者多?/SPAN>Shell对象Q你可以认ؓShell代表了程序的H口?/SPAN>

3.      ?/SPAN>Shell内创建各U部ӞwidgetQ?/SPAN>

4.      对各个部件进行初始化Q外观,状态等Q,同时为各U部件的事g创徏监听器(listenerQ?/SPAN>

5.      调用Shell对象?/SPAN>open()Ҏ以显C窗?/SPAN>

6.      各种事gq行监听q处理,直到E序发出退出消?/SPAN>

7.      调用Display对象?/SPAN>dispose()Ҏ以结束程序?/SPAN>

 

?/SPAN>Hello,world!E序中,Z让程序更加简单,我们没有创徏事g监听器,在以后的内容中会q行专门介绍?/SPAN>

现在让我们稍微深入一些,看一下这?/SPAN>Display,Shell有什么作用以至于我们每个E序都必L它们存在?/SPAN>

Display:与操作系l沟通的桥梁

我们在前面说q,每个swtE序在最开始都必须创徏一?/SPAN>Display对象?/SPAN>Display对象起什么作用呢Q它?/SPAN>swt与操作系l沟通的一座桥梁。它负责swt和操作系l之间的通信。它?/SPAN>swt/JFace的各U调用{化ؓpȝ的底层调用,控制操作pȝ?/SPAN>swt分配的资源。同时我们也可以通过Display对象得到操作pȝ的一些信息?/SPAN>

Display是一?/SPAN>?/SPAN>q后工作?/SPAN>?/SPAN>Q它?/SPAN>swt/JFace提供支持Q但是你q不能够从某个用L面中看到它的影子?/SPAN>

在前面的Hello,world!E序中,我们可以看到构徏一?/SPAN>Display对象是和普通的Java对象一样通过构造函数实现的。它为实现图形界面准备了最基本的条件。而在E序l束时我们必L式地调用dispose() Ҏ来释攄序运行中所获得的资源。一般来_一个程序只需要一?/SPAN>Display对象Q当然没有h止你创建多?/SPAN>Display对象。但是在swt?/SPAN>javadoc中,我们可以看到关于q个问题一些描qͼ

“Applications which are built with SWT will almost always require only a single display. In particular, some platforms which SWT supports will not allow more than one active display. In other words, some platforms do not support creating a new display if one already exists that has not been sent the dispose() message.?o:p>

Display有着众多的方法,我们不可能一一介绍。在q里只挑选几个可能会比较常用的作一些简单介l?/SPAN>

l         setData()?/SPAN>getData()Q这一对函数允许我们ؓDisplay对象讑֮一些数据,setData()的参Ckey?/SPAN>valuecM于我们在使用Map对象?/SPAN>key?/SPAN>value的含义?/SPAN>

l         getShells()得到兌到该Display对象的所有没?/SPAN>dispose?/SPAN>Shell对象

l         getCurrent()得到与用户交互的当前U程

l         readAndDispatch()得到事gq且调用对应的监听器q行处理

l         sleep(){待事g发生

Shell:H口

一?/SPAN>Shell对象是一个窗口。你可以在上面放|各U部件创Z富的囑Ş界面?/SPAN>

我们都知道窗口有很多U,比如H口有可以调整大的Q有不可以的Q有的没有最大化最化按钮。这些窗体的特征?/SPAN>swt中被成ؓ风格Q?/SPAN>styleQ。一个窗体的风格可以用一个整数进行定义。这些风格的定义?/SPAN>org.eclipse.swt.SWT中?/SPAN>

Shell对象可用的风格包括:BORDER, CLOSE, MIN, MAX, NO_TRIM, RESIZE, TITLE , PLICATION_MODAL, MODELESS, PRIMARY_MODAL,S YSTEM_MODAL

q些风格我们不作一一介绍Q你可以从他们字面意义看Z些含义来Q当然也可以参考对应的javadoc?/SPAN>

我们可以在一?/SPAN>Shell的构造函C定义它的风格Q比如在前面?/SPAN>Hello,world!E序中,我们可以q样定义Shell?/SPAN>

 

Shell shell = new Shell(display,SWT.CLOSE | SWT.SYSTEM_MODAL);

 

最后得到的H体没有最大化和最化按钮Qƈ且大是固定不变的?/SPAN>

因ؓswtq行于各U^C上,而这些^C的窗口管理器千差万别Q所以所有这些风格都不是肯定可以实现的。在swt?/SPAN>javadoc中,q被UCؓ暗示Q?/SPAN>hintsQ?/SPAN>

Shell对象的方法大都和GUI有关Q比?/SPAN>setEnabled()讑֮了窗体是否能够和用户q行交互Q?/SPAN>setVisble()讑֮了窗体是否可见,setActive()窗体设为当前的zdH口?/SPAN>

我们可以?/SPAN>open()Ҏ打开一个窗体,close()Ҏ关闭一个窗体?/SPAN>

本节讨论?/SPAN>Display?/SPAN>Shell的一些概念,q是我们以后q一步了?/SPAN>swt的基。在下一节中Q我介l各U部ӞwidgetQ的用法Q所谓部Ӟ是指文本框,标签{?/SPAN>UI实体?/SPAN>



]]>
SWT/Jface开发入门指南(一Q?/title><link>http://www.aygfsteel.com/jayliu/archive/2005/05/17/4389.html</link><dc:creator>q?/dc:creator><author>q?/author><pubDate>Tue, 17 May 2005 00:45:00 GMT</pubDate><guid>http://www.aygfsteel.com/jayliu/archive/2005/05/17/4389.html</guid><wfw:comment>http://www.aygfsteel.com/jayliu/comments/4389.html</wfw:comment><comments>http://www.aygfsteel.com/jayliu/archive/2005/05/17/4389.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jayliu/comments/commentRss/4389.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jayliu/services/trackbacks/4389.html</trackback:ping><description><![CDATA[     摘要: SWT/Jface开发入门指?写在前面的话 l于军_提vW来写一关于swt和JFace~程的文章。在开始之前,我想先介l一下你能够从将要出现的q一pd文章里得C么,以及更重要的Q你不能得到什么。我们的旉是如此之重要Q以至于我们很难容忍把它费在自׃兛_的事情上?因ؓ我刚开始写Q所以到底这些文章会分成几次发布出来Q也很难讌Ӏ但是我心里大体有这样一个提UӀ也是_我打介l以下方?..  <a href='http://www.aygfsteel.com/jayliu/archive/2005/05/17/4389.html'>阅读全文</a><img src ="http://www.aygfsteel.com/jayliu/aggbug/4389.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jayliu/" target="_blank">q?/a> 2005-05-17 08:45 <a href="http://www.aygfsteel.com/jayliu/archive/2005/05/17/4389.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ejb3.0的几Ҏ著特?/title><link>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4241.html</link><dc:creator>q?/dc:creator><author>q?/author><pubDate>Thu, 12 May 2005 13:38:00 GMT</pubDate><guid>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4241.html</guid><wfw:comment>http://www.aygfsteel.com/jayliu/comments/4241.html</wfw:comment><comments>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4241.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jayliu/comments/commentRss/4241.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jayliu/services/trackbacks/4241.html</trackback:ping><description><![CDATA[<P class=MsoList style="MARGIN: 0cm 0cm 11pt 75pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 75.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman"><FONT size=2>1.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">          </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><FONT size=2>元数据的引入Q以注释的Ş式表C元数据Q取代了q去大量的配|文?/FONT></SPAN></P> <P class=MsoList style="MARGIN: 0cm 0cm 11pt 75pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 75.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman"><FONT size=2>2.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">          </SPAN></FONT></SPAN></SPAN><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">各种</SPAN><SPAN lang=EN-US><FONT face="Times New Roman">enterprise bean</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的定义都只需要定义一?/SPAN><SPAN lang=EN-US><FONT face="Times New Roman">POJO</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US><FONT face="Times New Roman">POJI</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配合元数据即可完?/SPAN></FONT></P> <P class=MsoList style="MARGIN: 0cm 0cm 11pt 75pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 75.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman"><FONT size=2>3.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">          </SPAN></FONT></SPAN></SPAN><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">回调机制Q?/SPAN><SPAN lang=EN-US><FONT face="Times New Roman">callback</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q也是用普通的Ҏ加以一定的注释Q代替了原有?/SPAN><SPAN lang=EN-US><FONT face="Times New Roman">ejbCreate</FONT></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">之类的方?/SPAN></FONT></P> <P class=MsoList style="MARGIN: 0cm 0cm 11pt 75pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 75.0pt"><FONT face="Times New Roman"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT size=2>4.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">          </SPAN></SPAN></SPAN><SPAN lang=EN-US><FONT size=2>AOP</FONT></SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><FONT size=2>概念的引入:允许在类定义中和其他cMҎ法进行拦?/FONT></SPAN></P> <P class=MsoList style="MARGIN: 0cm 0cm 11pt 75pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 75.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore"><FONT face="Times New Roman"><FONT size=2>5.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">          </SPAN></FONT></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><FONT size=2>依赖注入Q允讔R过d特定注释向属性注入所依赖的对?BR><BR>ȝ来说Qejb3.0相对于ejb2.0来说实现更加单了Q甚x认ؓ比目前的一些轻量解决ҎQ比如spring framework之类Q还要简单?/FONT></SPAN></P><img src ="http://www.aygfsteel.com/jayliu/aggbug/4241.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jayliu/" target="_blank">q?/a> 2005-05-12 21:38 <a href="http://www.aygfsteel.com/jayliu/archive/2005/05/12/4241.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>J2SE5.0新特性示?--循环语句的增?/title><link>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4202.html</link><dc:creator>q?/dc:creator><author>q?/author><pubDate>Thu, 12 May 2005 02:57:00 GMT</pubDate><guid>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4202.html</guid><wfw:comment>http://www.aygfsteel.com/jayliu/comments/4202.html</wfw:comment><comments>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4202.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jayliu/comments/commentRss/4202.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jayliu/services/trackbacks/4202.html</trackback:ping><description><![CDATA[<H1 style="MARGIN: 11pt 0cm"><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial"><FONT style="BACKGROUND-COLOR: #e5e5e5" size=3>循环语句的增?/FONT></SPAN></H1><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">之前cMq样的语句:</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"> <TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: silver; MARGIN: auto auto auto 59.4pt; BORDER-LEFT: medium none; WIDTH: 378pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellSpacing=0 cellPadding=0 width=504 border=1> <TBODY> <TR style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"> <TD style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 378pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" vAlign=top width=504> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2>void cancelAll(Collection c) { <o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">    </SPAN>for (Iterator i = c.iterator(); i.hasNext(); ) {<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">        </SPAN>TimerTask tt = (TimerTask) i.next();<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">        </SPAN>tt.cancel();<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">    </SPAN>}<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'">}</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P></TD></TR></TBODY></TABLE></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">以后可以q样写:</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P> <P class=MsoBodyText style="MARGIN: 0cm 0cm 11pt 54pt"><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"> <TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: silver; MARGIN: auto auto auto 59.4pt; BORDER-LEFT: medium none; WIDTH: 378pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellSpacing=0 cellPadding=0 width=504 border=1> <TBODY> <TR style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"> <TD style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 378pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" vAlign=top width=504> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2>void cancelAll(Collection c) {<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">    </SPAN>for (Object o : c)<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">   </SPAN><SPAN style="mso-spacerun: yes">     </SPAN>((TimerTask)o).cancel();<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2>}<o:p></o:p></FONT></SPAN></P></TD></TR></TBODY></TABLE></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><FONT color=#000000><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">有时候我们可能写L代码Q?/SPAN></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"> <TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: silver; MARGIN: auto auto auto 59.4pt; BORDER-LEFT: medium none; WIDTH: 378pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellSpacing=0 cellPadding=0 width=504 border=1> <TBODY> <TR style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"> <TD style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 378pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" vAlign=top width=504> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2>List suits = ...;<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2>List ranks = ...;<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2>List sortedDeck = new ArrayList();<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2>for (Iterator i = suits.iterator(); i.hasNext(); )<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">    </SPAN>for (Iterator j = ranks.iterator(); j.hasNext(); )<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">        </SPAN>sortedDeck.add(new Card(i.next(), j.next()));<o:p></o:p></FONT></SPAN></P></TD></TR></TBODY></TABLE></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN lang=EN-US><o:p><FONT face="Courier New" color=#0000ff> </FONT></o:p></SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><FONT color=#000000><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">q段代码不会按照我们设想的那么工作,因ؓ每次W二?/SPAN><SPAN lang=EN-US><FONT face="Courier New">for</FONT></SPAN></SPAN><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">语句的执行都会引?/SPAN><SPAN lang=EN-US><FONT face="Courier New">i.next()</FONT></SPAN></SPAN><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">的执行,实际上我们没有达到对</SPAN><SPAN lang=EN-US><FONT face="Courier New">i</FONT></SPAN></SPAN><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">q行遍历的目的,而且可能会引起一?/SPAN><SPAN lang=EN-US><FONT face="Courier New">NoSuchElementException</FONT></SPAN></SPAN><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">异常?/SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></SPAN></FONT></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><FONT color=#000000><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">解决的一个办法是改写成如下代码:</SPAN></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"> <TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: silver; MARGIN: auto auto auto 59.4pt; BORDER-LEFT: medium none; WIDTH: 378pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellSpacing=0 cellPadding=0 width=504 border=1> <TBODY> <TR style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"> <TD style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 378pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" vAlign=top width=504> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2>for (Iterator i = suits.iterator(); i.hasNext(); ) {<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">    </SPAN>Suit suit = (Suit) i.next();<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">    </SPAN>for (Iterator j = ranks.iterator(); j.hasNext(); )<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">        </SPAN>sortedDeck.add(new Card(suit, j.next()));<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'">}</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P></TD></TR></TBODY></TABLE></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN lang=EN-US><o:p><FONT face="Courier New" color=#0000ff> </FONT></o:p></SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><FONT color=#000000><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">利用</SPAN><SPAN lang=EN-US><FONT face="Courier New">java</FONT></SPAN></SPAN><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">语言的新Ҏ,我们可以q样写:</SPAN></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"> <TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: silver; MARGIN: auto auto auto 59.4pt; BORDER-LEFT: medium none; WIDTH: 378pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellSpacing=0 cellPadding=0 width=504 border=1> <TBODY> <TR style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"> <TD style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 378pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" vAlign=top width=504> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2>for (Suit suit : suits)<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">    </SPAN>for (Rank rank : ranks)<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2><SPAN style="mso-spacerun: yes">        </SPAN>sortedDeck.add(new Card(suit, rank));<o:p></o:p></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p><FONT size=2> </FONT></o:p></SPAN></P></TD></TR></TBODY></TABLE></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><SPAN lang=EN-US><o:p><FONT face="Courier New" color=#0000ff> </FONT></o:p></SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><span id="wmqeeuq" class=CharCharCharCharCharCharCharCharCharCharCharCharCharCharCharChar><FONT color=#000000><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'">q段代码是不是很漂亮Q?/SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></FONT></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"></SPAN></FONT></P><img src ="http://www.aygfsteel.com/jayliu/aggbug/4202.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jayliu/" target="_blank">q?/a> 2005-05-12 10:57 <a href="http://www.aygfsteel.com/jayliu/archive/2005/05/12/4202.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>J2SE5.0新特性示?--原生cd的autoboxing和auto-unboxinghttp://www.aygfsteel.com/jayliu/archive/2005/05/12/4205.htmlq?/dc:creator>q?/author>Thu, 12 May 2005 02:57:00 GMThttp://www.aygfsteel.com/jayliu/archive/2005/05/12/4205.htmlhttp://www.aygfsteel.com/jayliu/comments/4205.htmlhttp://www.aygfsteel.com/jayliu/archive/2005/05/12/4205.html#Feedback1http://www.aygfsteel.com/jayliu/comments/commentRss/4205.htmlhttp://www.aygfsteel.com/jayliu/services/trackbacks/4205.html 

原生cd?/SPAN>autoboxing?/SPAN>auto-unboxing

我们知道Q在Java中,int,long{原生类型不是一个承自Object的类Q所以相应的Q有很多操作我们都不能利用原生类型操作,比如惌把一个整数放入到一个集合中Q我们必首先创Z?/SPAN>Integer对象Q然后再这个对象放入到集合中。当我们从集合中取数的时候,取出来的是一?/SPAN>Integer对象Q因此不能直接对它用加减乘除等q算W,而是必须?/SPAN>Integer.intValue()取到相应的值才可以Q这Lq程UC?/SPAN>boxing?/SPAN>unboxing?/SPAN>

J2SE5.0支持autoboxing?/SPAN>auto-unboxingQ也是说我们以后不需要再手动地做q些boxing?/SPAN>unboxing操作了,java语言会替我们完成。具体可以参照下面的CZQ?/SPAN>

List<Integer> intList=new ArrayList<Integer>();

intList.add(2);

intList.add(new Integer(5));

int i=3+intList.get(0);//i=5

int j=3+intList.get(1); //j=8

 

从这一D늨序中我们可以看到Q?/SPAN>autoboxing?/SPAN>auto-unboxing为我们省掉了很多不必要的工作?/SPAN>



]]>
J2SE5.0新特性示?--枚Dhttp://www.aygfsteel.com/jayliu/archive/2005/05/12/4206.htmlq?/dc:creator>q?/author>Thu, 12 May 2005 02:57:00 GMThttp://www.aygfsteel.com/jayliu/archive/2005/05/12/4206.htmlhttp://www.aygfsteel.com/jayliu/comments/4206.htmlhttp://www.aygfsteel.com/jayliu/archive/2005/05/12/4206.html#Feedback0http://www.aygfsteel.com/jayliu/comments/commentRss/4206.htmlhttp://www.aygfsteel.com/jayliu/services/trackbacks/4206.html枚D

在过去,我们必须用整型常C替枚举,随着J2SE 5.0的发布,q样的方法终于一M复返了?/SPAN>

一个简单的枚Dcd定义如下Q?/SPAN>

public enum Weather

{

       SUNNY,RAINY,CLOUDY

}

 

枚D可以用在switch语句中:

Weather weather=Weather.CLOUDY;

switch(weather)

{

       case SUNNY:

              System.out.println("It's sunny");

              break;

       case CLOUDY:

              System.out.println("It's cloudy");

              break;

       case RAINY:

              System.out.println("It's rainy");

              break;

}

 

枚Dcd可以有自q构造方法,不过必须是私有的Q也可以有其他方法的定义Q如下面的代码:

public enum Weather {

    SUNNY("It is sunny"),

    RAINY("It is rainy"),

    CLOUDY("It is cloudy");

 

    private String description;

 

    private Weather(String description) {

       this.description=description;

    }

   

    public String description() {

       return this.description;

    }

}

 

下面一D代码是对这个枚丄一个用:

for(Weather w:Weather.values())

{

    System.out.printf(                                                  "Description of %s is \"%s\".\n",w,w.description());

}

 

Weather weather=Weather.SUNNY;

System.out.println(weather.description() + " today");

 

如果我们有一个枚丄型,表示四则q算Q我们希望在其中定义一个方法,针对不同的值做不同的运,那么我们可以q样定义Q?/SPAN>

public enum Operation {

     PLUS, MINUS, TIMES, DIVIDE;

 

        // Do arithmetic op represented by this constant

        double eval(double x, double y){

            switch(this) {

                case PLUS:   return x + y;

                case MINUS:  return x - y;

                case TIMES:  return x * y;

                case DIVIDE: return x / y;

            }

            throw new AssertionError("Unknown op: " + this);

        }

}

 

q样写的问题是你如果没有最后一行抛出异常的语句Q编译就无法通过。而且如果我们惌d一个新的运,必L刻记着要在eval中添加对应的操作Q万一忘记的话׃抛出异常?/SPAN>

J2SE 5.0提供了解册个问题的办法Q就是你可以?/SPAN>eval函数声明?/SPAN>abstractQ然后ؓ每个值写不同的实玎ͼ如下所C:

 

public enum Operation {

     PLUS   { double eval(double x, double y) { return x + y; } },

     MINUS  { double eval(double x, double y) { return x - y; } },

     TIMES  { double eval(double x, double y) { return x * y; } },

     DIVIDE { double eval(double x, double y) { return x / y; } };

 

     abstract double eval(double x, double y);

}

 

q样避免了上面所说的两个问题Q不q代码量增加了一些,但是随着今后各种Java开?/SPAN> IDE的改q,代码量的问题应该会被淡化?/SPAN>



]]>
J2SE5.0新特性示?--静态引?/title><link>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4207.html</link><dc:creator>q?/dc:creator><author>q?/author><pubDate>Thu, 12 May 2005 02:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4207.html</guid><wfw:comment>http://www.aygfsteel.com/jayliu/comments/4207.html</wfw:comment><comments>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4207.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jayliu/comments/commentRss/4207.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jayliu/services/trackbacks/4207.html</trackback:ping><description><![CDATA[<H1 style="MARGIN: 11pt 0cm"><FONT size=3><FONT style="BACKGROUND-COLOR: #e5e5e5"><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial">静态引入(</SPAN><SPAN lang=EN-US><FONT face=Arial>static import</FONT></SPAN><SPAN style="FONT-FAMILY: 黑体; mso-ascii-font-family: Arial">Q?/SPAN><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></FONT></H1> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">在过L们要使用其他包中某类的静态变量,一般都要在前面加上对应的类名:</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P> <TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: silver; MARGIN: auto auto auto 59.4pt; BORDER-LEFT: medium none; WIDTH: 378pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellSpacing=0 cellPadding=0 width=504 border=1> <TBODY> <TR style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"> <TD style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 378pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" vAlign=top width=504> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'">double r = Math.cos(Math.PI * theta);</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P></TD></TR></TBODY></TABLE> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p><FONT size=2> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">使用静态引入,我们可以把前面的cdLQ静态引入的语句是这LQ?/SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P> <TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: silver; MARGIN: auto auto auto 59.4pt; BORDER-LEFT: medium none; WIDTH: 378pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellSpacing=0 cellPadding=0 width=504 border=1> <TBODY> <TR style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"> <TD style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 378pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" vAlign=top width=504> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2>import static java.lang.Math.PI;<o:p></o:p></FONT></SPAN></P></TD></TR></TBODY></TABLE> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p><FONT size=2> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">必须注意到这里最后不是到c?/SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'">Math,</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">而是直接C定义的变?/SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'">PI</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">?/SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">静态引入不只对静态变量,也可以针寚w态方法。此外还可以使用</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'">*</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'">Q如下面所C:</SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></FONT></P> <TABLE class=MsoTableGrid style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: silver; MARGIN: auto auto auto 59.4pt; BORDER-LEFT: medium none; WIDTH: 378pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext" cellSpacing=0 cellPadding=0 width=504 border=1> <TBODY> <TR style="mso-yfti-irow: 0; mso-yfti-lastrow: yes"> <TD style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 378pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; BACKGROUND-COLOR: transparent; mso-border-alt: solid windowtext .5pt" vAlign=top width=504> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: blue; FONT-FAMILY: 'Courier New'"><FONT size=2>import static java.lang.Math.*;<o:p></o:p></FONT></SPAN></P></TD></TR></TBODY></TABLE> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'"><o:p><FONT size=2> </FONT></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 54pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-bidi-language: AR-SA"><FONT size=2>除非我们Ҏ个静态常量(或者方法)讉K频度很大Q否则应该尽量避免用静态引入?/FONT></SPAN><SPAN lang=EN-US style="FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><o:p></o:p></SPAN></P><img src ="http://www.aygfsteel.com/jayliu/aggbug/4207.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jayliu/" target="_blank">q?/a> 2005-05-12 10:56 <a href="http://www.aygfsteel.com/jayliu/archive/2005/05/12/4207.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>J2SE5.0新特性示?--元数?/title><link>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4209.html</link><dc:creator>q?/dc:creator><author>q?/author><pubDate>Thu, 12 May 2005 02:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4209.html</guid><wfw:comment>http://www.aygfsteel.com/jayliu/comments/4209.html</wfw:comment><comments>http://www.aygfsteel.com/jayliu/archive/2005/05/12/4209.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/jayliu/comments/commentRss/4209.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/jayliu/services/trackbacks/4209.html</trackback:ping><description><![CDATA[     摘要: J2SE 5.0通过引入注释(Annotation)的概忉|加了对元数据的支持?一个@xxx形式的注释可以当成一个修饰符来用,它可以放在Q何一个修饰符可以出现的地斏Vpublic,static,final都是java语言的修饰符Q注释可以写在它们可以出现的M地方?举个例子Q可以看下面一D代码: public class AnnotationExample { &nb...  <a href='http://www.aygfsteel.com/jayliu/archive/2005/05/12/4209.html'>阅读全文</a><img src ="http://www.aygfsteel.com/jayliu/aggbug/4209.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/jayliu/" target="_blank">q?/a> 2005-05-12 10:56 <a href="http://www.aygfsteel.com/jayliu/archive/2005/05/12/4209.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>J2SE5.0新特性示?--泛型http://www.aygfsteel.com/jayliu/archive/2005/05/12/4203.htmlq?/dc:creator>q?/author>Thu, 12 May 2005 02:55:00 GMThttp://www.aygfsteel.com/jayliu/archive/2005/05/12/4203.htmlhttp://www.aygfsteel.com/jayliu/comments/4203.htmlhttp://www.aygfsteel.com/jayliu/archive/2005/05/12/4203.html#Feedback0http://www.aygfsteel.com/jayliu/comments/commentRss/4203.htmlhttp://www.aygfsteel.com/jayliu/services/trackbacks/4203.html阅读全文

]]>
վ֩ģ壺 | | | ƽ| ʦ| | Զ| | Ҿ| Т| | | ˷| | | ʯɽ| ԭ| Ͻ| | żҿ| ӯ| | պ| | | | | | | Ȫ| | | ɽ| ۩| | Ӣɽ| ҵ| | ͷ| ѭ| |