source: josm/trunk/src/org/openstreetmap/josm/gui/layer/geoimage/JpegFileFilter.java@ 2606

Last change on this file since 2606 was 2566, checked in by bastiK, 14 years ago

Moved the code from agpifoj plugin to JOSM core. Thanks to Christian Gallioz for this great (ex-)plugin.
In the current state it might be a little unstable.

  • Did a view modification so it fits in better.
  • Added the Thumbnail feature, but still work to be done.

New in JOSM core: Possibility to add toggle dialogs not only on startup, but also later.

  • Property svn:eol-style set to native
File size: 1.0 KB
Line 
1// License: GPL. See LICENSE file for details.
2// Copyright 2007 by Christian Gallioz (aka khris78)
3// Parts of code from Geotagged plugin (by Rob Neild)
4// and the core JOSM source code (by Immanuel Scholz and others)
5
6package org.openstreetmap.josm.gui.layer.geoimage;
7
8import static org.openstreetmap.josm.tools.I18n.tr;
9
10//import javax.swing.JFileChooser;
11import java.io.File;
12
13class JpegFileFilter extends javax.swing.filechooser.FileFilter
14 implements java.io.FileFilter {
15
16 static final private JpegFileFilter instance = new JpegFileFilter();
17 public static JpegFileFilter getInstance() {
18 return instance;
19 }
20
21 @Override public boolean accept(File f) {
22 if (f.isDirectory()) {
23 return true;
24 } else {
25 String name = f.getName().toLowerCase();
26 return name.endsWith(".jpg") || name.endsWith(".jpeg");
27 }
28 }
29
30 @Override public String getDescription() {
31 return tr("JPEG images (*.jpg)");
32 }
33}
34
Note: See TracBrowser for help on using the repository browser.