jimgpnt.util
Class ImageIOFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by jimgpnt.util.ImageIOFileFilter

public class ImageIOFileFilter
extends javax.swing.filechooser.FileFilter

A FileFilter that is based on an ArrayList of file extension strings related to ImageIO. There are a few static methods here for creating FileFilters based on what ImageIO will read or write. In some cases the ImageIOFileFilter will be passes an ImageWriteSpi so you can get it later to use the correct writer for the file type specified by the FileFilter.

Copyright (c) 2004 Alistair Dickie. All Rights Reserved. See alistairdickie.com for contact details See licence.txt for licence infomation


Constructor Summary
ImageIOFileFilter(java.lang.String description, java.util.ArrayList fileExtStrings, javax.imageio.spi.ImageWriterSpi spi)
           
 
Method Summary
 boolean accept(java.io.File pathname)
           
 int getBiType()
           
 java.lang.String getDescription()
           
 java.util.ArrayList getFileExtStrings()
           
static java.util.ArrayList getImageIOReaderSuffix()
           
static javax.swing.filechooser.FileFilter getImageReaderFilter()
           
 javax.imageio.ImageWriter getImageWriter()
           
static java.util.ArrayList getImageWriterFilters()
           
 java.lang.String getPreferredExtString()
           
 boolean isSupportsAlpha()
           
static void main(java.lang.String[] args)
           
 void setBiType(int biType)
           
 void setSupportsAlpha(boolean supportsAlpha)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageIOFileFilter

public ImageIOFileFilter(java.lang.String description,
                         java.util.ArrayList fileExtStrings,
                         javax.imageio.spi.ImageWriterSpi spi)
Method Detail

accept

public boolean accept(java.io.File pathname)
Specified by:
accept in class javax.swing.filechooser.FileFilter

getFileExtStrings

public java.util.ArrayList getFileExtStrings()

getPreferredExtString

public java.lang.String getPreferredExtString()

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in class javax.swing.filechooser.FileFilter

getImageWriter

public javax.imageio.ImageWriter getImageWriter()

getBiType

public int getBiType()

setBiType

public void setBiType(int biType)

isSupportsAlpha

public boolean isSupportsAlpha()

setSupportsAlpha

public void setSupportsAlpha(boolean supportsAlpha)

getImageWriterFilters

public static java.util.ArrayList getImageWriterFilters()

getImageReaderFilter

public static javax.swing.filechooser.FileFilter getImageReaderFilter()

getImageIOReaderSuffix

public static java.util.ArrayList getImageIOReaderSuffix()

main

public static void main(java.lang.String[] args)


Copyright © 2004 Alistair Dickie. All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

1. The origin of this Software must not be misrepresented; you must not claim that you wrote the original software. If you use the Software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original Software.

3. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Alistair Dickie - See alistairdickie.com for contact details.