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.
description | [R] | |
filter | [R] |
The filter parameter is a block that contains the logic to decide whether a given file is selectable or not.
# File lib/limelight/file_filter.rb, line 15 15: def initialize(description, &filter) 16: super() 17: @description = description 18: @filter = filter 19: end
Called to determine if a file is selectable. Invokes the filter block.
# File lib/limelight/file_filter.rb, line 23 23: def accept(file) 24: return @filter.call(file) 25: end