|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.media.core.VideoAdapter
org.opensourcephysics.media.core.ImageVideo
public class ImageVideo
This is a Video assembled from one or more still images.
Field Summary | |
---|---|
protected java.awt.Dimension |
dim
|
protected java.awt.Image[] |
images
|
protected java.util.ArrayList |
newPaths
|
protected java.awt.Component |
observer
|
protected java.util.ArrayList |
paths
|
Fields inherited from class org.opensourcephysics.media.core.VideoAdapter |
---|
aspects, bufferedImage, coords, endFrameNumber, filteredImage, filterStack, frameCount, frameNumber, isMeasured, isValidFilteredImage, isValidImage, isValidMeasure, looping, maxX, maxY, minX, minY, mouseEnabled, playing, properties, rate, rawImage, size, startFrameNumber, support, visible, widthDominates |
Constructor Summary | |
---|---|
ImageVideo(java.awt.Image image)
Creates an ImageVideo from an image. |
|
ImageVideo(java.lang.String imageName)
Creates an ImageVideo and loads a named image or image sequence. |
|
ImageVideo(java.lang.String imageName,
boolean sequence)
Creates an ImageVideo and loads a named image or image sequence. |
Method Summary | |
---|---|
void |
append(java.lang.String imageName)
Appends the named image or image sequence to the end of this video. |
void |
append(java.lang.String imageName,
boolean sequence)
Appends the named image or image sequence to the end of this video. |
protected void |
finalize()
Called by the garbage collector when this video is no longer in use. |
java.awt.Dimension |
getDimension()
|
java.awt.Image[] |
getImages()
Gets the image array. |
static XML.ObjectLoader |
getLoader()
Returns an XML.ObjectLoader to save and load ImageVideo data. |
protected void |
insert(java.awt.Image[] newImages,
int index)
Inserts images starting at the specified index. |
void |
insert(java.awt.Image image,
int index)
Inserts an image at the specified index. |
void |
insert(java.lang.String imageName,
int index)
Inserts the named image or image sequence at the specified index. |
void |
insert(java.lang.String imageName,
int index,
boolean sequence)
Inserts the named image or image sequence at the specified index. |
java.lang.String |
remove(int index)
Removes the image at the specified index. |
void |
setFrameNumber(int n)
Overrides VideoAdapter setFrameNumber method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.awt.Component observer
protected java.awt.Image[] images
protected java.util.ArrayList paths
protected java.util.ArrayList newPaths
protected java.awt.Dimension dim
Constructor Detail |
---|
public ImageVideo(java.lang.String imageName) throws java.io.IOException
imageName
- the name of the image file
java.io.IOException
public ImageVideo(java.lang.String imageName, boolean sequence) throws java.io.IOException
imageName
- the name of the image filesequence
- true to automatically load image sequence, if any
java.io.IOException
public ImageVideo(java.awt.Image image)
image
- the imageMethod Detail |
---|
public void setFrameNumber(int n)
setFrameNumber
in interface Video
setFrameNumber
in class VideoAdapter
n
- the desired frame numberVideo.getStartFrameNumber()
,
Video.getEndFrameNumber()
public java.awt.Image[] getImages()
public void append(java.lang.String imageName) throws java.io.IOException
imageName
- the image name
java.io.IOException
public void append(java.lang.String imageName, boolean sequence) throws java.io.IOException
imageName
- the image namesequence
- true to automatically load image sequence, if any
java.io.IOException
public void insert(java.lang.String imageName, int index) throws java.io.IOException
imageName
- the image nameindex
- the index
java.io.IOException
public void insert(java.lang.String imageName, int index, boolean sequence) throws java.io.IOException
imageName
- the image nameindex
- the indexsequence
- true to automatically load image sequence, if any
java.io.IOException
public void insert(java.awt.Image image, int index)
image
- the imageindex
- the indexpublic java.lang.String remove(int index)
index
- the index
public java.awt.Dimension getDimension()
protected void finalize()
finalize
in class VideoAdapter
protected void insert(java.awt.Image[] newImages, int index)
newImages
- an array of imagespublic static XML.ObjectLoader getLoader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |