Package VASSAL.search

Class AbstractImageFinder

java.lang.Object
VASSAL.search.AbstractImageFinder
All Implemented Interfaces:
ImageSearchTarget
Direct Known Subclasses:
AbstractBuildable, BasicPiece, Decorator, Stack

public abstract class AbstractImageFinder extends Object implements ImageSearchTarget
Abstract implementation of ImageSearchTarget interface. Used to find images contained by components/pieces/traits for "Image Purge" tool,
  • Constructor Details

    • AbstractImageFinder

      public AbstractImageFinder()
  • Method Details

    • getAllImageNames

      public SortedSet<String> getAllImageNames()
      Specified by:
      getAllImageNames in interface ImageSearchTarget
      Returns:
      names of all images used by the component and any subcomponents
    • addImageNamesRecursively

      public void addImageNamesRecursively(Collection<String> s)
      Adds all images used by this component AND any children (or inner decorators/pieces) to the collection.
      Specified by:
      addImageNamesRecursively in interface ImageSearchTarget
      Parameters:
      s - Collection to add image names to
    • getLocalImageNames

      public SortedSet<String> getLocalImageNames()
      Specified by:
      getLocalImageNames in interface ImageSearchTarget
      Returns:
      names of all images used by this component
    • addLocalImageNames

      public void addLocalImageNames(Collection<String> s)
      Classes extending AbstractImageFinder should override this method in order to add the names of any image files they use to the collection.
      Specified by:
      addLocalImageNames in interface ImageSearchTarget
      Parameters:
      s - Collection to add image names to