All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class primitives.frames.Frames
java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----primitives.frames.Frames
  -  public abstract class Frames
  
-  extends Applet
  
-  implements Runnable, MouseListener
   
Frames is an abstract applet class which provides a standart GUI and provides 
common methods used by its ofsprings.
A Frames consists of a predefined number of frames with a label attached to each frame.
The number of frames created depends on the parameter frames passed to the
Frames object from the applet Tag on the html source. To set the labels under each frame set the 
label-iparameter.
Another common task provided by the Frames class is the creation of a thread which carries
 the refreshing of the Frames objects located in the same html page of this object.
  
  -  
	frameNumber
   -  Number of frames contained by the applet.
  
 -  
	frames
   -  Array of DrawFrame Objects
  
 -  
	index
   -  [?]
  
 -  
	j
   -  
  
 -  
	labels
   -  Array of the Label objects.
  
 -  
	run
   -  A Frames objects signals the refreshing thread it should call its changeFrames method
by setting this flag to true.
  
 -  
	t
   -   a thread object used to refresh Frames object located in appletContext of this object.
  
 -  
	threadSuspended
   -  
Deprecated.
  
 -  
	waitFor
   -  Number of miliseconds to wait between refreshing the Frames object for which run=true.
 
  
  -  
	Frames()
   -  
 
  
  -  
	changeFrames()
   -  changeFrames is repeatedly called by the run method every period stated by the 
waitFor field.
   -  
	destory()
   -  Clears memory set for awt objects associated with this Frames class object.
  
 -  
	getParam(String, int)
   -  Returns parses a given applet Tag parameter to an integer value.
  
 -  
	init()
   -  creates a Frames object with a number of 
DrawFrame and Labels set by the
"frames" parameter of the applet Tag.
   -  
	mouseClicked(MouseEvent)
   -  a mouse click switch the values of the run field.
  
 -  
	mouseEntered(MouseEvent)
   -  Not implemented.
  
 -  
	mouseExited(MouseEvent)
   -  Not implemented.
  
 -  
	mousePressed(MouseEvent)
   -  Not implemented.
  
 -  
	mouseReleased(MouseEvent)
   -  Not implemented.
  
 -  
	run()
   -  calls the changeFrame method of all Frames object on this appletContext with the run flag
set to true.
  
 -  
	start()
   -  
Deprecated.
  
 -  
	startThread()
   -  activates the static thread t.
  
 -  
	stop()
   -  sets the thread t to null, this ensurse that the thread t will be envoced by a Frames object
of the current appletContext.
 
  
labels
 public Label labels[]
  -  Array of the Label objects.
 
frames
 public DrawFrame frames[]
  -  Array of DrawFrame Objects
  
 
    -  See Also:
    
 -  DrawFrame
  
 
 
 
frameNumber
 public int frameNumber
  -  Number of frames contained by the applet.
[should be hidden.]
 
index
 protected int index
  -  [?]
 
waitFor
 protected int waitFor
  -  Number of miliseconds to wait between refreshing the Frames object for which run=true.
  
 
    -  See Also:
    
 -  run
  
 
 
 
run
 public boolean run
  -  A Frames objects signals the refreshing thread it should call its changeFrames method
by setting this flag to true.
  
 
    -  See Also:
    
 -  changeFrames
  
 
 
 
j
 int j
t
 protected static Thread t
  -  a thread object used to refresh Frames object located in appletContext of this object.
 declaring 
t static assures only one thread is created to refresh all applets.
 
threadSuspended
 public boolean threadSuspended
-  Note: threadSuspended is deprecated.
 
  
Frames
 public Frames()
  
startThread
 protected void startThread()
  -  activates the static thread t.
you can set a "waitFor" parameter at the applet Tag to specify the number of milliseconds
to wait between refresh.
 
run
 public void run()
  -  calls the changeFrame method of all Frames object on this appletContext with the run flag
set to true.
  
    -  See Also:
    
 -  changeFrames
  
 
 
 
init
 public void init()
  -  creates a Frames object with a number of 
DrawFrame and Labels set by the
"frames" parameter of the applet Tag.
  
    -  Overrides:
    
 -  init in class Applet
  
 
 
 
changeFrames
 protected void changeFrames()
  -  changeFrames is repeatedly called by the run method every period stated by the 
waitFor field.
every object inherting from Frames and needs to updated should override this method.
The changeFrames method of class Frames does nothing.
  
    -  See Also:
    
 -  run
  
 
 
 
getParam
 protected int getParam(String name,
                        int defValue)
  -  Returns parses a given applet Tag parameter to an integer value.
If there is no parameter with the given name or the value of 
 the parameter is not a valid integer a default value is returned.
  
    -  Parameters:
    
 -  name - the parameter name.
    
-  defValue - a default integer value.
    
  -  Returns:
    
 -  the integer value associated with 
name.
   
 
 
start
 public void start()
-  Note: start() is deprecated.
  
    -  Overrides:
    
 -  start in class Applet
  
 
 
 
stop
 public void stop()
  -  sets the thread t to null, this ensurse that the thread t will be envoced by a Frames object
of the current appletContext.
Also frees memory associated by the graphic buffers of the fraemes[].drawArea members.
  
    -  Overrides:
    
 -  stop in class Applet
  
 
 
 
destory
 public void destory()
  -  Clears memory set for awt objects associated with this Frames class object.
 
mouseClicked
 public void mouseClicked(MouseEvent m)
  -  a mouse click switch the values of the run field.
  
    -  See Also:
    
 -  run
  
 
 
 
mousePressed
 public void mousePressed(MouseEvent e)
  -  Not implemented.
 
mouseReleased
 public void mouseReleased(MouseEvent e)
  -  Not implemented.
 
mouseEntered
 public void mouseEntered(MouseEvent e)
  -  Not implemented.
 
mouseExited
 public void mouseExited(MouseEvent e)
  -  Not implemented.
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index