您的位置:首页 >> 编程开发 >> Java >> Java基础 >> Eclipse >> 正文
RSS
 

Eclipse简介和插件开发

http://www.rdxx.com 04年12月06日 12:12 Blog 我要投稿

关键词: 插件 , Eclipse , 开发 , IP

            id="myplugin.actionSet">
         <menu
               label="我的空间"
               id="sampleMenu">
            <separator
                  name="sampleGroup">
            </separator>
         </menu>
         <action
               label="天气预报"
               icon="icons/sample.gif"
               class="myplugin.actions.SampleAction"
               tooltip="Hello, Eclipse world"
               menubarPath="sampleMenu/sampleGroup"
               toolbarPath="sampleGroup"
               id="myplugin.actions.SampleAction">
         </action>
         
 

此时在运行时工作台,我们的菜单已经改变。


2.2用VisualEditer制作天气预报对话框
虽然菜单是天气预报,但是我们需要的不是hello Eclispe对话框,我们需要的是告诉我们天气的对话框,当然需要我们从头开始,于是我们需要重新构建一个对话框,这个就需要 Visual Editor来帮助进行界面的开发(关于Visual Editer参考《Build GUIs with the Eclipse Visual Editor project》) 。我们将使用Visual Editor实现一个Swing对话框,当然只用VE做一个对话框是有点大材小用,但是作为起点,已经合适了。

首先参考《Build GUIs with the Eclipse Visual Editor project》构建Visual Editer开发环境,当一切准备齐全,鼠标右键点击PackgeExpoler中的 "muplugin.actions"java文件,从弹出式菜单中选择 new->other->VisualClass,新建一个可视化的类,弹出界面如下图:

选择next,然后在name中输入WeatherDialog,这个就是我们用来显示天气预报的dialog

选择该对话框的超类为javax.swing.JDiaog,点击Finish按钮。等待一段时间后,我们的对话框就基本生成了,鼠标点击左上角图标,直接输入天气预报就是对话框的标题,同时 我们可以看到左侧的VisualEditor面板。

 
 
标签: 插件 , Eclipse , 开发 , IP 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站