📄 simpletoolframe.java
字号:
/**
* 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);
this.getContentPane().add(mapToolBar1, BorderLayout.NORTH);
this.getContentPane().add(visualMapJ1, BorderLayout.CENTER);
visualMapJ1.getMapJ().loadGeoset("D:/柳州地图/firemap.gst", "D:/柳州地图", null);
visualMapJ1.getMapJ().saveMapDefinition("C:/aaa.mdf");
//mapToolBar1.add(simpleRulerMapTool);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -