All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class demo.jcsp.ActiveImageProducer

java.lang.Object
   |
   +----demo.jcsp.ActiveImageProducer

public class ActiveImageProducer
extends Object
implements ImageProducer, CSProcess

Process Diagram

      _____________________
  in |                     |
 ->--| ActiveImageProducer |
     |_____________________|
 

Description

The ActiveImageProducer process has an infinite loop that reads an ImageDefinitions from the producer Channel this data is then added to the image data and the image is updated. The class implements the ImageProducer interface, this can be used to create an Image of the source data that can be displayed on the screen.

Author:
P.D.Austin
See Also:
ImageProducer

Constructor Index

 o ActiveImageProducer(ChannelInput, int, int)
Constructs a new ActiveImageProducer.

Method Index

 o addConsumer(ImageConsumer)
adds a consumer for the image
 o isConsumer(ImageConsumer)
check to see if a consumer is registered with this component.
 o removeConsumer(ImageConsumer)
removes a consumer for the image
 o requestTopDownLeftRightResend(ImageConsumer)
request that the image is redrawn
 o run()
The main body of this process.
 o startProduction(ImageConsumer)
starts production of the image data

Constructors

 o ActiveImageProducer
 public ActiveImageProducer(ChannelInput in,
                            int width,
                            int height)
Constructs a new ActiveImageProducer.

Parameters:
in - The Channel the image data is sent along
width - the width of the image
height - the height of the image

Methods

 o run
 public void run()
The main body of this process.

 o addConsumer
 public void addConsumer(ImageConsumer ic)
adds a consumer for the image

Parameters:
ic - the consumer to add
See Also:
addConsumer
 o isConsumer
 public boolean isConsumer(ImageConsumer ic)
check to see if a consumer is registered with this component.

Parameters:
ic - the consumer to check
Returns:
true if it is registered as a consumer
See Also:
isConsumer
 o removeConsumer
 public void removeConsumer(ImageConsumer ic)
removes a consumer for the image

Parameters:
ic - the consumer to remove
See Also:
removeConsumer
 o startProduction
 public void startProduction(ImageConsumer ic)
starts production of the image data

Parameters:
ic - the consumer that made the request
See Also:
startProduction
 o requestTopDownLeftRightResend
 public void requestTopDownLeftRightResend(ImageConsumer ic)
request that the image is redrawn

Parameters:
ic - the consumer that made the request
See Also:
requestTopDownLeftRightResend

All Packages  Class Hierarchy  This Package  Previous  Next  Index