Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.smardec.asc.filechooser
Class AscFileFilter

    java.lang.Object
      |
      +--javax.swing.filechooser.FileFilter
            |
            +--com.smardec.asc.filechooser.AscFileFilter

public class AscFileFilter
extends javax.swing.filechooser.FileFilter

`AscFileFilter` is a convenience implementation of `javax.swing.filechooser.FileFilter` that filters out all files except for those names and extensions that it knows about. `AscFileFilter` supports '*' and '?' masks to specify file names and extensions. By default `AscFileFilter` shows files with any names and any extensions.

Constructor Summary
`AscFileFilter()` Constructs a `AscFileFilter` that shows files with any names and any extensions.
`AscFileFilter(java.lang.String fileExtensions, java.lang.String fileDescription)` Constructs a `AscFileFilter` that shows files with specified file extensions and description.
`AscFileFilter(java.lang.String fileExtensions, java.lang.String fileNames, java.lang.String fileDescription)` Constructs a `AscFileFilter` that shows files with specified file names, file extensions and description.
`AscFileFilter(java.lang.String fileExtensions, java.lang.String fileNames, java.lang.String fileDescription, javax.swing.Icon icon)` Constructs a `AscFileFilter` that shows files with specified file names, file extensions, description and icon.

Method Summary
`java.lang.String` | `getFileExtensions()` Returns file extensions that are shown by this `AscFileFilter`.
`java.lang.String` | `getFileNames()` Returns file names that are shown by this `AscFileFilter`.
`javax.swing.Icon` | `getIcon()` Returns the icon of this `AscFileFilter`.
`void` | `setDescription(java.lang.String fileDescription)` Specifies the description for this `AscFileFilter`.
`void` | `setFileExtensions(java.lang.String fileExtensions)` Specifies file extensions that are shown by this `AscFileFilter`.
`void` | `setFileNames(java.lang.String fileNames)` Specifies file names that are shown by this `AscFileFilter`.
`void` | `setIcon(javax.swing.Icon icon)` Specifies the icon for this `AscFileFilter`.

Methods inherited from class javax.swing.filechooser.FileFilter
`accept, getDescription`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AscFileFilter

    public AscFileFilter()

  Constructs a `AscFileFilter` that shows files with any names and any extensions.

See Also:
  `setFileExtensions(String)`, `setFileNames(String)`

### AscFileFilter

    public AscFileFilter(java.lang.String fileExtensions,
                         java.lang.String fileNames,
                         java.lang.String fileDescription,
                         javax.swing.Icon icon)

  Constructs a `AscFileFilter` that shows files with specified file names, file extensions, description and icon.

Parameters:
  `fileExtensions` - file extensions separated by semicolon
  `fileNames` - file names separated by semicolon
  `fileDescription` - description of this filter
  `icon` - icon of this filter

### AscFileFilter

    public AscFileFilter(java.lang.String fileExtensions,
                         java.lang.String fileNames,
                         java.lang.String fileDescription)

  Constructs a `AscFileFilter` that shows files with specified file names, file extensions and description.

Parameters:
  `fileExtensions` - file extensions separated by semicolon
  `fileNames` - file names separated by semicolon
  `fileDescription` - description of this filter

### AscFileFilter

    public AscFileFilter(java.lang.String fileExtensions,
                         java.lang.String fileDescription)

  Constructs a `AscFileFilter` that shows files with specified file extensions and description.

Parameters:
  `fileExtensions` - file extensions separated by semicolon
  `fileDescription` - description of this filter

Method Detail

### getFileExtensions

    public java.lang.String getFileExtensions()

  Returns file extensions that are shown by this `AscFileFilter`. The string contains file extensions separated by semicolon.

  Returns:
    file extensions that are shown by this `AscFileFilter`
  See Also:
    `setFileExtensions(String)`

### setFileExtensions

    public void setFileExtensions(java.lang.String fileExtensions)

  Specifies file extensions that are shown by this `AscFileFilter`. All file extensions different from specified ones are filtered out. Parameter `fileExtensions` contains file extensions separated by semicolon. You can use masks to specify names ('*' and '?' can be used).

  Sample usage:

       ascFileFilter.setFileExtensions("html;htm");

  Parameters:
    `fileExtensions` - file extensions for this `AscFileFilter`
  See Also:
    `setFileExtensions(String)`

### getFileNames

    public java.lang.String getFileNames()

  Returns file names that are shown by this `AscFileFilter`. The string contains file names separated by semicolon.

  Returns:
    file names that are shown by this `AscFileFilter`
  See Also:
    `setFileNames(String)`

### setFileNames

    public void setFileNames(java.lang.String fileNames)

  Specifies file names that are shown by this `AscFileFilter`. All file names different from specified ones are filtered out. Parameter `fileNames` contains file names separated by semicolon. You can use masks to specify names ('*' and '?' can be used).

  Sample usage:

       ascFileFilter.setFileNames("example*;sample*");

  Parameters:
    `fileNames` - file names for this `AscFileFilter`
  See Also:
    `getFileNames()`

### setDescription

    public void setDescription(java.lang.String fileDescription)

  Specifies the description for this `AscFileFilter`.

  Parameters:
    `fileDescription` - of this `AscFileFilter`

### getIcon

    public javax.swing.Icon getIcon()

  Returns the icon of this `AscFileFilter`. This icon is used by `JAscFileChooser` to create `javax.swing.filechooser.FileView`.

  Returns:
    the icon of this `AscFileFilter`.

### setIcon

    public void setIcon(javax.swing.Icon icon)

  Specifies the icon for this `AscFileFilter`. This icon is used by `JAscFileChooser` to create `javax.swing.filechooser.FileView`.

Overview | Package | Class | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2006 Smardec. All Rights Reserved.