org.gnu.gtk

Class FileFilter


public class FileFilter
extends GObject

Constructor Summary

FileFilter()
Creates a new FileFilter with no rules added to it.

Method Summary

void
addMimeType(String mimeType)
Adds a rule allowing a given mime type to filter.
void
addPattern(String pattern)
Adds a rule allowing a shell style glob to a filter.
String
getName()
Returns the human readable name of the file filter.
void
setName(String name)
Sets the human readable name for the filter.

Methods inherited from class org.gnu.glib.GObject

addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify

Constructor Details

FileFilter

public FileFilter()
Creates a new FileFilter with no rules added to it. Such a filter doesn't accept any files, so is not particularly useful until you add rules with addMimeType() or addPattern().

Method Details

addMimeType

public void addMimeType(String mimeType)
Adds a rule allowing a given mime type to filter.

addPattern

public void addPattern(String pattern)
Adds a rule allowing a shell style glob to a filter.

getName

public String getName()
Returns the human readable name of the file filter.

setName

public void setName(String name)
Sets the human readable name for the filter. This is the string that will be displayed in the file selector user interface if there is a selectable list of filters.
Parameters:
name - The name of the filter.