Main Page Cookbook/Overview ImageMeister the jcprops file Licensing Binary Installation & Configuration [ Win · Mac · Nix ] Changes Public API Source Code Main Page Java [ Common · Win · Mac · Nix ] Native Code [ Common · Win · Mac · Nix ] Manifest Native Code Overviews [ Common · Win · Mac · Nix · Strings ] Macros [ General · Native Macros ] Walkthroughs [ Java only · Java and native ] Building [ Win · Mac · Nix ] Distribution Issues

    All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.tolstoy.imagemeister.PIMDiskFilter

    java.lang.Object
       |
       +----com.tolstoy.imagemeister.PIMDiskFilter

Summary

    class  PIMDiskFilter
         extends java.lang.Object
         implements com.jconfig.DiskFilter
    {
              // Fields 6
         private static final String copyrightString;
         private int count;
         private Vector items;
         private int maxToReturn;
         private int numPlugins;
         private Vector plugins;

              // Constructors 1
         PIMDiskFilter(int, Vector);

              // Methods 3
         DiskObject[] getArray();
         private boolean passesTest(DiskObject);
         public boolean visit(DiskObject);
    }

A DiskFilter implementation which gets a list of the files shown when the 'Show all files' checkbox is *not* selected. To use:

- create an object of this class, passing a Vector containing a list of PluginI objects to the constructor.
- Then, call a DiskObject's iterate() method with this object.
- The DiskObject will call this object's visit() method with each DiskObject contained within the former DiskObject.
- If the DiskObject passed to visit() is a folder, it's added to the 'items' vector.
- If the DiskObject passed to visit() is a file, the canCreateImageViewer() method of each of the PluginI objects in 'plugins' is called, and if that method returns true, it is added to the 'items' vector.
- Finally, after the DiskObject's iterate() method returns, call the 'getArray()' method to get the list of DiskObjects compiled by the visit() method.

See the PluginManager's runDiskFilter() for an example.

Author:
  Copyright (c) 1997,1998,1999,2000 Samizdat Productions. All Rights Reserved.

Fields

### · copyrightString | Summary | Top

       private static final String copyrightString

### · items | Summary | Top

       private Vector items

### · plugins | Summary | Top

       private Vector plugins

### · count | Summary | Top

       private int count

### · maxToReturn | Summary | Top

       private int maxToReturn

### · numPlugins | Summary | Top

       private int numPlugins

Constructors

### · PIMDiskFilter | Summary | Top

       PIMDiskFilter(int max,
                     Vector plgs)

Methods

### · getArray | Summary | Top

       DiskObject[] getArray()

### · passesTest | Summary | Top

       private boolean passesTest(DiskObject diskObj)

### · visit | Summary | Top

       public boolean visit(DiskObject diskObj)

> Implements:
>   visit in interface DiskFilter

    All Packages  This Package  Class Hierarchy  Class Search  Index

Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7