home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Gallery
/
INTERGAL.bin
/
intergal
/
prgs
/
mojoinst
/
mojoinst.exe
/
MOJODISK
/
DATA.2
/
plugins
/
mojo.def
next >
Wrap
Text File
|
1996-05-19
|
29KB
|
1,653 lines
DEF_COMPONENTNAME
A1
DEF_SUPERCLASS
Panel
DEF_PACKAGE
mojo
animation
DEF_ENDLIST
DEF_CATEGORY
Multimedia
DEF_THUMBNAIL
npict.bmp
DEF_PANEL
DEF_REQUIRES
FrameChanger
DEF_ENDLIST
DEF_SUBCOMPONENTLIST
DEF_ENDLIST
DEF_DECLARATION
public class Animation extends Panel
// an animation panel component.
String prefix; // animation file prefix
int numberOfFrames; // number of frames of animation
int delay; // delay in milliseconds between frames
int startFrame;
int endFrame;
java.awt.Image frame[];
int currentFrame;
FrameChanger frameChanger;
DEF_ENDLIST
DEF_METHOD
public void changeFrames()
// moves to the next frame in the animation seuqence.
{
currentFrame++;
if (currentFrame > endFrame)
currentFrame = startFrame;
repaint();
}
DEF_ENDLIST
DEF_METHOD
public void paint(Graphics g)
// draw the current frame
{
if (frame == null) {
// frames are not loaded to load them
frame = new java.awt.Image[numberOfFrames + 1];
currentFrame = startFrame;
for (int i = 1; i <= numberOfFrames; i++) {
frame[i] = applet.getImage(applet.getCodeBase(),
prefix + Integer.toString(i)
+ ".gif");
}
// load the frame changer and start the animation
frameChanger = new FrameChanger(applet);
frameChanger.setAnimationDelay(delay);
frameChanger.setAnimationComponent(this);
// start the frame changer
frameChanger.start();
}
g.drawImage(frame[currentFrame], 0, 0, this);
}
DEF_ENDLIST
DEF_METHOD
public void setDelay(int duration)
{
delay = duration;
}
DEF_ENDLIST
DEF_METHOD
public int getDelay()
{
return(delay);
}
DEF_ENDLIST
DEF_METHOD
public void setNumberFrames(int numframes)
{
numberOfFrames = numframes;
}
DEF_ENDLIST
DEF_METHOD
public int getNumberFrames()
{
return(numberOfFrames);
}
DEF_ENDLIST
DEF_METHOD
public void setStartFrame(int frame)
{
startFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getStartFrame()
{
return(startFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setEndFrame(int frame)
{
endFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getEndFrame()
{
return(endFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setPrefix(String fileprefix)
{
prefix = fileprefix;
}
DEF_ENDLIST
DEF_METHOD
public String getPrefix()
{
return(prefix);
}
DEF_ENDLIST
DEF_PROPERTY
First Animation Frame
ANIMATION_FILENAME
setPrefix(AVALUE);
AVALUE = getPrefix();
DEF_ENDLIST
DEF_PROPERTY
Number of Frames
int
setNumberFrames(AVALUE);
AVALUE = getNumberFrames();
0
DEF_ENDLIST
DEF_PROPERTY
Start Frame
int
setStartFrame(AVALUE);
AVALUE = getStartFrame();
0
DEF_ENDLIST
DEF_PROPERTY
End Frame
int
setEndFrame(AVALUE);
AVALUE = getEndFrame();
0
DEF_ENDLIST
DEF_PROPERTY
Delay (in milliseconds)
int
setDelay(AVALUE);
AVALUE = getDelay();
0
DEF_ENDLIST
DEF_PROPERTY
Top
int
move(bounds().x, AVALUE);
AVALUE = bounds().y;
0
DEF_ENDLIST
DEF_PROPERTY
Left
int
move(AVALUE, bounds().y);
AVALUE = bounds().x;
0
DEF_ENDLIST
DEF_PROPERTY
Height
int
resize(bounds().width, AVALUE);
AVALUE = bounds().height;
100
DEF_ENDLIST
DEF_PROPERTY
Width
int
resize(AVALUE, bounds().height);
AVALUE = bounds().width;
100
DEF_ENDLIST
DEF_PROPERTY
ForegroundColor
Color
setForeground(AVALUE);
AVALUE = getForeground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
BackgroundColor
Color
setBackground(AVALUE);
AVALUE = getBackground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
FontName
String
setFont(new Font(AVALUE, getFont().getStyle(), getFont().getSize()));
AVALUE = getFont().getName();
Courier
DEF_ENDLIST
DEF_PROPERTY
FontStyle
int
setFont(new Font(getFont().getName(), AVALUE, getFont().getSize()));
AVALUE = getFont().getStyle();
Font.PLAIN
DEF_ENDLIST
DEF_PROPERTY
FontSize
int
setFont(new Font(getFont().getName(), getFont().getStyle(), AVALUE));
AVALUE = getFont().getSize();
10
DEF_ENDLIST
DEF_ENDCOMPONENT
DEF_COMPONENTNAME
A2
DEF_SUPERCLASS
Panel
DEF_PACKAGE
mojo
animation
DEF_ENDLIST
DEF_CATEGORY
Networking
DEF_THUMBNAIL
npict.bmp
DEF_PANEL
DEF_REQUIRES
FrameChanger
DEF_ENDLIST
DEF_SUBCOMPONENTLIST
DEF_ENDLIST
DEF_DECLARATION
public class Animation extends Panel
// an animation panel component.
String prefix; // animation file prefix
int numberOfFrames; // number of frames of animation
int delay; // delay in milliseconds between frames
int startFrame;
int endFrame;
java.awt.Image frame[];
int currentFrame;
FrameChanger frameChanger;
DEF_ENDLIST
DEF_METHOD
public void changeFrames()
// moves to the next frame in the animation seuqence.
{
currentFrame++;
if (currentFrame > endFrame)
currentFrame = startFrame;
repaint();
}
DEF_ENDLIST
DEF_METHOD
public void paint(Graphics g)
// draw the current frame
{
if (frame == null) {
// frames are not loaded to load them
frame = new java.awt.Image[numberOfFrames + 1];
currentFrame = startFrame;
for (int i = 1; i <= numberOfFrames; i++) {
frame[i] = applet.getImage(applet.getCodeBase(),
prefix + Integer.toString(i)
+ ".gif");
}
// load the frame changer and start the animation
frameChanger = new FrameChanger(applet);
frameChanger.setAnimationDelay(delay);
frameChanger.setAnimationComponent(this);
// start the frame changer
frameChanger.start();
}
g.drawImage(frame[currentFrame], 0, 0, this);
}
DEF_ENDLIST
DEF_METHOD
public void setDelay(int duration)
{
delay = duration;
}
DEF_ENDLIST
DEF_METHOD
public int getDelay()
{
return(delay);
}
DEF_ENDLIST
DEF_METHOD
public void setNumberFrames(int numframes)
{
numberOfFrames = numframes;
}
DEF_ENDLIST
DEF_METHOD
public int getNumberFrames()
{
return(numberOfFrames);
}
DEF_ENDLIST
DEF_METHOD
public void setStartFrame(int frame)
{
startFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getStartFrame()
{
return(startFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setEndFrame(int frame)
{
endFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getEndFrame()
{
return(endFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setPrefix(String fileprefix)
{
prefix = fileprefix;
}
DEF_ENDLIST
DEF_METHOD
public String getPrefix()
{
return(prefix);
}
DEF_ENDLIST
DEF_PROPERTY
First Animation Frame
ANIMATION_FILENAME
setPrefix(AVALUE);
AVALUE = getPrefix();
DEF_ENDLIST
DEF_PROPERTY
Number of Frames
int
setNumberFrames(AVALUE);
AVALUE = getNumberFrames();
0
DEF_ENDLIST
DEF_PROPERTY
Start Frame
int
setStartFrame(AVALUE);
AVALUE = getStartFrame();
0
DEF_ENDLIST
DEF_PROPERTY
End Frame
int
setEndFrame(AVALUE);
AVALUE = getEndFrame();
0
DEF_ENDLIST
DEF_PROPERTY
Delay (in milliseconds)
int
setDelay(AVALUE);
AVALUE = getDelay();
0
DEF_ENDLIST
DEF_PROPERTY
Top
int
move(bounds().x, AVALUE);
AVALUE = bounds().y;
0
DEF_ENDLIST
DEF_PROPERTY
Left
int
move(AVALUE, bounds().y);
AVALUE = bounds().x;
0
DEF_ENDLIST
DEF_PROPERTY
Height
int
resize(bounds().width, AVALUE);
AVALUE = bounds().height;
100
DEF_ENDLIST
DEF_PROPERTY
Width
int
resize(AVALUE, bounds().height);
AVALUE = bounds().width;
100
DEF_ENDLIST
DEF_PROPERTY
ForegroundColor
Color
setForeground(AVALUE);
AVALUE = getForeground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
BackgroundColor
Color
setBackground(AVALUE);
AVALUE = getBackground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
FontName
String
setFont(new Font(AVALUE, getFont().getStyle(), getFont().getSize()));
AVALUE = getFont().getName();
Courier
DEF_ENDLIST
DEF_PROPERTY
FontStyle
int
setFont(new Font(getFont().getName(), AVALUE, getFont().getSize()));
AVALUE = getFont().getStyle();
Font.PLAIN
DEF_ENDLIST
DEF_PROPERTY
FontSize
int
setFont(new Font(getFont().getName(), getFont().getStyle(), AVALUE));
AVALUE = getFont().getSize();
10
DEF_ENDLIST
DEF_ENDCOMPONENT
DEF_COMPONENTNAME
A3
DEF_SUPERCLASS
Panel
DEF_PACKAGE
mojo
animation
DEF_ENDLIST
DEF_CATEGORY
Business
DEF_THUMBNAIL
npict.bmp
DEF_PANEL
DEF_REQUIRES
FrameChanger
DEF_ENDLIST
DEF_SUBCOMPONENTLIST
DEF_ENDLIST
DEF_DECLARATION
public class Animation extends Panel
// an animation panel component.
String prefix; // animation file prefix
int numberOfFrames; // number of frames of animation
int delay; // delay in milliseconds between frames
int startFrame;
int endFrame;
java.awt.Image frame[];
int currentFrame;
FrameChanger frameChanger;
DEF_ENDLIST
DEF_METHOD
public void changeFrames()
// moves to the next frame in the animation seuqence.
{
currentFrame++;
if (currentFrame > endFrame)
currentFrame = startFrame;
repaint();
}
DEF_ENDLIST
DEF_METHOD
public void paint(Graphics g)
// draw the current frame
{
if (frame == null) {
// frames are not loaded to load them
frame = new java.awt.Image[numberOfFrames + 1];
currentFrame = startFrame;
for (int i = 1; i <= numberOfFrames; i++) {
frame[i] = applet.getImage(applet.getCodeBase(),
prefix + Integer.toString(i)
+ ".gif");
}
// load the frame changer and start the animation
frameChanger = new FrameChanger(applet);
frameChanger.setAnimationDelay(delay);
frameChanger.setAnimationComponent(this);
// start the frame changer
frameChanger.start();
}
g.drawImage(frame[currentFrame], 0, 0, this);
}
DEF_ENDLIST
DEF_METHOD
public void setDelay(int duration)
{
delay = duration;
}
DEF_ENDLIST
DEF_METHOD
public int getDelay()
{
return(delay);
}
DEF_ENDLIST
DEF_METHOD
public void setNumberFrames(int numframes)
{
numberOfFrames = numframes;
}
DEF_ENDLIST
DEF_METHOD
public int getNumberFrames()
{
return(numberOfFrames);
}
DEF_ENDLIST
DEF_METHOD
public void setStartFrame(int frame)
{
startFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getStartFrame()
{
return(startFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setEndFrame(int frame)
{
endFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getEndFrame()
{
return(endFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setPrefix(String fileprefix)
{
prefix = fileprefix;
}
DEF_ENDLIST
DEF_METHOD
public String getPrefix()
{
return(prefix);
}
DEF_ENDLIST
DEF_PROPERTY
First Animation Frame
ANIMATION_FILENAME
setPrefix(AVALUE);
AVALUE = getPrefix();
DEF_ENDLIST
DEF_PROPERTY
Number of Frames
int
setNumberFrames(AVALUE);
AVALUE = getNumberFrames();
0
DEF_ENDLIST
DEF_PROPERTY
Start Frame
int
setStartFrame(AVALUE);
AVALUE = getStartFrame();
0
DEF_ENDLIST
DEF_PROPERTY
End Frame
int
setEndFrame(AVALUE);
AVALUE = getEndFrame();
0
DEF_ENDLIST
DEF_PROPERTY
Delay (in milliseconds)
int
setDelay(AVALUE);
AVALUE = getDelay();
0
DEF_ENDLIST
DEF_PROPERTY
Top
int
move(bounds().x, AVALUE);
AVALUE = bounds().y;
0
DEF_ENDLIST
DEF_PROPERTY
Left
int
move(AVALUE, bounds().y);
AVALUE = bounds().x;
0
DEF_ENDLIST
DEF_PROPERTY
Height
int
resize(bounds().width, AVALUE);
AVALUE = bounds().height;
100
DEF_ENDLIST
DEF_PROPERTY
Width
int
resize(AVALUE, bounds().height);
AVALUE = bounds().width;
100
DEF_ENDLIST
DEF_PROPERTY
ForegroundColor
Color
setForeground(AVALUE);
AVALUE = getForeground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
BackgroundColor
Color
setBackground(AVALUE);
AVALUE = getBackground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
FontName
String
setFont(new Font(AVALUE, getFont().getStyle(), getFont().getSize()));
AVALUE = getFont().getName();
Courier
DEF_ENDLIST
DEF_PROPERTY
FontStyle
int
setFont(new Font(getFont().getName(), AVALUE, getFont().getSize()));
AVALUE = getFont().getStyle();
Font.PLAIN
DEF_ENDLIST
DEF_PROPERTY
FontSize
int
setFont(new Font(getFont().getName(), getFont().getStyle(), AVALUE));
AVALUE = getFont().getSize();
10
DEF_ENDLIST
DEF_ENDCOMPONENT
DEF_COMPONENTNAME
A4
DEF_SUPERCLASS
Panel
DEF_PACKAGE
mojo
animation
DEF_ENDLIST
DEF_CATEGORY
Fun&Games
DEF_THUMBNAIL
npict.bmp
DEF_PANEL
DEF_REQUIRES
FrameChanger
DEF_ENDLIST
DEF_SUBCOMPONENTLIST
DEF_ENDLIST
DEF_DECLARATION
public class Animation extends Panel
// an animation panel component.
String prefix; // animation file prefix
int numberOfFrames; // number of frames of animation
int delay; // delay in milliseconds between frames
int startFrame;
int endFrame;
java.awt.Image frame[];
int currentFrame;
FrameChanger frameChanger;
DEF_ENDLIST
DEF_METHOD
public void changeFrames()
// moves to the next frame in the animation seuqence.
{
currentFrame++;
if (currentFrame > endFrame)
currentFrame = startFrame;
repaint();
}
DEF_ENDLIST
DEF_METHOD
public void paint(Graphics g)
// draw the current frame
{
if (frame == null) {
// frames are not loaded to load them
frame = new java.awt.Image[numberOfFrames + 1];
currentFrame = startFrame;
for (int i = 1; i <= numberOfFrames; i++) {
frame[i] = applet.getImage(applet.getCodeBase(),
prefix + Integer.toString(i)
+ ".gif");
}
// load the frame changer and start the animation
frameChanger = new FrameChanger(applet);
frameChanger.setAnimationDelay(delay);
frameChanger.setAnimationComponent(this);
// start the frame changer
frameChanger.start();
}
g.drawImage(frame[currentFrame], 0, 0, this);
}
DEF_ENDLIST
DEF_METHOD
public void setDelay(int duration)
{
delay = duration;
}
DEF_ENDLIST
DEF_METHOD
public int getDelay()
{
return(delay);
}
DEF_ENDLIST
DEF_METHOD
public void setNumberFrames(int numframes)
{
numberOfFrames = numframes;
}
DEF_ENDLIST
DEF_METHOD
public int getNumberFrames()
{
return(numberOfFrames);
}
DEF_ENDLIST
DEF_METHOD
public void setStartFrame(int frame)
{
startFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getStartFrame()
{
return(startFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setEndFrame(int frame)
{
endFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getEndFrame()
{
return(endFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setPrefix(String fileprefix)
{
prefix = fileprefix;
}
DEF_ENDLIST
DEF_METHOD
public String getPrefix()
{
return(prefix);
}
DEF_ENDLIST
DEF_PROPERTY
First Animation Frame
ANIMATION_FILENAME
setPrefix(AVALUE);
AVALUE = getPrefix();
DEF_ENDLIST
DEF_PROPERTY
Number of Frames
int
setNumberFrames(AVALUE);
AVALUE = getNumberFrames();
0
DEF_ENDLIST
DEF_PROPERTY
Start Frame
int
setStartFrame(AVALUE);
AVALUE = getStartFrame();
0
DEF_ENDLIST
DEF_PROPERTY
End Frame
int
setEndFrame(AVALUE);
AVALUE = getEndFrame();
0
DEF_ENDLIST
DEF_PROPERTY
Delay (in milliseconds)
int
setDelay(AVALUE);
AVALUE = getDelay();
0
DEF_ENDLIST
DEF_PROPERTY
Top
int
move(bounds().x, AVALUE);
AVALUE = bounds().y;
0
DEF_ENDLIST
DEF_PROPERTY
Left
int
move(AVALUE, bounds().y);
AVALUE = bounds().x;
0
DEF_ENDLIST
DEF_PROPERTY
Height
int
resize(bounds().width, AVALUE);
AVALUE = bounds().height;
100
DEF_ENDLIST
DEF_PROPERTY
Width
int
resize(AVALUE, bounds().height);
AVALUE = bounds().width;
100
DEF_ENDLIST
DEF_PROPERTY
ForegroundColor
Color
setForeground(AVALUE);
AVALUE = getForeground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
BackgroundColor
Color
setBackground(AVALUE);
AVALUE = getBackground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
FontName
String
setFont(new Font(AVALUE, getFont().getStyle(), getFont().getSize()));
AVALUE = getFont().getName();
Courier
DEF_ENDLIST
DEF_PROPERTY
FontStyle
int
setFont(new Font(getFont().getName(), AVALUE, getFont().getSize()));
AVALUE = getFont().getStyle();
Font.PLAIN
DEF_ENDLIST
DEF_PROPERTY
FontSize
int
setFont(new Font(getFont().getName(), getFont().getStyle(), AVALUE));
AVALUE = getFont().getSize();
10
DEF_ENDLIST
DEF_ENDCOMPONENT
DEF_COMPONENTNAME
A5
DEF_SUPERCLASS
Panel
DEF_PACKAGE
mojo
animation
DEF_ENDLIST
DEF_CATEGORY
Drawing
DEF_THUMBNAIL
npict.bmp
DEF_PANEL
DEF_REQUIRES
FrameChanger
DEF_ENDLIST
DEF_SUBCOMPONENTLIST
DEF_ENDLIST
DEF_DECLARATION
public class Animation extends Panel
// an animation panel component.
String prefix; // animation file prefix
int numberOfFrames; // number of frames of animation
int delay; // delay in milliseconds between frames
int startFrame;
int endFrame;
java.awt.Image frame[];
int currentFrame;
FrameChanger frameChanger;
DEF_ENDLIST
DEF_METHOD
public void changeFrames()
// moves to the next frame in the animation seuqence.
{
currentFrame++;
if (currentFrame > endFrame)
currentFrame = startFrame;
repaint();
}
DEF_ENDLIST
DEF_METHOD
public void paint(Graphics g)
// draw the current frame
{
if (frame == null) {
// frames are not loaded to load them
frame = new java.awt.Image[numberOfFrames + 1];
currentFrame = startFrame;
for (int i = 1; i <= numberOfFrames; i++) {
frame[i] = applet.getImage(applet.getCodeBase(),
prefix + Integer.toString(i)
+ ".gif");
}
// load the frame changer and start the animation
frameChanger = new FrameChanger(applet);
frameChanger.setAnimationDelay(delay);
frameChanger.setAnimationComponent(this);
// start the frame changer
frameChanger.start();
}
g.drawImage(frame[currentFrame], 0, 0, this);
}
DEF_ENDLIST
DEF_METHOD
public void setDelay(int duration)
{
delay = duration;
}
DEF_ENDLIST
DEF_METHOD
public int getDelay()
{
return(delay);
}
DEF_ENDLIST
DEF_METHOD
public void setNumberFrames(int numframes)
{
numberOfFrames = numframes;
}
DEF_ENDLIST
DEF_METHOD
public int getNumberFrames()
{
return(numberOfFrames);
}
DEF_ENDLIST
DEF_METHOD
public void setStartFrame(int frame)
{
startFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getStartFrame()
{
return(startFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setEndFrame(int frame)
{
endFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getEndFrame()
{
return(endFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setPrefix(String fileprefix)
{
prefix = fileprefix;
}
DEF_ENDLIST
DEF_METHOD
public String getPrefix()
{
return(prefix);
}
DEF_ENDLIST
DEF_PROPERTY
First Animation Frame
ANIMATION_FILENAME
setPrefix(AVALUE);
AVALUE = getPrefix();
DEF_ENDLIST
DEF_PROPERTY
Number of Frames
int
setNumberFrames(AVALUE);
AVALUE = getNumberFrames();
0
DEF_ENDLIST
DEF_PROPERTY
Start Frame
int
setStartFrame(AVALUE);
AVALUE = getStartFrame();
0
DEF_ENDLIST
DEF_PROPERTY
End Frame
int
setEndFrame(AVALUE);
AVALUE = getEndFrame();
0
DEF_ENDLIST
DEF_PROPERTY
Delay (in milliseconds)
int
setDelay(AVALUE);
AVALUE = getDelay();
0
DEF_ENDLIST
DEF_PROPERTY
Top
int
move(bounds().x, AVALUE);
AVALUE = bounds().y;
0
DEF_ENDLIST
DEF_PROPERTY
Left
int
move(AVALUE, bounds().y);
AVALUE = bounds().x;
0
DEF_ENDLIST
DEF_PROPERTY
Height
int
resize(bounds().width, AVALUE);
AVALUE = bounds().height;
100
DEF_ENDLIST
DEF_PROPERTY
Width
int
resize(AVALUE, bounds().height);
AVALUE = bounds().width;
100
DEF_ENDLIST
DEF_PROPERTY
ForegroundColor
Color
setForeground(AVALUE);
AVALUE = getForeground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
BackgroundColor
Color
setBackground(AVALUE);
AVALUE = getBackground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
FontName
String
setFont(new Font(AVALUE, getFont().getStyle(), getFont().getSize()));
AVALUE = getFont().getName();
Courier
DEF_ENDLIST
DEF_PROPERTY
FontStyle
int
setFont(new Font(getFont().getName(), AVALUE, getFont().getSize()));
AVALUE = getFont().getStyle();
Font.PLAIN
DEF_ENDLIST
DEF_PROPERTY
FontSize
int
setFont(new Font(getFont().getName(), getFont().getStyle(), AVALUE));
AVALUE = getFont().getSize();
10
DEF_ENDLIST
DEF_ENDCOMPONENT
DEF_COMPONENTNAME
A7
DEF_SUPERCLASS
Panel
DEF_PACKAGE
mojo
animation
DEF_ENDLIST
DEF_CATEGORY
Database
DEF_THUMBNAIL
npict.bmp
DEF_PANEL
DEF_REQUIRES
FrameChanger
DEF_ENDLIST
DEF_SUBCOMPONENTLIST
DEF_ENDLIST
DEF_DECLARATION
public class Animation extends Panel
// an animation panel component.
String prefix; // animation file prefix
int numberOfFrames; // number of frames of animation
int delay; // delay in milliseconds between frames
int startFrame;
int endFrame;
java.awt.Image frame[];
int currentFrame;
FrameChanger frameChanger;
DEF_ENDLIST
DEF_METHOD
public void changeFrames()
// moves to the next frame in the animation seuqence.
{
currentFrame++;
if (currentFrame > endFrame)
currentFrame = startFrame;
repaint();
}
DEF_ENDLIST
DEF_METHOD
public void paint(Graphics g)
// draw the current frame
{
if (frame == null) {
// frames are not loaded to load them
frame = new java.awt.Image[numberOfFrames + 1];
currentFrame = startFrame;
for (int i = 1; i <= numberOfFrames; i++) {
frame[i] = applet.getImage(applet.getCodeBase(),
prefix + Integer.toString(i)
+ ".gif");
}
// load the frame changer and start the animation
frameChanger = new FrameChanger(applet);
frameChanger.setAnimationDelay(delay);
frameChanger.setAnimationComponent(this);
// start the frame changer
frameChanger.start();
}
g.drawImage(frame[currentFrame], 0, 0, this);
}
DEF_ENDLIST
DEF_METHOD
public void setDelay(int duration)
{
delay = duration;
}
DEF_ENDLIST
DEF_METHOD
public int getDelay()
{
return(delay);
}
DEF_ENDLIST
DEF_METHOD
public void setNumberFrames(int numframes)
{
numberOfFrames = numframes;
}
DEF_ENDLIST
DEF_METHOD
public int getNumberFrames()
{
return(numberOfFrames);
}
DEF_ENDLIST
DEF_METHOD
public void setStartFrame(int frame)
{
startFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getStartFrame()
{
return(startFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setEndFrame(int frame)
{
endFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getEndFrame()
{
return(endFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setPrefix(String fileprefix)
{
prefix = fileprefix;
}
DEF_ENDLIST
DEF_METHOD
public String getPrefix()
{
return(prefix);
}
DEF_ENDLIST
DEF_PROPERTY
First Animation Frame
ANIMATION_FILENAME
setPrefix(AVALUE);
AVALUE = getPrefix();
DEF_ENDLIST
DEF_PROPERTY
Number of Frames
int
setNumberFrames(AVALUE);
AVALUE = getNumberFrames();
0
DEF_ENDLIST
DEF_PROPERTY
Start Frame
int
setStartFrame(AVALUE);
AVALUE = getStartFrame();
0
DEF_ENDLIST
DEF_PROPERTY
End Frame
int
setEndFrame(AVALUE);
AVALUE = getEndFrame();
0
DEF_ENDLIST
DEF_PROPERTY
Delay (in milliseconds)
int
setDelay(AVALUE);
AVALUE = getDelay();
0
DEF_ENDLIST
DEF_PROPERTY
Top
int
move(bounds().x, AVALUE);
AVALUE = bounds().y;
0
DEF_ENDLIST
DEF_PROPERTY
Left
int
move(AVALUE, bounds().y);
AVALUE = bounds().x;
0
DEF_ENDLIST
DEF_PROPERTY
Height
int
resize(bounds().width, AVALUE);
AVALUE = bounds().height;
100
DEF_ENDLIST
DEF_PROPERTY
Width
int
resize(AVALUE, bounds().height);
AVALUE = bounds().width;
100
DEF_ENDLIST
DEF_PROPERTY
ForegroundColor
Color
setForeground(AVALUE);
AVALUE = getForeground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
BackgroundColor
Color
setBackground(AVALUE);
AVALUE = getBackground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
FontName
String
setFont(new Font(AVALUE, getFont().getStyle(), getFont().getSize()));
AVALUE = getFont().getName();
Courier
DEF_ENDLIST
DEF_PROPERTY
FontStyle
int
setFont(new Font(getFont().getName(), AVALUE, getFont().getSize()));
AVALUE = getFont().getStyle();
Font.PLAIN
DEF_ENDLIST
DEF_PROPERTY
FontSize
int
setFont(new Font(getFont().getName(), getFont().getStyle(), AVALUE));
AVALUE = getFont().getSize();
10
DEF_ENDLIST
DEF_ENDCOMPONENT
DEF_COMPONENTNAME
A10
DEF_SUPERCLASS
Panel
DEF_PACKAGE
mojo
animation
DEF_ENDLIST
DEF_CATEGORY
User-defined
DEF_THUMBNAIL
npict.bmp
DEF_PANEL
DEF_REQUIRES
FrameChanger
DEF_ENDLIST
DEF_SUBCOMPONENTLIST
DEF_ENDLIST
DEF_DECLARATION
public class Animation extends Panel
// an animation panel component.
String prefix; // animation file prefix
int numberOfFrames; // number of frames of animation
int delay; // delay in milliseconds between frames
int startFrame;
int endFrame;
java.awt.Image frame[];
int currentFrame;
FrameChanger frameChanger;
DEF_ENDLIST
DEF_METHOD
public void changeFrames()
// moves to the next frame in the animation seuqence.
{
currentFrame++;
if (currentFrame > endFrame)
currentFrame = startFrame;
repaint();
}
DEF_ENDLIST
DEF_METHOD
public void paint(Graphics g)
// draw the current frame
{
if (frame == null) {
// frames are not loaded to load them
frame = new java.awt.Image[numberOfFrames + 1];
currentFrame = startFrame;
for (int i = 1; i <= numberOfFrames; i++) {
frame[i] = applet.getImage(applet.getCodeBase(),
prefix + Integer.toString(i)
+ ".gif");
}
// load the frame changer and start the animation
frameChanger = new FrameChanger(applet);
frameChanger.setAnimationDelay(delay);
frameChanger.setAnimationComponent(this);
// start the frame changer
frameChanger.start();
}
g.drawImage(frame[currentFrame], 0, 0, this);
}
DEF_ENDLIST
DEF_METHOD
public void setDelay(int duration)
{
delay = duration;
}
DEF_ENDLIST
DEF_METHOD
public int getDelay()
{
return(delay);
}
DEF_ENDLIST
DEF_METHOD
public void setNumberFrames(int numframes)
{
numberOfFrames = numframes;
}
DEF_ENDLIST
DEF_METHOD
public int getNumberFrames()
{
return(numberOfFrames);
}
DEF_ENDLIST
DEF_METHOD
public void setStartFrame(int frame)
{
startFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getStartFrame()
{
return(startFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setEndFrame(int frame)
{
endFrame = frame;
}
DEF_ENDLIST
DEF_METHOD
public int getEndFrame()
{
return(endFrame);
}
DEF_ENDLIST
DEF_METHOD
public void setPrefix(String fileprefix)
{
prefix = fileprefix;
}
DEF_ENDLIST
DEF_METHOD
public String getPrefix()
{
return(prefix);
}
DEF_ENDLIST
DEF_PROPERTY
First Animation Frame
ANIMATION_FILENAME
setPrefix(AVALUE);
AVALUE = getPrefix();
DEF_ENDLIST
DEF_PROPERTY
Number of Frames
int
setNumberFrames(AVALUE);
AVALUE = getNumberFrames();
0
DEF_ENDLIST
DEF_PROPERTY
Start Frame
int
setStartFrame(AVALUE);
AVALUE = getStartFrame();
0
DEF_ENDLIST
DEF_PROPERTY
End Frame
int
setEndFrame(AVALUE);
AVALUE = getEndFrame();
0
DEF_ENDLIST
DEF_PROPERTY
Delay (in milliseconds)
int
setDelay(AVALUE);
AVALUE = getDelay();
0
DEF_ENDLIST
DEF_PROPERTY
Top
int
move(bounds().x, AVALUE);
AVALUE = bounds().y;
0
DEF_ENDLIST
DEF_PROPERTY
Left
int
move(AVALUE, bounds().y);
AVALUE = bounds().x;
0
DEF_ENDLIST
DEF_PROPERTY
Height
int
resize(bounds().width, AVALUE);
AVALUE = bounds().height;
100
DEF_ENDLIST
DEF_PROPERTY
Width
int
resize(AVALUE, bounds().height);
AVALUE = bounds().width;
100
DEF_ENDLIST
DEF_PROPERTY
ForegroundColor
Color
setForeground(AVALUE);
AVALUE = getForeground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
BackgroundColor
Color
setBackground(AVALUE);
AVALUE = getBackground();
Color.lightGray
DEF_ENDLIST
DEF_PROPERTY
FontName
String
setFont(new Font(AVALUE, getFont().getStyle(), getFont().getSize()));
AVALUE = getFont().getName();
Courier
DEF_ENDLIST
DEF_PROPERTY
FontStyle
int
setFont(new Font(getFont().getName(), AVALUE, getFont().getSize()));
AVALUE = getFont().getStyle();
Font.PLAIN
DEF_ENDLIST
DEF_PROPERTY
FontSize
int
setFont(new Font(getFont().getName(), getFont().getStyle(), AVALUE));
AVALUE = getFont().getSize();
10
DEF_ENDLIST
DEF_ENDCOMPONENT