java , activex , and anfy
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 PresentationTRANSCRIPT
Java, ActiveX, and AnfyJava, 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)
JavaJava
FlowFlow
JavaCompiler
JVM(Intel)
Intel/Windows PC
JVM(Sun)
SPARC/Solaris Workstation
Other ArchitecturesSupporting JVM
Java SourceCode
ByteCode
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!"); }}
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
JavaJava
How to executeHow to execute
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
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);
}}
}}
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>
Java AppletJava Applet
ExecutionExecution
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
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
AnfyAnfy
Tool for Building Java AppletTool for Building Java Applet
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
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
Banner/SlideshowBanner/Slideshow
旗幟旗幟 // 幻燈片類型幻燈片類型• 三個三個 Java AppletsJava Applets• 可以提供各種圖片間的切換效果。可以提供各種圖片間的切換效果。
BOOK FLIP BOOK FLIP 書本翻頁特效書本翻頁特效 Cross FADE Banner Cross FADE Banner 交叉變換特效交叉變換特效 Mosaic Banner Mosaic Banner 馬賽克特效馬賽克特效
Fractals & ALifeFractals & ALife
分形分形 // 生命類型生命類型• 四個四個 Java AppletsJava Applets• 數學演算法建立的特殊圖形效果數學演算法建立的特殊圖形效果
FLOZOIDS FLOZOIDS 飄浮物特效飄浮物特效 IFS FRACTALS IFS FRACTALS 分形樹特效分形樹特效 LIFE2D LIFE2D 二維生命特效二維生命特效 MANDELBROT FRACTAL MANDELBROT FRACTAL 幾何樹特效幾何樹特效
Image EffectsImage Effects 圖像效果類型圖像效果類型
• 包含十四個包含十四個 Java AppletsJava Applets 可以套用精彩和驚人的特殊可以套用精彩和驚人的特殊效果。效果。
Stretch Stretch 拉扯拉扯 Weather Weather 天氣天氣 Zoom and PanZoom and Pan BUMPBUMP 光照投影特效光照投影特效
Image EffectsImage Effects
圖像效果類型圖像效果類型• 包含十四個包含十四個 Java AppletsJava Applets
DEFORM DEFORM 變形變形 FIREWORKSFIREWORKS 煙火煙火 HUE ROTATOR HUE ROTATOR 循環色調循環色調 LAKELAKE 湖面倒影特效湖面倒影特效 ZOOM ROTATORZOOM ROTATOR
Image EffectsImage Effects
圖像效果類型圖像效果類型• 包含十四個包含十四個 Java AppletsJava Applets
LENS LENS 透鏡特效透鏡特效 ROTROT 縮放旋轉特效縮放旋轉特效 SNOW SNOW 雪片特效雪片特效 WARP WARP 彎曲變形特效彎曲變形特效 WATER WATER 水面漣漪特效水面漣漪特效 WOBBLER WOBBLER 搖晃特效搖晃特效
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 紋理映射紋理映射
立方體立方體
3D Applets3D Applets 特效特效• 3D3D 效果的圖形特效效果的圖形特效
TUNNEL TUNNEL 隧道隧道 TUNNEL 3DTUNNEL 3D 多層次隧道多層次隧道 VOXEL LANDSCAPE VOXEL LANDSCAPE 地表圖地表圖 WORMHOLEWORMHOLE 蟲孔特效蟲孔特效
Navigation MenuNavigation Menu
瀏覽選單瀏覽選單• 五個五個 Java Applets Java Applets 動態選單的超連結功能動態選單的超連結功能
ANFY BUTTONANFY BUTTON CUBE MENUCUBE MENU 立體選單特效立體選單特效 MORP HMENUMORP HMENU 變形選單特效變形選單特效 TREE MENUTREE MENU 目錄樹選單特效目錄樹選單特效 WHEEL MENUWHEEL MENU 旋轉選單特效旋轉選單特效
OtherOther 其它類型的十七個其它類型的十七個 Java AppletsJava Applets 不只提供多樣化的動畫效不只提供多樣化的動畫效
果,還擁有一些小而美的網頁工具程式。果,還擁有一些小而美的網頁工具程式。• ANFYCAM ANFYCAM 網路攝影機網路攝影機• ANFYPAINT ANFYPAINT 繪畫工具繪畫工具• BLOBSBLOBS 光點光點• BLUR BLUR 模糊模糊• FIRE FIRE 火焰火焰• FLAG FLAG 旗幟飄揚旗幟飄揚• FLAGLOAD FLAGLOAD 物件飄揚物件飄揚• PLASMA PLASMA 等離子等離子• SOLIDSCROLLER SOLIDSCROLLER 簡單的文字捲動簡單的文字捲動• TEXTSCROLLER TEXTSCROLLER 固定文字捲動固定文字捲動
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
使用使用 FrontPageFrontPage 插入插入 Java Java AppletApplet
在在 FrontPageFrontPage 的的 Java AppletJava Applet 屬於進階控屬於進階控制項,只需擁有制項,只需擁有 Java AppletsJava Applets 或從或從InternetInternet 下載現成的下載現成的 Java AppletJava Applet ,就可,就可以使用以使用 FrontPageFrontPage 在網頁插入在網頁插入 Java Java AppletApplet 控制項。控制項。
Anfy LabAnfy Lab
HelpHelp• C:\Program Files\AnfyTeam\Tutorial\C:\Program Files\AnfyTeam\Tutorial\
helproot.htmlhelproot.html
Anfy LabAnfy Lab
Step 1Step 1
Press
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
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".".
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.
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
Anfy LabAnfy Lab
Step 3Step 3
Anfy LabAnfy Lab
Step 4Step 4
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
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.
Anfy LabAnfy Lab
FilesFiles
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>