ÔÚEcpliseÖÐǶÈëNASA World Wind Java SDK
¡¾IT168 ¼¼ÊõÎÄÕ¡¿
WWJ SDK ÊÇÒ»ÖÖ¹¹½¨ÔÚ Java OpenGL (JOGL) À©Õ¹Ö®É쵀 3D
ͼÐεØÇòÒÇ¡£WWJ Àà²ã´Î½á¹¹µÄºËÐÄÊÇ GLCanvas µÄ×ÓÀà WorldWindowGLCanvas¡£¶ø GLCanvas ÊÇÒ»¸ö
Abstract Window Toolkit (AWT) ×é¼þ¡£
¡¡¡¡WWJ ¶Ô AWT µÄÒÀÀµÐÔ¶ÔÓÚÏëÔÚ Eclipse
Ó¦ÓóÌÐòÖÐʹÓà WWJ µÄ GIS ¿ª·¢ÈËÔ±À´½²ÊÇÒ»¸öÕÏ°¡£Äú¿ÉÄÜÖªµÀ£¬Eclipse ʹÓÃÁË Standard Widget Toolkit
(SWT)£¬¶ø SWT Óë AWT ²»¼æÈÝ¡£¶øÇÒ£¬AWT ºÍ JOGL ½ôÃܼ¯³É£¬ÕâʹµÃºÜÄÑ´Ó AWT ÒÆÖ²µ½ SWT¡£
¡¡¡¡½øÈë SWT/AWT ÇÅÁº
¡¡
¡¡SWT ÒòÄܹ»¿ìËÙ¹¹½¨¿ÉÉìËõºÍÇ¿´óµÄ¿Í»§¶ËÓ¦ÓóÌÐò¶øѸËÙ³ÉΪһÖÖ¶¥¼¶´°¿Ú¹¤¾ß°ü¡£SWT ºÍ AWT/Swing ¶¼ÔÚÕùµ± Java
Óû§½çÃ濪·¢µÄȨÍþ¡£ÓÉÓÚËüÃǸ÷ÓÐÀû±×£¬Eclipse »ù½ð»áÒâʶµ½ÓбØÒª¹¹½¨Ò»×ùÔÊÐíÔÚ SWT ÖÐǶÈë AWT/Swing ×é¼þµÄ
SWT/AWT ÇÅÁº¡£´Ó Eclipse version 3.0 ¿ªÊ¼£¬Õâ×ùÇÅÁº¾ÍÒѳÉΪ SWT µÄÒ»²¿·Ö¡£Õâ¸öµÄ API λÓÚ
org.eclipse.swt.awt °üÖС£
¡¡¡¡SWT/AWT ÇÅÁºÊÇͨ¹ý SWT ½«»ùÓÚ AWT µÄ World Wind 3D Globe ǶÈëµ½ Eclipse Ó¦ÓóÌÐòÖÐËùÐèµÄ¹Ø¼ü×é¼þ¡£
¡¡¡¡WWJ 3D Earth µÄ Eclipse ÊÓͼ
¡¡¡¡½èÖú SWT ÖÐÒÑ´æÔÚµÄ SWT/AWT ÇÅÁº£¬¿ÉÒÔÇáËɵؽ« WWJ 3D Earth ǶÈëµ½ÄúµÄÊÓͼÖС£Çåµ¥ 1 ÑÝʾִÐдËÈÎÎñµÄ»ù±¾ Eclipse ÊÓͼ£º
¡¡¡¡Çåµ¥ 1. WWJ 3D Earth µÄ»ù±¾ Eclipse ÊÓͼ
1
package
org.eclipse.plugin.worldwind.views;
2
_
3
4
/**
5
* World Wind Eclipse RCP Earth View
6
*
@author
Vladimir Silva
7
*
8
*/
9
public
class
EarthView
extends
ViewPart
10
{
11
private
static
final
Logger logger
=
Logger.getLogger(EarthView.
class
);
12
13
public
static
final
String ID
=
EarthView.
class
.getName();
14
final
WorldWindowGLCanvas world
=
new
WorldWindowGLCanvas();
15
16
17
/**
18
* Initialize the default WW layers
19
*/
20
static
{
21
initWorldWindLayerModel();
22
}
23
24
public
EarthView() {
25
Ïà¹ØÎĵµ£º
¶þ·Ö²éÕÒ£º
¶þ·Ö²éÕÒ±ÈÏßÐÔ²éÕÒÊý¶ÈÒªºÃºÜ¶à£¬ÓÈÆäÊǶԴóÊý×éÀ´Ëµ¸üΪÏÔÖø£¬¾ÍÏñÊDzÂ×ÖÓÎÏ·Ò»Ñù
²Â×ÖÓÎÏ·£º
¶þ·Ö²éÕҵķ½·¨ºÍÎÒÃÇСʱºòÍæµÄ²Â×ÖÓÎÏ·ÊÇÒ»ÑùµÄ¡£ÔÚÕâ¸öÓÎÏ·ÀïÃ棬ÓÐÒ»¸öСÅóÓÑ»áÈÃÄã²ÂËýÕýÔÚÏëµÄÒ»¸ö1ÖÁ100Ö®¼äµÄÊý£¬
Äã²ÂÁËÒ»¸öÊýÒÔºó£¬Ëý»á¸æËßÄãÈýÖÖÑ¡ÔñÖеÄÒ»¸ö£ºÄã² ......
1.ʹÓÃJFrameµÄenableEventsºÍprocessWindowEvent
//Frame1.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Frame1 extends JFrame {
public Frame1() {
enableEvents(AWTEvent.WINDOW_EVENT_MASK);
this.setSize(ne ......
ʹÓà java ½øÐÐÎļþ¿½±´ ÏàÐźܶàÈ˶¼»áÓÃ,,²»¹ýЧÂÊÉÏÊÇ·ñ×îºÃÄØ?
×î½ü¿´ÁË¿´NIO¾ö¶¨ÊÔÒ»ÊÔ java NIO µ½µ×ÓÐʲôÐÔÄܵÄÌáÉý.
µÚÒ»ÖÖ·½·¨:¹ÅÀϵķ½Ê½
public static long forJava(File f1,File f2) throws Exception{
long time=new Date().getTime();
int length=2097152;
FileInp ......
ÏÈÉùÃ÷һϣ¬ÌâÄ¿Ô³öÓÚ£ºhttp://gocom.primeton.com/modules/newbb/item60284_60284.htm
JVMÊÇJava³ÌÐòµÄÔËÐл·¾³£¬Òò´Ë¶ÔÓÚJVMµÄÕÆÎÕÓÐÖúÓÚÀí½âJava³ÌÐòµÄÖ´ÐÐÒÔ¼°±àд£¬ÓÈÆäÊÇÔËÐÐʱÅöµ½µÄһЩ¹îÒìÎÊÌ⣬ÄÇôÔõôÑùÄÜ¿¼²ì×Ô¼º¶ÔÓÚJVM¹Ø¼ü֪ʶµãµÄÕÆÎÕÇé¿ö£¬°ïÖúѧϰJVM»úÖÆÄØ£¬ÔÚÕâƪblogÖÐÀ´Ì½ÌÖÏ¡£
¶ÔÓÚJava³ÌÐò¶øÑ ......
ListenerÊÇServletµÄ¼àÌýÆ÷£¬Ëü¿ÉÒÔ¼àÌý¿Í»§¶ËµÄÇëÇó¡¢·þÎñ¶ËµÄ²Ù×÷µÈ¡££¨Í¨¹ý¼àÌýÆ÷£¬¿ÉÒÔ×Ô¶¯¼¤·¢Ò»Ð©²Ù×÷£¬±ÈÈç¼àÌýÔÚÏßµÄÓû§µÄÊýÁ¿¡£µ±Ôö¼ÓÒ»¸öHttpSessionʱ£¬¾Í¼¤·¢
sessionCreated(HttpSessionEvent se)·½·¨£¬ÕâÑù¾Í¿ÉÒÔ¸øÔÚÏßÈËÊý¼Ó1¡££©
Servlet ¼àÌýÆ÷ÓÃÓÚ¼àÌýһЩÖØҪʼþµÄ·¢Éú£¬¼àÌýÆ÷¶ÔÏóÔÚÊÂÇé·¢ÉúÇ°¡¢·¢ ......