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.
-
SlideShow()
- Constructs a new SlideShow.
-
addImageAndDescription(URL, String)
- Add an image URL and associated description to the slide
show image set.
-
display()
- Display the first image.
-
getCurrentImageIndex()
- Return the current image index being displayed.
-
getDescription(int)
- Return the description of the image at the given index.
-
getNumberOfImages()
- Return the number of images in the slide show set.
-
getURL(int)
- Return the URL of the image at the given index.
-
isAtFirstImage()
- Query if displaying first image in slide show set.
-
isAtLastImage()
- Query if displaying last image in slide show set.
-
nextImage()
- Display the next image in the slide show set.
-
preferredSize()
- Returns the recommended dimensions to properly display this component.
-
previousImage()
- Display the previous image in the slide show set.
-
repaint()
- Redraws this component.
-
setDescription(int, String)
- Set the description of the image at the given index.
-
setFirstImage(URL)
- Reset slide show and add first image.
-
setImage(int)
- Display the image at the given index.
-
update(Graphics)
- Handles redrawing of this component on the screen.
SlideShow
public SlideShow()
- Constructs a new SlideShow.
display
public void display()
- Display the first image.
getNumberOfImages
public int getNumberOfImages()
- Return the number of images in the slide show set.
getCurrentImageIndex
public int getCurrentImageIndex()
- Return the current image index being displayed.
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
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
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
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
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
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
nextImage
public int nextImage()
- Display the next image in the slide show set.
- See Also:
- previousImage
previousImage
public int previousImage()
- Display the previous image in the slide show set.
- See Also:
- nextImage
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
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
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
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
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