|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.media.core.Filter
public abstract class Filter
This is the abstract base class for all image filters. Note: subclasses should always provide a no-argument constructor.
Field Summary | |
---|---|
protected javax.swing.JButton |
ableButton
|
protected javax.swing.JButton |
clearButton
|
protected javax.swing.JButton |
closeButton
|
protected javax.swing.JMenuItem |
deleteItem
|
protected javax.swing.Action |
enabledAction
|
protected javax.swing.JCheckBoxMenuItem |
enabledItem
|
protected java.awt.Frame |
frame
|
protected boolean |
hasInspector
|
boolean |
inspectorVisible
true if the filter inspector is visible |
int |
inspectorX
the x-component of inspector position |
int |
inspectorY
the y-component of inspector position |
protected javax.swing.JMenuItem |
propertiesItem
|
protected FilterStack |
stack
|
protected java.beans.PropertyChangeSupport |
support
|
VideoPanel |
vidPanel
the VideoPanel this is used for |
Constructor Summary | |
---|---|
protected |
Filter()
Constructs a Filter object. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this filter. |
void |
addPropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to this filter. |
void |
clear()
Clears the filter. |
abstract java.awt.image.BufferedImage |
getFilteredImage(java.awt.image.BufferedImage sourceImage)
Applies the filter to a source image and returns the result. |
abstract javax.swing.JDialog |
getInspector()
Returns a JDialog inspector for controlling filter properties. |
javax.swing.JMenu |
getMenu(Video video)
Returns a menu with items that control this filter. |
boolean |
isEnabled()
Gets whether this filter is enabled. |
void |
refresh()
Refreshes this filter's GUI |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener from this filter. |
void |
removePropertyChangeListener(java.lang.String property,
java.beans.PropertyChangeListener listener)
Removes a PropertyChangeListener for a specified property. |
void |
setEnabled(boolean enabled)
Sets whether this filter is enabled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public VideoPanel vidPanel
public boolean inspectorVisible
public int inspectorX
public int inspectorY
protected java.beans.PropertyChangeSupport support
protected javax.swing.Action enabledAction
protected javax.swing.JCheckBoxMenuItem enabledItem
protected javax.swing.JMenuItem deleteItem
protected javax.swing.JMenuItem propertiesItem
protected boolean hasInspector
protected java.awt.Frame frame
protected javax.swing.JButton closeButton
protected javax.swing.JButton ableButton
protected javax.swing.JButton clearButton
protected FilterStack stack
Constructor Detail |
---|
protected Filter()
Method Detail |
---|
public abstract java.awt.image.BufferedImage getFilteredImage(java.awt.image.BufferedImage sourceImage)
sourceImage
- the source image
public abstract javax.swing.JDialog getInspector()
public void clear()
public void refresh()
public void setEnabled(boolean enabled)
enabled
- true
if this is enabled.public boolean isEnabled()
true
if this is enabled.public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the object requesting property change notificationpublic void addPropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
property
- the name of the property of interest to the listenerlistener
- the object requesting property change notificationpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener
- the listener requesting removalpublic void removePropertyChangeListener(java.lang.String property, java.beans.PropertyChangeListener listener)
property
- the name of the propertylistener
- the listener to removepublic javax.swing.JMenu getMenu(Video video)
video
- the video using the filter (may be null)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |