java , activex , and anfy

38
Java, ActiveX, and Java, ActiveX, and Anfy Anfy

Upload: tyme

Post on 22-Jan-2016

71 views

Category:

Documents


0 download

DESCRIPTION

Java , ActiveX , and Anfy. Java. Java Developed by Sun Object Oriented Language Compiling the source program into a special type of object code, known as Byte Code Byte Code can run on any computer with a Java Virtual Machine (JVM). JVM (Intel). Intel/ Windows PC. JVM (Sun). SPARC/ - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Java ,  ActiveX , and Anfy

Java, ActiveX, and AnfyJava, ActiveX, and Anfy

Page 2: Java ,  ActiveX , and Anfy

JavaJava

JavaJava• Developed by SunDeveloped by Sun• Object Oriented LanguageObject Oriented Language

Compiling the source program into a Compiling the source program into a special type of object code, known as special type of object code, known as Byte CodeByte Code

Byte Code can run on any computer Byte Code can run on any computer with a Java Virtual Machinewith a Java Virtual Machine (JVM) (JVM)

Page 3: Java ,  ActiveX , and Anfy

JavaJava

FlowFlow

JavaCompiler

JVM(Intel)

Intel/Windows PC

JVM(Sun)

SPARC/Solaris Workstation

Other ArchitecturesSupporting JVM

Java SourceCode

ByteCode

Page 4: Java ,  ActiveX , and Anfy

JavaJava

A Simple Java ProgramA Simple Java Program

//This program prints Welcome to Java! public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java!"); }}

Page 5: Java ,  ActiveX , and Anfy

JavaJava

public class Welcome {

public static void main(String[] args) {

System.out.println("Welcome to Java!");

} }

Method W elcome()

0 aload_0

Method void main(java.lang.String[])

0 getstatic #2 …

3 ldc #3 <String " Welcome to

Java! ">

5 invokevirtual #4 …

8 return

Source code (developed by the programmer)

Byte code (generated by the compiler for JVM

to read and interpret, not for you to understand)

Source Code

Create Source Code

Compile Source Codei.e., javac Welcome.java

Bytecode (*.class)

Saved on the disk

Page 6: Java ,  ActiveX , and Anfy

JavaJava

How to executeHow to execute

Page 7: Java ,  ActiveX , and Anfy

Java AppletJava Applet

Java applets are small Java applets are small JavaJava programs programs that get downloaded to your that get downloaded to your computer and then run from a computer and then run from a web browserweb browser when a when a web pageweb page that that uses Java is loaded.uses Java is loaded.• **.class.class

Page 8: Java ,  ActiveX , and Anfy

Java AppletJava Applet

Example (WA.java)Example (WA.java)import javax.swing.JApplet;import javax.swing.JApplet;

import java.awt.Graphics;import java.awt.Graphics;

public class WA extends JApplet {public class WA extends JApplet {

public void paint(Graphics g) {public void paint(Graphics g) {

g.drawString("Welcome to Java!",25,25);g.drawString("Welcome to Java!",25,25);

}}

}}

Page 9: Java ,  ActiveX , and Anfy

Java AppletJava Applet

Embed Java Applet in HTML (WA.html)Embed Java Applet in HTML (WA.html)<html><html>

<applet code=“WA.class”><applet code=“WA.class”>

</applet></applet>

</html></html>

Page 10: Java ,  ActiveX , and Anfy

Java AppletJava Applet

ExecutionExecution

Page 11: Java ,  ActiveX , and Anfy

JARJAR

JAR (Java Archive) JAR (Java Archive) • A platform-independent A platform-independent Data FormatData Format• Aggregating many files into oneAggregating many files into one• Multiple Multiple JavaJava appletapplets and their requisite s and their requisite

components (class files, images, and components (class files, images, and sounds) can be bundled in a sounds) can be bundled in a JARJAR file file

• Subsequently downloaded to a Subsequently downloaded to a BrowserBrowser in a single in a single HTTPHTTP transaction, improving transaction, improving the download speedthe download speed

Page 12: Java ,  ActiveX , and Anfy

ActiveXActiveX

A set of technologies from MicrosoftA set of technologies from Microsoft Providing tools for linking desktop Providing tools for linking desktop

applications to the World Wide Webapplications to the World Wide Web Using a variety of programming tools--Using a variety of programming tools--

including Java, Visual Basic, and C++--including Java, Visual Basic, and C++--developers can create interactive Web developers can create interactive Web contentcontent

Allowinh users to view Word and Excel Allowinh users to view Word and Excel documents directly in a browserdocuments directly in a browser

Page 13: Java ,  ActiveX , and Anfy

AnfyAnfy

Tool for Building Java AppletTool for Building Java Applet

Page 14: Java ,  ActiveX , and Anfy

FrontPageFrontPage and Anfyand Anfy

AnfyAnfy can output Java Appletcan output Java Applet We can paste the Applet to a HTML file by We can paste the Applet to a HTML file by

FrontPageFrontPage

Page 15: Java ,  ActiveX , and Anfy

AnfyAnfy

Includes Includes 52 applets52 applets• top effects and menu for top effects and menu for

web sitesweb sites BlogsBlogs ScreensaverScreensaver

URLURL• http://www.anfyteam.com/anj/http://www.anfyteam.com/anj/

index.htmlindex.html

Page 16: Java ,  ActiveX , and Anfy

Banner/SlideshowBanner/Slideshow

旗幟旗幟 // 幻燈片類型幻燈片類型• 三個三個 Java AppletsJava Applets• 可以提供各種圖片間的切換效果。可以提供各種圖片間的切換效果。

BOOK FLIP BOOK FLIP 書本翻頁特效書本翻頁特效 Cross FADE Banner Cross FADE Banner 交叉變換特效交叉變換特效 Mosaic Banner Mosaic Banner 馬賽克特效馬賽克特效

Page 17: Java ,  ActiveX , and Anfy

Fractals & ALifeFractals & ALife

分形分形 // 生命類型生命類型• 四個四個 Java AppletsJava Applets• 數學演算法建立的特殊圖形效果數學演算法建立的特殊圖形效果

FLOZOIDS FLOZOIDS 飄浮物特效飄浮物特效 IFS FRACTALS IFS FRACTALS 分形樹特效分形樹特效 LIFE2D LIFE2D 二維生命特效二維生命特效 MANDELBROT FRACTAL MANDELBROT FRACTAL 幾何樹特效幾何樹特效

Page 18: Java ,  ActiveX , and Anfy

Image EffectsImage Effects 圖像效果類型圖像效果類型

• 包含十四個包含十四個 Java AppletsJava Applets 可以套用精彩和驚人的特殊可以套用精彩和驚人的特殊效果。效果。

Stretch Stretch 拉扯拉扯 Weather Weather 天氣天氣 Zoom and PanZoom and Pan BUMPBUMP 光照投影特效光照投影特效

Page 19: Java ,  ActiveX , and Anfy

Image EffectsImage Effects

圖像效果類型圖像效果類型• 包含十四個包含十四個 Java AppletsJava Applets

DEFORM DEFORM 變形變形 FIREWORKSFIREWORKS 煙火煙火 HUE ROTATOR HUE ROTATOR 循環色調循環色調 LAKELAKE 湖面倒影特效湖面倒影特效 ZOOM ROTATORZOOM ROTATOR

Page 20: Java ,  ActiveX , and Anfy

Image EffectsImage Effects

圖像效果類型圖像效果類型• 包含十四個包含十四個 Java AppletsJava Applets

LENS LENS 透鏡特效透鏡特效 ROTROT 縮放旋轉特效縮放旋轉特效 SNOW SNOW 雪片特效雪片特效 WARP WARP 彎曲變形特效彎曲變形特效 WATER WATER 水面漣漪特效水面漣漪特效 WOBBLER WOBBLER 搖晃特效搖晃特效

Page 21: Java ,  ActiveX , and Anfy

3D Applets3D Applets 特效特效 3D Applets3D Applets

• 八種八種 Java AppletsJava Applets• 3D3D 效果的圖形特效效果的圖形特效

Panarama 360Panarama 360 度全景度全景 ANFY3D LIGHT ANFY3D LIGHT 立體光影立體光影

FLUID FLUID 液體流動液體流動 GALAXYGALAXY 銀河銀河 TMAP CUBE 3D TMAP CUBE 3D 紋理映射紋理映射

立方體立方體

Page 22: Java ,  ActiveX , and Anfy

3D Applets3D Applets 特效特效• 3D3D 效果的圖形特效效果的圖形特效

TUNNEL TUNNEL 隧道隧道 TUNNEL 3DTUNNEL 3D 多層次隧道多層次隧道 VOXEL LANDSCAPE VOXEL LANDSCAPE 地表圖地表圖 WORMHOLEWORMHOLE 蟲孔特效蟲孔特效

Page 23: Java ,  ActiveX , and Anfy

Navigation MenuNavigation Menu

瀏覽選單瀏覽選單• 五個五個 Java Applets Java Applets 動態選單的超連結功能動態選單的超連結功能

ANFY BUTTONANFY BUTTON CUBE MENUCUBE MENU 立體選單特效立體選單特效 MORP HMENUMORP HMENU 變形選單特效變形選單特效 TREE MENUTREE MENU 目錄樹選單特效目錄樹選單特效 WHEEL MENUWHEEL MENU 旋轉選單特效旋轉選單特效

Page 24: Java ,  ActiveX , and Anfy

OtherOther 其它類型的十七個其它類型的十七個 Java AppletsJava Applets 不只提供多樣化的動畫效不只提供多樣化的動畫效

果,還擁有一些小而美的網頁工具程式。果,還擁有一些小而美的網頁工具程式。• ANFYCAM ANFYCAM 網路攝影機網路攝影機• ANFYPAINT ANFYPAINT 繪畫工具繪畫工具• BLOBSBLOBS 光點光點• BLUR BLUR 模糊模糊• FIRE FIRE 火焰火焰• FLAG FLAG 旗幟飄揚旗幟飄揚• FLAGLOAD FLAGLOAD 物件飄揚物件飄揚• PLASMA PLASMA 等離子等離子• SOLIDSCROLLER SOLIDSCROLLER 簡單的文字捲動簡單的文字捲動• TEXTSCROLLER TEXTSCROLLER 固定文字捲動固定文字捲動

Page 25: Java ,  ActiveX , and Anfy

OtherOther 其它類型的十七個其它類型的十七個 Java AppletsJava Applets 不只提供多樣化的動畫效不只提供多樣化的動畫效

果,還擁有一些小而美的網頁工具程式。果,還擁有一些小而美的網頁工具程式。

• Anfy Clock   Anfy Clock   • Anfy Puzzle   Anfy Puzzle   • Mad Text   Mad Text   • Spiral Star   Spiral Star   • Star Text   Star Text   • Zoom and Blur   Zoom and Blur   • Anfy Chat   Anfy Chat  

Page 26: Java ,  ActiveX , and Anfy

使用使用 FrontPageFrontPage 插入插入 Java Java AppletApplet

在在 FrontPageFrontPage 的的 Java AppletJava Applet 屬於進階控屬於進階控制項,只需擁有制項,只需擁有 Java AppletsJava Applets 或從或從InternetInternet 下載現成的下載現成的 Java AppletJava Applet ,就可,就可以使用以使用 FrontPageFrontPage 在網頁插入在網頁插入 Java Java AppletApplet 控制項。控制項。

Page 27: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab

HelpHelp• C:\Program Files\AnfyTeam\Tutorial\C:\Program Files\AnfyTeam\Tutorial\

helproot.htmlhelproot.html

Page 28: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab

Step 1Step 1

Press

Page 29: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab

Step 2Step 2• The applet "The applet "WidthWidth" and "" and "HeightHeight" are " are

automatically entered when you specify automatically entered when you specify the screen image and a "the screen image and a "ResolutionResolution" " value. value.

Give A Figure

Page 30: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab

Step 2Step 2• Next three parameters below "Next three parameters below "IntensityIntensity" "

decide how changeable the wind is. decide how changeable the wind is. • With "With "Var. speedVar. speed", you can set how fluently ", you can set how fluently

the wind changes its direction and speed. A the wind changes its direction and speed. A higher value gives a faster change. The wind's higher value gives a faster change. The wind's behaviour itself is dynamically calculated and it behaviour itself is dynamically calculated and it does not show static behaviour. does not show static behaviour.

• You can limit the maximum and minimum wind You can limit the maximum and minimum wind speed at "speed at "Var. maxVar. max" and "" and "Var. minVar. min".".

Page 31: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab Step 2Step 2

• ""Wave speedWave speed" literally controls the speed of " literally controls the speed of the wave. Lower values produce very slow and the wave. Lower values produce very slow and calm wavings; whereas higher values result in calm wavings; whereas higher values result in very busy motion. very busy motion.

• ""PerspectivePerspective" decides how the waves have to " decides how the waves have to be stretched for perspective simulation. In be stretched for perspective simulation. In other words, with this parameter, you can other words, with this parameter, you can control visual distance between waves. Lower control visual distance between waves. Lower values mean narrow space in between waves values mean narrow space in between waves and it looks very busy.and it looks very busy.

• ""FarwavingFarwaving" parameter (values from 1 to " parameter (values from 1 to 10000) allows you to determine how strong the 10000) allows you to determine how strong the far waves (top of lake) must be. far waves (top of lake) must be.

Page 32: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab

Step 2Step 2• This "This "Half reflectHalf reflect" option allows you to " option allows you to

shrink the reflection into the half size shrink the reflection into the half size

Page 33: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab

Step 3Step 3

Page 34: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab

Step 4Step 4

Page 35: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab

Step 5Step 5• If you would like the applet to be linked If you would like the applet to be linked

to a certain url, select "to a certain url, select "Enable linkEnable link" " and enter the link url below space.and enter the link url below space.

http://www.google.com

Page 36: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab

Step 6Step 6• Click "Click "Copy all files Copy all files

to...to..." button and " button and specify a destination specify a destination file name, say, file name, say, home.htmlhome.html to which to which the HTML code will the HTML code will be output and the be output and the necessary .class necessary .class files will be copied files will be copied to the same folder.to the same folder.

Page 37: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab

FilesFiles

Page 38: Java ,  ActiveX , and Anfy

Anfy LabAnfy Lab lake_lab.htmllake_lab.html

<html><html><head><head>::</head></head><body bgcolor="#000000" text="#FFFF22" link="#5FFF5F" <body bgcolor="#000000" text="#FFFF22" link="#5FFF5F"

vlink="#553AEB" alink="#FF8000">vlink="#553AEB" alink="#FF8000"><table width=100% height=90%><table width=100% height=90%><tr><tr><td align=center valign=center><td align=center valign=center>

<applet archive="<applet archive="AnLake.jar" code="" code="AnLake.classAnLake.class" " width="300" height="256">width="300" height="256">

<param name="credits" value="Applet by Fabio Ciucci <param name="credits" value="Applet by Fabio Ciucci (www.anfyteam.com)">(www.anfyteam.com)">

::</applet></applet>::</body></body></html></html>