home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Color;
- import java.awt.Component;
- import java.awt.Graphics;
- import java.util.StringTokenizer;
-
- public abstract class AnimationEvent {
- public long m_speed;
- public long m_xOffset;
- public Animation m_animation;
- public Component m_component;
- Color m_colour;
- String m_url;
- public AnimationEvent m_next;
- public AnimationEvent m_prev;
-
- public abstract void drawFrame(Graphics var1);
-
- public AnimationEvent(Component component, Animation anim) {
- this.m_animation = anim;
- this.m_component = component;
- this.m_xOffset = 0L;
- this.m_speed = 0L;
- this.m_url = new String();
- this.m_next = null;
- this.m_prev = null;
- }
-
- public void initFromParams(String params) {
- StringTokenizer st = new StringTokenizer(params, ";");
- String szToken = st.nextToken();
- int nColon = szToken.indexOf(58);
-
- while(st.hasMoreTokens()) {
- szToken = st.nextToken();
- nColon = szToken.indexOf(58);
- if (nColon != -1) {
- String szName = szToken.substring(0, nColon).toUpperCase();
- String szValue = szToken.substring(nColon + 1);
- if (szName.equals("SPEED")) {
- this.m_speed = 20L * Integer.valueOf(szValue).longValue() * 16L / (long)this.m_animation.m_fps;
- } else if (szName.equals("COLOUR")) {
- this.m_colour = Misc.initColour(szValue);
- } else if (szName.equals("URL")) {
- this.m_url = szValue;
- }
- }
- }
-
- }
-
- public abstract String getUrl(int var1, int var2);
-
- public void incFrame() {
- this.m_xOffset += this.m_speed;
- }
- }
-