org.opensourcephysics.media.core
Interface DrawableImage

All Superinterfaces:
Drawable
All Known Subinterfaces:
InteractiveImage, Video
All Known Implementing Classes:
GifVideo, ImageVideo, VideoAdapter

public interface DrawableImage
extends Drawable

This defines methods used by drawable images.

Version:
1.0
Author:
Douglas Brown

Method Summary
 FilterStack getFilterStack()
          Gets the filter stack.
 java.awt.image.BufferedImage getImage()
          Gets the image as a BufferedImage.
 java.lang.Object getProperty(java.lang.String name)
          Gets a user property of the image.
 java.util.Collection<java.lang.String> getPropertyNames()
          Gets an array of user properties names.
 boolean isVisible()
          Gets the visibility of the image.
 void setFilterStack(FilterStack stack)
          Sets the filter stack.
 void setProperty(java.lang.String name, java.lang.Object value)
          Sets a user property of the image.
 void setVisible(boolean visible)
          Shows or hides the image.
 
Methods inherited from interface org.opensourcephysics.display.Drawable
draw
 

Method Detail

getImage

java.awt.image.BufferedImage getImage()
Gets the image as a BufferedImage.

Returns:
the image as a BufferedImage

setVisible

void setVisible(boolean visible)
Shows or hides the image.

Parameters:
visible - true to make the image visible

isVisible

boolean isVisible()
Gets the visibility of the image.

Returns:
true if the image is visible

setFilterStack

void setFilterStack(FilterStack stack)
Sets the filter stack.

Parameters:
stack - the new filter stack

getFilterStack

FilterStack getFilterStack()
Gets the filter stack.

Returns:
the filter stack

setProperty

void setProperty(java.lang.String name,
                 java.lang.Object value)
Sets a user property of the image.

Parameters:
name - the name of the property
value - the value of the property

getProperty

java.lang.Object getProperty(java.lang.String name)
Gets a user property of the image. May return null.

Parameters:
name - the name of the property
Returns:
the value of the property

getPropertyNames

java.util.Collection<java.lang.String> getPropertyNames()
Gets an array of user properties names.

Returns:
a mapping of property names to values