java.lang.Object
java.util.Observable
de.grogra.video.model.ImageSequence
An
ImageSequence
is able to collect an ordered list of images. Read
and write operations on this list are possible through
ImageSequenceView
and ImageSequenceControl
interfaces. The
sequence is observerable and can notify observers about
ImageSequenceEvent
s, which are triggered by modifications of the
sequence. The sequence manages a list of VideoImage
s and uses a
LinkedList
internally.- Author:
- Dominick Leppich
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int index, VideoImage image) Add aVideoImage
at a specified position in the sequence.void
add
(VideoImage image) Add aVideoImage
at the end of the sequence.void
clear()
Clear the sequence of images.boolean
Check, if a givenObject
is inside this sequence.control()
Get anImageSequenceControl
for this sequence.get
(int index) Get theVideoImage
at a given position.Return theDimension
of the images in this sequence.getList()
Get the whole sequence ofVideoImage
s as aList
.getRegex()
Get the regular expression describing all image files.boolean
isEmpty()
Check, if the sequence is empty.remove
(int index) Remove the image at the specified position.void
reorder()
Renames all files and create a regular expression for all files.int
size()
Return the size of the sequence (the number ofVideoImage
s saved in the sequence).view()
Get anImageSequenceView
for this sequence.Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Field Details
-
ALPHABET
public static final char[] ALPHABET
-
-
Constructor Details
-
ImageSequence
public ImageSequence()
-
-
Method Details
-
add
Add aVideoImage
at the end of the sequence.- Parameters:
image
- -VideoImage
-
add
Add aVideoImage
at a specified position in the sequence.- Parameters:
index
- - Index to insert the imageimage
- -VideoImage
-
clear
public void clear()Clear the sequence of images. -
contains
Check, if a givenObject
is inside this sequence. -
get
Get theVideoImage
at a given position.- Parameters:
index
- - Index to get the image from- Returns:
- The
VideoImage
at the given position
-
getList
Get the whole sequence ofVideoImage
s as aList
.- Returns:
- All
VideoImage
s in aList
-
isEmpty
public boolean isEmpty()Check, if the sequence is empty.- Returns:
- True, if the sequence is empty
-
remove
Remove the image at the specified position.- Parameters:
index
- - Index of the image to remove- Returns:
- The
VideoImage
which was removed
-
size
public int size()Return the size of the sequence (the number ofVideoImage
s saved in the sequence).- Returns:
- The size of the sequence
-
getDimension
Return theDimension
of the images in this sequence. This dimension is unique, because the sequence doesn't allow to add images with mismatching dimensions.- Returns:
VideoImage
dimension of this sequence
-
reorder
public void reorder()Renames all files and create a regular expression for all files. -
getRegex
Get the regular expression describing all image files.- Returns:
- Regular expression
-
view
Get anImageSequenceView
for this sequence. This method will only create one instance.- Returns:
- An
ImageSequenceView
-
control
Get anImageSequenceControl
for this sequence. This method will only create one instance.- Returns:
- An
ImageSequenceControl
-