Example usage for java.util Vector forEach

List of usage examples for java.util Vector forEach

Introduction

In this page you can find the example usage for java.util Vector forEach.

Prototype

@Override
public synchronized void forEach(Consumer<? super E> action) 

Source Link

Usage

From source file:org.martus.client.swingui.FxInSwingMainWindow.java

private JFileChooser createFileChooser(String title, File directory, Vector<FormatFilter> filters) {
    JFileChooser fileChooser = new JFileChooser(directory);
    fileChooser.setDialogTitle(title);/*from ww  w.  j  ava  2  s.co m*/
    filters.forEach(filter -> fileChooser.addChoosableFileFilter(filter));

    // NOTE: Apparently the all file filter has a Mac bug, so this is a workaround
    fileChooser.setAcceptAllFileFilterUsed(false);
    return fileChooser;
}