Skip to content
Snippets Groups Projects
Commit 73d5bf1a authored by Tim Molter's avatar Tim Molter
Browse files

fix for issue #99 - Why do the FileFilters within XChartPanel don't accept directories? (2)

parent a8520266
Branches
No related tags found
No related merge requests found
...@@ -151,9 +151,15 @@ public class XChartPanel extends JPanel { ...@@ -151,9 +151,15 @@ public class XChartPanel extends JPanel {
@Override @Override
public boolean accept(File f) { public boolean accept(File f) {
if (f.isDirectory()) {
return true; return true;
} }
String s = f.getName();
return s.endsWith(".jpg") || s.endsWith(".JPG");
}
@Override @Override
public String getDescription() { public String getDescription() {
...@@ -167,9 +173,15 @@ public class XChartPanel extends JPanel { ...@@ -167,9 +173,15 @@ public class XChartPanel extends JPanel {
@Override @Override
public boolean accept(File f) { public boolean accept(File f) {
if (f.isDirectory()) {
return true; return true;
} }
String s = f.getName();
return s.endsWith(".bmp") || s.endsWith(".BMP");
}
@Override @Override
public String getDescription() { public String getDescription() {
...@@ -183,9 +195,15 @@ public class XChartPanel extends JPanel { ...@@ -183,9 +195,15 @@ public class XChartPanel extends JPanel {
@Override @Override
public boolean accept(File f) { public boolean accept(File f) {
if (f.isDirectory()) {
return true; return true;
} }
String s = f.getName();
return s.endsWith(".gif") || s.endsWith(".GIF");
}
@Override @Override
public String getDescription() { public String getDescription() {
...@@ -199,9 +217,15 @@ public class XChartPanel extends JPanel { ...@@ -199,9 +217,15 @@ public class XChartPanel extends JPanel {
@Override @Override
public boolean accept(File f) { public boolean accept(File f) {
if (f.isDirectory()) {
return true; return true;
} }
String s = f.getName();
return s.endsWith(".png") || s.endsWith(".PNG");
}
@Override @Override
public String getDescription() { public String getDescription() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment