Class GhostFilter

Direct Known Subclasses:
DarkGhostFilter

public class GhostFilter extends Filter
This is a Filter that produces fading ghost images of bright objects on a dark background.
Version:
1.0
Author:
Douglas Brown
  • Field Details

    • fade

      protected double fade
    • defaultFade

      protected double defaultFade
    • inspector

      protected GhostFilter.Inspector inspector
    • fadeLabel

      protected JLabel fadeLabel
    • fadeField

      protected NumberField fadeField
    • fadeSlider

      protected JSlider fadeSlider
    • values

      protected int[] values
  • Constructor Details

    • GhostFilter

      public GhostFilter()
      Constructs a GhostFilter object with default fade.
  • Method Details

    • setFade

      public void setFade(double fade)
      Sets the fade.
      Parameters:
      fade - the fraction by which a ghost image fades each time it is rendered. A fade of 0 never fades, while a fade of 1 fades completely and so is never seen.
    • getFade

      public double getFade()
      Gets the fade.
      Returns:
      the fade.
      See Also:
    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides the setEnabled method to force reinitialization.
      Overrides:
      setEnabled in class Filter
      Parameters:
      enabled - true if this is enabled.
    • newInspector

      protected Filter.InspectorDlg newInspector()
      Specified by:
      newInspector in class Filter
    • initInspector

      protected Filter.InspectorDlg initInspector()
      Specified by:
      initInspector in class Filter
    • clear

      public void clear()
      Clears ghosts.
      Overrides:
      clear in class Filter
    • refresh

      public void refresh()
      Refreshes this filter's GUI
      Overrides:
      refresh in class Filter
    • initializeSubclass

      protected void initializeSubclass()
      Creates and initializes the input and output images.
      Specified by:
      initializeSubclass in class Filter
      Parameters:
      image - a new source image
    • setOutputPixels

      protected void setOutputPixels()
      Sets the output image pixels to a ghost of the input pixels.
      Specified by:
      setOutputPixels in class Filter
    • getLoader

      public static XML.ObjectLoader getLoader()
      Returns an XML.ObjectLoader to save and load filter data.
      Returns:
      the object loader