ImageVerifierCode 换一换
格式:DOCX , 页数:11 ,大小:456.49KB ,
资源ID:5341588      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/5341588.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(在jbuilderX中建立mapxtreme java471应用学习笔记.docx)为本站会员(b****3)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

在jbuilderX中建立mapxtreme java471应用学习笔记.docx

1、在jbuilderX中建立mapxtreme java471应用学习笔记在jbuilderX中建立mapxtreme java4.7应用学习笔记(bj_meng)2004-05-151、 配置环境a) 安装mapXtreme java 4.7,最好使用自带的jdkb) 配置jbx环境i. 引入mapXtreme java的lib:进入jbx的tools的configure libraries中。ii. 选择new,Define a new library specification iii. Name为mapinfotreme,Location为User Home,然后单击Add按钮,把Pro

2、gram FilesMapInfoMapXtreme-4.7.0lib目录下的client、common和server中的jar全部加入,记住一定要选择文件。iv. 单击OK完成引入 c) 配置jbx的jdk:进入jbx的tools的configure jdks中,选择new:d) 指向mapinfo自带的jdk目录e) 设置结果如下图:f) 其他2、 在jbx中创建一个project,命名为barChant。3、 新建一个classBarChartLocalRend,放在package barchart中。4、 进入barChart的properties中。5、 在Paths的Require

3、d Libraries中将上面创建的mapinfotreme加入工程中。6、 BarChartLocalRend的代码如下(mapinfo官方提供的):package barchart;import java.lang.*;import java.util.*;import java.util.Hashtable;import java.awt.*;import com.mapinfo.mapj.*;import com.mapinfo.graphics.Rendition;import com.mapinfo.graphics.RenditionImpl;import java.util.A

4、rrayList;import com.mapinfo.dp.analysis.AnalysisTableDescHelper;import com.mapinfo.legend.AnalysisLayerChartLegend;import javax.swing.*;import com.mapinfo.mapj.BarChartProperties;import com.mapinfo.beans.vmapj.VisualMapJ;import com.mapinfo.beans.tools.MapToolBar;public class BarChartLocalRend extend

5、s JFrame public FeatureLayer world;public ArrayList cols;public VisualMapJ myMap;public Hashtable ht;BarChartLocalRend()tryMapToolBar myMapToolBar = new MapToolBar();myMap = new VisualMapJ();myMap.getMapJ().loadMapDefinition(c:program filesmapinfoMapXtreme-4.7.0examplesserverdatalocalworld.mdf);worl

6、d = (FeatureLayer)myMap.getMapJ().getLayers().get(World Countries);/columns in world layer to analyzecols = new ArrayList(3);cols.add(Pop_0_14);cols.add(Pop_1994);cols.add(Pop_65Plus);/create AnalysisTableDescHelper from world layersAnalysisTableDescHelper atdh = new AnalysisTableDescHelper(world.ge

7、tTableDescHelper(),cols, AnalysisLayerType.SIDE_BY_SIDE_BAR_CHART);AnalysisLayer analysis = (AnalysisLayer)myMap.getMapJ().getLayers().insertLayer(world.getDataProviderRef(),atdh, 0, World Population Analysis);BarChartProperties bcp = (BarChartProperties)analysis.getAnalysisProperties();Rendition re

8、d = new RenditionImpl();red.setValue(Rendition.FILL, Color.red);Rendition yellow = new RenditionImpl();yellow.setValue(Rendition.FILL, Color.yellow);Rendition orange = new RenditionImpl();orange.setValue(Rendition.FILL, Color.orange);ht = new Hashtable();ht.put(Pop_0_14, new Integer(0);ht.put(Pop_19

9、94, new Integer(1);ht.put(Pop_65Plus, new Integer(2);AnalysisLayerChartLegend legend = new AnalysisLayerChartLegend(bcp,ht);legend.setRenditionAt(red, 0);legend.setRenditionAt(yellow, 1);legend.setRenditionAt(orange, 2);bcp.setWidth(15);this.setSize(800,500);this.getContentPane().add(myMapToolBar, B

10、orderLayout.NORTH);this.getContentPane().add(myMap, BorderLayout.CENTER);this.getContentPane().add(legend, BorderLayout.EAST);this.setVisible(true);this.show();catch (Exception e)System.out.println(Error);e.printStackTrace();public static void main (String args)BarChartLocalRend bclr = new BarChartL

11、ocalRend(); /end Class BarChartLocalRend7、 在make project前,还需要设置8、 进入Configurations中,单击new9、 如下图设置即可:10、 现在project就可以编译运行了。11、 今天先写到这里,祝大家好运。2004-05-17网上流行的mapdemo范例,是个非常不错的学习例子,可惜不能正常运行。经调试,总于找到了原因。只要修改C:Program FilesMapInfoMapXtreme-4.7.0Tomcat-4.1webappsmapdemoWEB-INF目录下的web.xml文件即可。以下是要修改的部分(红色部分

12、): filetype gst 濡傛灉鏁版嵁婧愪负file锛屾寚瀹氬湴鍥惧畾涔夌被鍨嬫槸gst杩樻槸mdf锛岄粯璁负mdf mdfpath 濡傛灉鏁版嵁婧愪负file锛屽湴鍥惧畾涔夌被鍨嬩负mdf锛屾寚瀹氬湴鍥惧畾涔夋枃浠惰矾寰?/description gstpath c:program filesmapinfoMapXtreme-4.7.0Tomcat-4.1webappsmapdemomaps 濡傛灉鏁版嵁婧愪负file锛屽湴鍥惧畾涔夌被鍨嬩负gst锛屾寚瀹歵ab鏂囦欢瀛樻斁璺 緞 mapdef china.gst 璁惧畾鍦板浘瀹氫箟鍚嶇锛屽 鏋滄槸gst鏂囦欢鎴杕df鏂囦欢锛屽繀椤诲姞涓婃墿灞曞悕 gst鏂囦欢蹇呴鍐欑粷瀵硅矾寰勪笖gst涓巘ab鏂囦欢蹇呴鍦悓涓鐩 綍涓嬪苟涓攇st涓嶆彁渚涘 鏁版嵁搴撳浘灞傜殑鏀 寔 文件类型采用gst,并指向gst所在的目录。至于是否需要在jbx中重新编译则没有考证,不过本人使用的class已经在jbx中编译过。之前本人已经把class反编译(居于开源的思想,应该不算侵权),需要加入j2ee.jar包,同时附上。乱码没有解决,请那位仁兄靓妹帮忙搞定。效果图如下:

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1