All Packages Class Hierarchy This Package Previous Next Index
Class ejmf.toolkit.gui.multiimage.MultiImageRenderer
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----com.sun.java.swing.JComponent
|
+----com.sun.java.swing.JLabel
|
+----ejmf.toolkit.gui.multiimage.MultiImageRenderer
- public class MultiImageRenderer
- extends JLabel
- implements Runnable
Displays a series of MultiImageFrames. This could be used to
display a slideshow, animation, etc.
- See Also:
- MultiImageFrames
-
MILLI_TO_NANO
- The number of nanoseconds in a millisecond.
-
SEC_TO_NANO
- The number of nanoseconds in a second.
-
MultiImageRenderer()
- Constructs a MultiImageRenderer.
-
MultiImageRenderer(MultiImageFrame[])
- Constructs a MultiImageRenderer for the given
MultiImageFrames.
-
calculatePreferredSize()
- Set the preferred size to be the max
width x max height of all of the ImageIcons
-
endOfMedia()
- Checks to see if the end of the video has been reached.
-
getDuration()
- Gets the duration of the video in nanoseconds.
-
getNanoseconds()
- Gets the current video time in nanoseconds.
-
getPreferredSize()
- Return the dimension of the largest image.
-
getRate()
- Gets the current rate.
-
getSeconds()
- Gets the current video time in seconds.
-
reset()
- Sets initial values for time and rate
-
run()
- Run by the thread that displays the video.
-
setFrames(MultiImageFrame[])
- Sets the images to display in this MultiImageRenderer.
-
setImageSize(Dimension)
- Sets the preferred size of the video component.
-
setMediaTime(long)
- Sets the offset in nanoseconds from the beginning of the
video.
-
setRate(float)
- Sets the rate of the video.
-
setSeconds(double)
- Sets the offset in seconds from the beginning of the video.
-
start()
- Starts the display of the video.
-
stop()
- Stops the display of the video.
SEC_TO_NANO
public static long SEC_TO_NANO
- The number of nanoseconds in a second.
MILLI_TO_NANO
public static long MILLI_TO_NANO
- The number of nanoseconds in a millisecond.
MultiImageRenderer
public MultiImageRenderer()
- Constructs a MultiImageRenderer. setFrames() must be
called before this MultiImageRenderer will display any
images.
MultiImageRenderer
public MultiImageRenderer(MultiImageFrame frames[])
- Constructs a MultiImageRenderer for the given
MultiImageFrames.
- Parameters:
- frames
- The images to display
setFrames
public void setFrames(MultiImageFrame frames[])
- Sets the images to display in this MultiImageRenderer.
reset
public void reset()
- Sets initial values for time and rate
calculatePreferredSize
public void calculatePreferredSize()
- Set the preferred size to be the max
width x max height of all of the ImageIcons
setMediaTime
public void setMediaTime(long nanoseconds)
- Sets the offset in nanoseconds from the beginning of the
video. If the video is started, the player is stopped and
restarted.
getNanoseconds
public long getNanoseconds()
- Gets the current video time in nanoseconds.
setSeconds
public void setSeconds(double seconds)
- Sets the offset in seconds from the beginning of the video.
If the video is started, the player is stopped and
restarted.
getSeconds
public double getSeconds()
- Gets the current video time in seconds.
getDuration
public long getDuration()
- Gets the duration of the video in nanoseconds.
start
public synchronized void start()
- Starts the display of the video.
setRate
public float setRate(float rate)
- Sets the rate of the video.
- Parameters:
- rate
- The desired rate
- Returns:
- The actual rate set. This will not be
different from the desired rate unless the
desired rate is zero. In that case no new rate
is set and setRate() returns the current rate.
getRate
public float getRate()
- Gets the current rate.
stop
public synchronized void stop()
- Stops the display of the video.
run
public void run()
- Run by the thread that displays the video.
endOfMedia
public boolean endOfMedia()
- Checks to see if the end of the video has been reached. If
the rate is negative, the end of the video is at the
beginning (0).
getPreferredSize
public Dimension getPreferredSize()
- Return the dimension of the largest image.
- Overrides:
- getPreferredSize in class JComponent
setImageSize
public void setImageSize(Dimension d)
- Sets the preferred size of the video component. Call
calculatePreferredSize() to reset the preferred size based
on the size of the images displayed.
All Packages Class Hierarchy This Package Previous Next Index