|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public class Image
extends java.lang.Object
| Constructor and Description |
|---|
Image(java.lang.String fileName)
Creates a new Image object with specified file name.
|
Image(java.lang.String fileName,
java.lang.String title,
int duration)
Creates a new Image object with specified file name,
durations and title.
|
| Modifier and Type | Method and Description |
|---|---|
void |
displayImage()
Displays the image specified by fileName in a JFrame window.
|
int |
getDuration()
Returns the duration for this image (in seconds).
|
java.lang.String |
getFile()
Returns the file name associated with this image.
|
java.lang.String |
getTitle()
Returns the title of this image.
|
void |
setDuration(int duration)
Sets the duration for this image to the one given.
|
void |
setTitle(java.lang.String title)
Sets the title of this image.
|
java.lang.String |
toString()
Returns the string representation of this image in the form:
|
public Image(java.lang.String fileName)
fileName - the name of the file containing the image.public Image(java.lang.String fileName,
java.lang.String title,
int duration)
fileName - the name of the file containing the image.title - the title (or caption) of the image.duration - the duration of the image's display.public java.lang.String getFile()
public int getDuration()
public java.lang.String getTitle()
public void setDuration(int duration)
duration - the new duration (in hundreths of seconds) for this photopublic void setTitle(java.lang.String title)
title - the new title for this photopublic java.lang.String toString()
title [file_name ,duration]
If title is null we use:file_name [duration]
toString in class java.lang.Objectpublic void displayImage()
throws java.lang.InterruptedException
java.lang.InterruptedException