ilog.views.appframe.docview
Class IlvFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by ilog.views.appframe.docview.IlvFileFilter

public class IlvFileFilter
extends FileFilter

Defines filters that select files that a file document template can open.


Field Summary
static int READ
          Access mode constant value that specifies that this filter can be used in a file chooser for opening a new file.
static int WRITE
          Access mode constant value that specifies that this filter can be used in a file chooser for saving a file.
 
Constructor Summary
IlvFileFilter(IlvFileDocumentTemplate docTemplate, String extension, String description)
          Constructs an IlvFileFilter that filters files with the specified extension.
 
Method Summary
 boolean accept(File f)
          Determines whether the specified file is accepted by this filter.
 boolean accept(String filename)
          Determines whether the specified filename is accepted by this filter.
 int getAccessMode()
          Returns the access mode of this filter.
 String getDescription()
          Returns the description of this file filter.
 String getExtension()
          Returns the file extension that this filters accepts.
 void setAccessMode(int accessMode)
          Sets the access mode of this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

READ

public static final int READ
Access mode constant value that specifies that this filter can be used in a file chooser for opening a new file.

See Also:
Constant Field Values

WRITE

public static final int WRITE
Access mode constant value that specifies that this filter can be used in a file chooser for saving a file.

See Also:
Constant Field Values
Constructor Detail

IlvFileFilter

public IlvFileFilter(IlvFileDocumentTemplate docTemplate,
                     String extension,
                     String description)
Constructs an IlvFileFilter that filters files with the specified extension.

Parameters:
docTemplate - The file document template that this filter is used for.
extension - The extension of files filtered by this object.
description - The description of the files filtered by this object. This description appears in file choosers initialized with this file filter.
Method Detail

accept

public boolean accept(File f)
Determines whether the specified file is accepted by this filter. By default, this method invokes the accept(String) method with name of the specified file as the parameter.

Specified by:
accept in class FileFilter
Returns:
true if the file is accepted; false otherwise.
See Also:
accept(String)

accept

public boolean accept(String filename)
Determines whether the specified filename is accepted by this filter.

Returns:
true if the filename is accepted; false otherwise.
See Also:
accept(File)

getDescription

public String getDescription()
Returns the description of this file filter.

Specified by:
getDescription in class FileFilter

getExtension

public String getExtension()
Returns the file extension that this filters accepts.


getAccessMode

public int getAccessMode()
Returns the access mode of this filter.

Returns:
A combination of the following values:
See Also:
setAccessMode(int)

setAccessMode

public void setAccessMode(int accessMode)
Sets the access mode of this filter.

Parameters:
accessMode - A combination of the following values:
See Also:
getAccessMode()


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.