edu.rit.slides
Class ScreenObject

java.lang.Object
  extended by edu.rit.slides.ScreenObject
All Implemented Interfaces:
Screen

public class ScreenObject
extends Object
implements Screen

Class ScreenObject provides an exported screen object in the Slides application. See interface Screen for a description of how screen objects interact with projector objects.

A screen object maintains a separate SlideSet object which contains the slides to be displayed. Whenever the slide set's contents changes, the screen object notifies the associated ScreenListener. This notification, for example, can be used to update a GUI display.


Field Summary
 
Fields inherited from interface edu.rit.slides.Screen
LEASE_TIME
 
Constructor Summary
ScreenObject(SlideSet theSlideSet, ScreenListener theListener)
          Construct a new screen object.
 
Method Summary
 void availableSlides(Projector theProjector, Eoid[] theSlideIDs)
          Notify this screen that a projector has the given slides available.
 void displaySlides(Projector theProjector, Eoid[] theSlideIDs)
          Display the given slides on this screen.
 void putSlide(Projector theProjector, Eoid theSlideID, Slide theSlide)
          Provide a slide from the given projector to this screen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScreenObject

public ScreenObject(SlideSet theSlideSet,
                    ScreenListener theListener)
Construct a new screen object.

Parameters:
theSlideSet - Slide set to be maintained.
theListener - Screen listener to be notified when the slide set changes.
Throws:
NullPointerException - (unchecked exception) Thrown if theSlideSet is null or theListener is null.
Method Detail

availableSlides

public void availableSlides(Projector theProjector,
                            Eoid[] theSlideIDs)
Notify this screen that a projector has the given slides available. The given array of slide IDs is a complete list of all the slides the projector has available at this time.

Specified by:
availableSlides in interface Screen
Parameters:
theProjector - Unihandle for the projector.
theSlideIDs - Array of zero or more slide IDs (type Eoid) the projector has available.

putSlide

public void putSlide(Projector theProjector,
                     Eoid theSlideID,
                     Slide theSlide)
Provide a slide from the given projector to this screen.

Specified by:
putSlide in interface Screen
Parameters:
theProjector - Unihandle for the projector.
theSlideID - Slide ID (type Eoid).
theSlide - The slide itself.

displaySlides

public void displaySlides(Projector theProjector,
                          Eoid[] theSlideIDs)
Display the given slides on this screen. The given array of slide IDs is a complete list of the slides from the given projector that are to be displayed at this time. Any slides from the given projector that had been displayed are first removed from the display, then the given slides are added to the display.

Specified by:
displaySlides in interface Screen
Parameters:
theProjector - Unihandle for the projector that has the slides.
theSlideIDs - Array of zero or more slide IDs (type Eoid) the projector has available that are to be displayed.


Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.