Class Limelight::FileFilter
In: lib/limelight/file_filter.rb
Parent: javax.swing.filechooser::FileFilter

A FileFiler is used in conjunction with FileChooser. It is used to help the user select only files of the desired type.

Methods

accept   getDescription   new  

Attributes

description  [R] 
filter  [R] 

Public Class methods

The filter parameter is a block that contains the logic to decide whether a given file is selectable or not.

[Source]

    # File lib/limelight/file_filter.rb, line 15
15:     def initialize(description, &filter)
16:       super()
17:       @description = description
18:       @filter = filter
19:     end

Public Instance methods

Called to determine if a file is selectable. Invokes the filter block.

[Source]

    # File lib/limelight/file_filter.rb, line 23
23:     def accept(file)
24:       return @filter.call(file)
25:     end

[Source]

    # File lib/limelight/file_filter.rb, line 27
27:     def getDescription
28:       return @description
29:     end

[Validate]