[slf4j-dev] svn commit: r970 - slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter
ceki at slf4j.org
ceki at slf4j.org
Fri Feb 8 18:09:03 CET 2008
Author: ceki
Date: Fri Feb 8 18:09:03 2008
New Revision: 970
Modified:
slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/NewJFrame.java
slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/XSelector.java
Log:
- ongoing work
Modified: slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/NewJFrame.java
==============================================================================
--- slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/NewJFrame.java (original)
+++ slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/NewJFrame.java Fri Feb 8 18:09:03 2008
@@ -255,8 +255,6 @@
xs.jlabel = otherLabel;
File folder = new File( folderTextField.getText());
xs.selectJavaFilesInFolder(folder);
-
- System.out.println("do migration");
}
} else if (BROWSE_COMMAND.equals(e.getActionCommand())) {
showFileChooser();
Modified: slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/XSelector.java
==============================================================================
--- slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/XSelector.java (original)
+++ slf4j/trunk/slf4j-converter/src/main/java/org/slf4j/converter/XSelector.java Fri Feb 8 18:09:03 2008
@@ -4,17 +4,24 @@
import java.util.ArrayList;
import java.util.List;
-public class XSelector {
+public class XSelector implements Runnable {
private List<File> javaFileList = new ArrayList<File>();
javax.swing.JLabel jlabel;
+ File folder;
+ public void run() {
+ selectFiles(folder);
+ }
public List<File> selectJavaFilesInFolder(File folder) {
if(folder.isDirectory()) {
- selectFiles(folder);
+ this.folder = folder;
+ Thread t = new Thread(this);
+ t.setDaemon(true);
+ t.start();
return javaFileList;
} else {
throw new IllegalArgumentException("["+folder+"] is not a directory");
@@ -22,10 +29,8 @@
}
private void selectFiles(File file) {
- System.out.println(file.getAbsolutePath());
+ System.out.println(file);
if (file.isDirectory()) {
- jlabel.setText(file.getAbsolutePath());
-
File[] files = file.listFiles();
if (files != null) {
for (int i = 0; i < files.length; i++) {
@@ -40,4 +45,6 @@
}
}
+
+
}
More information about the slf4j-dev
mailing list