home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************
- * FileName: C:\JenAva\Samples\Animation\AnimationApp.Java *
- * *
- * Source code generated with JenAva (R) v1.0 *
- **********************************************************************/
- //{{CODECINCH(COMMENT)
- //}}
-
- import java.awt.*;
- import java.applet.Applet;
- import java.awt.image.*;
- import java.applet.AudioClip;
- import java.net.*;
- import java.io.*;
- import java.util.*;
-
- //{{CODECINCH(IMPORT)
- //}}
-
- //{{CODECINCH(BEFORE_ALL)
- //}}
-
- public class AnimationApp extends Applet implements ImageObserver
- {
- //{{CODECINCH(BEGIN_APPLET)
- //}}
-
- // ** GUI Objects Declarations
- //{{CODECINCH(BEGIN_FORM_OBJDEC)
- //}}
-
- public static JAFormBack CFBack;
- public static JAButton Oause;
- public static JAButton Continue;
- public static JAButton Button3;
- public static JAButton Stop;
- public static JAButton Start;
- public static JAAnimation JenLogo;
- public static JAGraphic Duke;
- public static JAStatic Text1;
-
- //{{CODECINCH(END_FORM_OBJDEC)
- //}}
-
- public static Image JenLogoImage0;
- public static Image JenLogoImage1;
- public static Image JenLogoImage2;
- public static Image JenLogoImage3;
- public static Image JenLogoImage4;
- public static Image JenLogoImage5;
- public static Image JenLogoImage6;
- public static Image JenLogoImage7;
- public static Image JenLogoImage8;
- public static Image JenLogoImage9;
- public static Image JenLogoImage10;
- public static Image JenLogoImage11;
- public static Image JenLogoImage12;
- public static Image JenLogoImage13;
- public static Image JenLogoImage14;
- public static Image JenLogoImage15;
- public static Image JenLogoImage16;
- public static Image JenLogoImage17;
- public static Image JenLogoImage18;
- public static Image JenLogoImage19;
- public static Image DukeImage;
-
- public static AudioClip AnimationAudio;
-
- public static URL AnimationUrl;
-
- public static AnimationApp MainForm;
-
-
- public void init()
- {
- //{{CODECINCH(BEGIN_INIT)
- //}}
-
- MainForm = this;
-
- AnimationUrl = getDocumentBase();
-
- JenLogoImage0 = getImage(AnimationUrl, "images/JT01.gif");
- JenLogoImage1 = getImage(AnimationUrl, "images/JT02.gif");
- JenLogoImage2 = getImage(AnimationUrl, "images/JT03.gif");
- JenLogoImage3 = getImage(AnimationUrl, "images/JT04.gif");
- JenLogoImage4 = getImage(AnimationUrl, "images/JT05.gif");
- JenLogoImage5 = getImage(AnimationUrl, "images/JT06.gif");
- JenLogoImage6 = getImage(AnimationUrl, "images/JT07.gif");
- JenLogoImage7 = getImage(AnimationUrl, "images/JT08.gif");
- JenLogoImage8 = getImage(AnimationUrl, "images/JT09.gif");
- JenLogoImage9 = getImage(AnimationUrl, "images/JT10.gif");
- JenLogoImage10 = getImage(AnimationUrl, "images/JT11.gif");
- JenLogoImage11 = getImage(AnimationUrl, "images/JT12.gif");
- JenLogoImage12 = getImage(AnimationUrl, "images/JT13.gif");
- JenLogoImage13 = getImage(AnimationUrl, "images/JT14.gif");
- JenLogoImage14 = getImage(AnimationUrl, "images/JT15.gif");
- JenLogoImage15 = getImage(AnimationUrl, "images/JT16.gif");
- JenLogoImage16 = getImage(AnimationUrl, "images/JT17.gif");
- JenLogoImage17 = getImage(AnimationUrl, "images/JT18.gif");
- JenLogoImage18 = getImage(AnimationUrl, "images/JT19.gif");
- JenLogoImage19 = getImage(AnimationUrl, "images/JT20.gif");
- DukeImage = getImage( AnimationUrl, "images/Java.gif");
-
- setLayout( new GridLayout(1,1) );
-
- CFBack = new JAFormBack();
- CFBack.setLayout( null );
- CFBack.setBackground( new Color( 192, 192, 192 ) );
- CFBack.setFont( new Font("Helvetica", Font.PLAIN, 12) );
- add( CFBack );
-
- // ** Definitions of all objects for this form
- //{{CODECINCH(BEGIN_FORM_OBJDEF)
- //}}
-
- Oause = new JAButton(209, 199, 125, 33, "Pause", 1, null, true, false, true, new Color(192, 192, 192) );
- CFBack.add(Oause);
- Continue = new JAButton(53, 199, 128, 33, "Continue", 1, null, true, false, true, new Color(192, 192, 192) );
- CFBack.add(Continue);
- Button3 = new JAButton(132, 245, 122, 32, "Exit", 1, null, true, false, true, new Color(192, 192, 192) );
- CFBack.add(Button3);
- Stop = new JAButton(209, 156, 125, 33, "Stop", 1, null, true, false, true, new Color(192, 192, 192) );
- CFBack.add(Stop);
- Start = new JAButton(53, 157, 128, 33, "Start", 1, null, true, false, true, new Color(192, 192, 192) );
- CFBack.add(Start);
- Image JenLogoImageLoop[];
- JenLogoImageLoop = new Image[20];
- JenLogoImageLoop[0] = AnimationApp.JenLogoImage0;
- JenLogoImageLoop[1] = AnimationApp.JenLogoImage1;
- JenLogoImageLoop[2] = AnimationApp.JenLogoImage2;
- JenLogoImageLoop[3] = AnimationApp.JenLogoImage3;
- JenLogoImageLoop[4] = AnimationApp.JenLogoImage4;
- JenLogoImageLoop[5] = AnimationApp.JenLogoImage5;
- JenLogoImageLoop[6] = AnimationApp.JenLogoImage6;
- JenLogoImageLoop[7] = AnimationApp.JenLogoImage7;
- JenLogoImageLoop[8] = AnimationApp.JenLogoImage8;
- JenLogoImageLoop[9] = AnimationApp.JenLogoImage9;
- JenLogoImageLoop[10] = AnimationApp.JenLogoImage10;
- JenLogoImageLoop[11] = AnimationApp.JenLogoImage11;
- JenLogoImageLoop[12] = AnimationApp.JenLogoImage12;
- JenLogoImageLoop[13] = AnimationApp.JenLogoImage13;
- JenLogoImageLoop[14] = AnimationApp.JenLogoImage14;
- JenLogoImageLoop[15] = AnimationApp.JenLogoImage15;
- JenLogoImageLoop[16] = AnimationApp.JenLogoImage16;
- JenLogoImageLoop[17] = AnimationApp.JenLogoImage17;
- JenLogoImageLoop[18] = AnimationApp.JenLogoImage18;
- JenLogoImageLoop[19] = AnimationApp.JenLogoImage19;
- JenLogo = new JAAnimation(211, 70, 61, 65, true, true, true, 100, JenLogoImageLoop, 20);
- CFBack.add(JenLogo);
- Duke = new JAGraphic(72, 71, 81, 73, 1, AnimationApp.DukeImage, true, false, true, true);
- CFBack.add(Duke);
- Text1 = new JAStatic(42, 19, 241, 32, "TimesRoman", 27, false, false, false, "An Animation Demo", new Color(255, 0, 0), new Color(192, 192, 192), false, new Color(255, 0, 0), true, 1, 4);
-
- //{{CODECINCH(END_FORM_OBJDEF)
- //}}
-
-
- resize( 390, 327 );
-
- postEvent( new Event( (Object)this, JAEvent.INITIALIZE, (Object)this ) );
-
- //{{CODECINCH(END_INIT)
- //}}
- }
-
- public void paint( Graphics g )
- {
- //{{CODECINCH(BEGIN_FORM_PAINT)
- //}}
-
- // ** Painting of all objects for this form
-
- if(Oause.bVisible == true)
- Oause.reshape(Oause.xPos, Oause.yPos, Oause.Width, Oause.Height);
- if(Continue.bVisible == true)
- Continue.reshape(Continue.xPos, Continue.yPos, Continue.Width, Continue.Height);
- if(Button3.bVisible == true)
- Button3.reshape(Button3.xPos, Button3.yPos, Button3.Width, Button3.Height);
- if(Stop.bVisible == true)
- Stop.reshape(Stop.xPos, Stop.yPos, Stop.Width, Stop.Height);
- if(Start.bVisible == true)
- Start.reshape(Start.xPos, Start.yPos, Start.Width, Start.Height);
- if(JenLogo.bVisible == true)
- JenLogo.reshape(JenLogo.xPos, JenLogo.yPos, JenLogo.Width, JenLogo.Height);
- if(Duke.bVisible == true)
- Duke.reshape(Duke.xPos, Duke.yPos, Duke.Width, Duke.Height);
- if(Text1.bVisible == true)
- Text1.paint( CFBack.getGraphics() );
-
- //{{CODECINCH(END_FORM_PAINT)
- //}}
- }
-
- public boolean handleEvent( Event evt )
- {
- //{{CODECINCH(BEGIN_FORM_HANDLEEVENT)
- //}}
-
- if( ( evt.target ).equals( Oause ) )
- {
- if( evt.id == JAEvent.CLICK )
- {
- JAFunctions.PAUSEANIMATION(AnimationApp.MainForm.JenLogo);
- }
- }
-
- if( ( evt.target ).equals( Continue ) )
- {
- if( evt.id == JAEvent.CLICK )
- {
- JAFunctions.PLAYANIMATION(AnimationApp.MainForm.JenLogo);
- }
- }
-
- if( ( evt.target ).equals( Button3 ) )
- {
- if( evt.id == JAEvent.CLICK )
- {
- JAFunctions.EXIT();
- }
- }
-
- if( ( evt.target ).equals( Stop ) )
- {
- if( evt.id == JAEvent.CLICK )
- {
- JAFunctions.STOPANIMATION(AnimationApp.MainForm.JenLogo);
- }
- }
-
- if( ( evt.target ).equals( Start ) )
- {
- if( evt.id == JAEvent.CLICK )
- {
- JAFunctions.STARTANIMATION(AnimationApp.MainForm.JenLogo);
- }
- }
-
- if( ( evt.target ).equals( JenLogo ) )
- {
- }
-
- if( ( evt.target ).equals( Duke ) )
- {
- }
-
- if( evt.id == Event.MOUSE_UP )
- {
- Oause.bMouseDown = false;
- Continue.bMouseDown = false;
- Button3.bMouseDown = false;
- Stop.bMouseDown = false;
- Start.bMouseDown = false;
- }
-
- if( evt.target instanceof JATextField )
- {
- if( evt.id == JAEvent.SELCHANGE )
- evt.id = Event.KEY_PRESS;
- }
-
- if( evt.id == Event.WINDOW_DESTROY )
- {
- postEvent( new Event( (Object)this, JAEvent.CLOSE, (Object)this ) );
- JAFunctions.HIDE( this );
- JAFunctions.EXIT();
-
- return true;
- }
-
- //{{CODECINCH(END_FORM_HANDLEEVENT)
- //}}
-
- return false;
- }
-
- public static void MainFormForm_UpdateTableToLinks()
- {
- }
-
- public static void MainFormForm_UpdateTableFromLinks()
- {
- }
-
- //{{CODECINCH(END_APPLET)
- //}}
- }
-
- //{{CODECINCH(AFTER_ALL)
- //}}
-