|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.slides.SlideShow
public class SlideShow
Class SlideShow provides an object that holds a slide show in the Slides
application. A slide show consists of a sequence of zero or more slide
groups. A slide group consists of a set of zero or more slides which
are displayed on the screen together at the same time in a certain order.
Each slide is an instance of class Slide
and consists of a number of individual
SlideItem
s.
Class SlideShow provides methods for populating a slide show object with
slide groups. Each separate slide in the slide show is assigned a unique
slide ID, an instance of class Eoid
.
Class SlideShow provides methods for retrieving all the slide IDs and for
retrieving a certain slide given the slide ID. Class SlideShow provides
methods for retrieving the set of slide IDs in each slide display.
An instance of class SlideShow may be serialized. Class SlideShow provides static convenience methods to write a slide show to a file and read a slide show from a file. A slide show file is simply a binary file that contains a serialized slide show object.
Note: Class SlideShow is not multiple thread safe.
Constructor Summary | |
---|---|
SlideShow()
Construct a new, empty slide show. |
Method Summary | |
---|---|
void |
addSlideGroup(Collection theSlides)
Add the given slide group to the end of this slide show. |
void |
addSlideGroup(Slide[] theSlides)
Add the given slide group to the end of this slide show. |
Slide |
getSlide(Eoid theSlideID)
Obtain the slide with the given slide ID in this slide show. |
Eoid[] |
getSlideGroup(int index)
Obtain the slide group at the given index in this slide show. |
int |
getSlideGroupCount()
Returns the number of slide groups in this slide show. |
Eoid[] |
getSlideIDs()
Obtain the slide IDs of all the slides in this slide show. |
static SlideShow |
read(File theFile)
Read a slide show from the given file. |
void |
readExternal(ObjectInput in)
Read this slide show from the given object input stream. |
static void |
write(SlideShow theSlideShow,
File theFile)
Write the given slide show to the given file. |
void |
writeExternal(ObjectOutput out)
Write this slide show to the given object output stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SlideShow()
Method Detail |
---|
public void addSlideGroup(Collection theSlides)
The slides are obtained by iterating over theSlides. The order of the slides returned by the iterator is the order of the slides for this slide group.
theSlides
- Collection of zero or more slides in the slide group.
NullPointerException
- (unchecked exception) Thrown if theSlides is null or any
element of theSlides is null.public void addSlideGroup(Slide[] theSlides)
theSlides
- Array of zero or more slides in the slide group.
NullPointerException
- (unchecked exception) Thrown if theSlides is null or any
element of theSlides is null.public int getSlideGroupCount()
public Eoid[] getSlideGroup(int index)
Eoid
) that are assigned to the slides in
the slide group.
Note: To assign the slide IDs, this method needs to access the
device properties file. See class DeviceProperties
for further information.
index
- Slide group index in the range 0 ..
getSlideGroupCount().
ArrayIndexOutOfBoundsException
- (unchecked exception) Thrown if index is not in the range
0 .. getSlideGroupCount().public Eoid[] getSlideIDs()
Eoid
) that are assigned to the slides in
this slide show.
Note: To assign the slide IDs, this method needs to access the
device properties file. See class DeviceProperties
for further information.
public Slide getSlide(Eoid theSlideID)
theSlideID
- Slide ID (type
Eoid
).
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- Object output stream.
IOException
- Thrown if an I/O error occurred.public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
in
- Object input stream.
IOException
- Thrown if an I/O error occurred.
ClassNotFoundException
- Thrown if any class needed to deserialize this slide show cannot be
found.public static void write(SlideShow theSlideShow, File theFile) throws IOException
theSlideShow
- Slide show.theFile
- File.
IOException
- Thrown if an I/O error occurred.public static SlideShow read(File theFile) throws IOException, ClassNotFoundException
theFile
- File.
IOException
- Thrown if an I/O error occurred.
ClassNotFoundException
- Thrown if any class needed to deserialize this slide show cannot be
found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |