List of usage examples for java.util Vector forEach
@Override public synchronized void forEach(Consumer<? super E> action)
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; }