All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.multimedia.SlideShow

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----symantec.itools.multimedia.SlideShow

public class SlideShow
extends Panel
This is a basic graphical image "slide show" component. Displays a series of images with descriptive text.


Constructor Index

 o SlideShow()
Constructs a new SlideShow.

Method Index

 o addImageAndDescription(URL, String)
Add an image URL and associated description to the slide show image set.
 o display()
Display the first image.
 o getCurrentImageIndex()
Return the current image index being displayed.
 o getDescription(int)
Return the description of the image at the given index.
 o getNumberOfImages()
Return the number of images in the slide show set.
 o getURL(int)
Return the URL of the image at the given index.
 o isAtFirstImage()
Query if displaying first image in slide show set.
 o isAtLastImage()
Query if displaying last image in slide show set.
 o nextImage()
Display the next image in the slide show set.
 o preferredSize()
Returns the recommended dimensions to properly display this component.
 o previousImage()
Display the previous image in the slide show set.
 o repaint()
Redraws this component.
 o setDescription(int, String)
Set the description of the image at the given index.
 o setFirstImage(URL)
Reset slide show and add first image.
 o setImage(int)
Display the image at the given index.
 o update(Graphics)
Handles redrawing of this component on the screen.

Constructors

 o SlideShow
  public SlideShow()
Constructs a new SlideShow.

Methods

 o display
  public void display()
Display the first image.

 o getNumberOfImages
  public int getNumberOfImages()
Return the number of images in the slide show set.

 o getCurrentImageIndex
  public int getCurrentImageIndex()
Return the current image index being displayed.

 o addImageAndDescription
  public int addImageAndDescription(URL url,
                                    String description)
Add an image URL and associated description to the slide show image set.

Parameters:
url - URL of image file
description - description of image
Returns:
int - index of added image in slide show set
 o getURL
  public URL getURL(int index)
Return the URL of the image at the given index.

Parameters:
index - index of image to retrieve URL of
Returns:
URL - URL of image at given index
 o getDescription
  public String getDescription(int index)
Return the description of the image at the given index.

Parameters:
index - index of image to retrieve description of
Returns:
String - description of image at given index
See Also:
setDescription
 o setDescription
  public void setDescription(int index,
                             String str)
Set the description of the image at the given index.

Parameters:
index - index of description to set
str - description string
See Also:
getDescription
 o isAtLastImage
  public boolean isAtLastImage()
Query if displaying last image in slide show set.

Returns:
boolean - true if displaying last image; false otherwise
See Also:
isAtFirstImage
 o isAtFirstImage
  public boolean isAtFirstImage()
Query if displaying first image in slide show set.

Returns:
boolean - true if displaying first image; false otherwise
See Also:
isAtLastImage
 o nextImage
  public int nextImage()
Display the next image in the slide show set.

See Also:
previousImage
 o previousImage
  public int previousImage()
Display the previous image in the slide show set.

See Also:
nextImage
 o setImage
  public int setImage(int index)
Display the image at the given index.

Parameters:
index - index of the image to display
str - description string
Returns:
int - image index being displayed
 o preferredSize
  public Dimension preferredSize()
Returns the recommended dimensions to properly display this component. This is a standard Java AWT method which gets called to determine the recommended size of this component.

Returns:
If no image has been loaded, a dimension of 10 by 10 is returned. If an image has been loaded, the height and width of the image is returned.
Overrides:
preferredSize in class Container
See Also:
minimumSize
 o repaint
  public void repaint()
Redraws this component. This is a standard Java AWT method which gets called to redraw this component. It results in a call to update() as soon as possible.

Overrides:
repaint in class Component
See Also:
update, paint
 o update
  public void update(Graphics g)
Handles redrawing of this component on the screen. This is a standard Java AWT method which gets called by the Java AWT (repaint()) to handle repainting this component on the screen. The graphics context clipping region is set to the bounding rectangle of this component and its <0,0> coordinate is this component's top-left corner. Typically this method paints the background color to clear the component's drawing space, sets graphics context to be the foreground color, and then calls paint() to draw the component. It is overridden here to reduce flicker by eliminating the uneeded clearing of the background.

Parameters:
g - the graphics context
Overrides:
update in class Component
See Also:
repaint, paint
 o setFirstImage
  public void setFirstImage(URL url)
Reset slide show and add first image.

Parameters:
url - url of first slide image, if null slide show is reinitialized

All Packages  Class Hierarchy  This Package  Previous  Next  Index