Package org.opensourcephysics.media.core
Interface DrawableImage
- All Superinterfaces:
Drawable
- All Known Subinterfaces:
InteractiveImage
,Video
- All Known Implementing Classes:
GifVideo
,ImageVideo
,JSMovieVideo
,MovieVideo
,VideoAdapter
,XuggleVideo
This defines methods used by drawable images.
- Version:
- 1.0
- Author:
- Douglas Brown
-
Method Summary
Modifier and TypeMethodDescriptionGets the filter stack.getImage()
Gets the image as a BufferedImage.getProperty
(String name) Gets a user property of the image.Gets an array of user properties names.boolean
Gets the visibility of the image.void
setFilterStack
(FilterStack stack) Sets the filter stack.void
setProperty
(String name, 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, isInteractive
-
Method Details
-
getImage
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
Sets the filter stack.- Parameters:
stack
- the new filter stack
-
getFilterStack
FilterStack getFilterStack()Gets the filter stack.- Returns:
- the filter stack
-
setProperty
Sets a user property of the image.- Parameters:
name
- the name of the propertyvalue
- the value of the property
-
getProperty
Gets a user property of the image. May return null.- Parameters:
name
- the name of the property- Returns:
- the value of the property
-
getPropertyNames
Collection<String> getPropertyNames()Gets an array of user properties names.- Returns:
- a mapping of property names to values
-