3.基础类
来源:互联网 发布:淘宝联盟导出excel后 编辑:程序博客网 时间:2024/05/18 01:23
wwjBasics
还是先上代码。
package wwjTest;import java.awt.BorderLayout;import java.awt.Dimension;import javax.swing.JFrame;import gov.nasa.worldwind.Model;import gov.nasa.worldwind.WorldWind;import gov.nasa.worldwind.avlist.AVKey;import gov.nasa.worldwind.awt.WorldWindowGLCanvas;import gov.nasa.worldwind.util.StatusBar;import gov.nasa.worldwindx.examples.LayerPanel;public class wwjBasics extends JFrame { private static final long serialVersionUID = 1L; protected WorldWindowGLCanvas worldWindowGLCanvas;//声明画布 protected StatusBar statusBar;//声明状态栏 protected Model modelEarth;//声明地球模型 protected LayerPanel layerPanel;//声明图层面板 public wwjBasics () { //按指定尺寸创建画布 Dimension canvasSize = new Dimension(800,600); this.worldWindowGLCanvas = new WorldWindowGLCanvas(); this.worldWindowGLCanvas.setPreferredSize(canvasSize); //创建地球模型,并于画布绑定,显示到窗体中心 this.modelEarth = (Model) WorldWind.createConfigurationComponent(AVKey.MODEL_CLASS_NAME); this.worldWindowGLCanvas.setModel(this.modelEarth); this.add(this.worldWindowGLCanvas,BorderLayout.CENTER); //创建状态栏,并显示到窗体底部 this.statusBar = new StatusBar(); this.add(this.statusBar, BorderLayout.PAGE_END); this.statusBar.setEventSource(worldWindowGLCanvas); //创建图层面板,并于画布绑定,显示到窗体左边 this.layerPanel = new LayerPanel(this.worldWindowGLCanvas); this.add(layerPanel, BorderLayout.WEST); //设置显示窗体 this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setVisible(true); this.setSize(canvasSize); } public static void main(String[] args) { String strTitle = "World Wind Java 基础类"; wwjBasics wwjRun = new wwjBasics(); wwjRun.setTitle(strTitle); }}
运行结果如下所示:代码很简单不做过多描述。
代码很简单不做过多描述。`
阅读全文
0 0
- 3.基础类
- 类基础
- 类基础
- 类基础
- 类:基础
- 类:基础
- 类 基础
- 基础类
- 3.Java基础:常见IO----->File类
- [Java]3.Java基础类库
- java基础--1.基础-3.进制
- J2SE基础:1.类和对象基础
- python基础学习九:类基础
- 3.ASP基础
- 3.JavaWeb基础 Scriptlet
- 3.hibernate基础配置
- 3.Python基础
- 3. SQL语言基础
- 5 Ways To Boost Typing Speed And Accuracy
- Python 窗体(tkinter)输入文本框(entry)
- 线性单元
- CentOS常用命令
- 树的遍历
- 3.基础类
- 【Spring】共性问题(九)
- 关于迷宫求解及其最优解的问题
- 继承再剖析
- POJ 3690 Constellations 笔记
- c++重载、覆盖、隐藏,重点隐藏的问题
- Ansible安装
- hibernate 实体的3种状态
- Learning Techniques