⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simpletoolframe.java~1~

📁 基于JAVA的电子地图程序,包括自定义地力工具制做,地图平台为MAPXTREME4.7.1
💻 JAVA~1~
字号:
/**
* Copyright 2000 MapInfo Corporation
* You are free to use this code in your applications, but you may not
* redistribute the source code without this notice.
*/

import javax.swing.*;
import java.awt.*;
import com.mapinfo.beans.vmapj.*;
import com.mapinfo.beans.tools.*;

/**
 * We need to create a Frame that will house the VisualMapj to display our
 * vector map data.  We also will add a MapJToolBar and then add our custom
 * built tool to it
 */
public class SimpleToolFrame extends JFrame {
	BorderLayout borderLayout1 = new BorderLayout();
  SimpleRulerMapTool simpleRulerMapTool = new SimpleRulerMapTool();
	MapToolBar mapToolBar1 = new MapToolBar();
	VisualMapJ visualMapJ1 = new VisualMapJ();

	public SimpleToolFrame() {
		super();
		try  {
			jbInit();
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}

	private void jbInit() throws Exception {
		this.getContentPane().setLayout(borderLayout1);
		this.setSize(new Dimension(628, 544));
		visualMapJ1.setShowToolTips(true);
    // Add the Map tool bar control
		this.getContentPane().add(mapToolBar1, BorderLayout.NORTH);
		// Add VisualMapJ
		this.getContentPane().add(visualMapJ1, BorderLayout.CENTER);
		// Load a geoset into VMapJ
		visualMapJ1.getMapJ().loadGeoset("s:\\asia.gst", "s:\\", null);
		// Add our custom Tool to the MapJ tool bar
		mapToolBar1.add(simpleRulerMapTool);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -