Skip to content

Commit cac0180

Browse files
committed
bug fix
1 parent 10f3fcb commit cac0180

1 file changed

Lines changed: 23 additions & 19 deletions

File tree

src/hk/microos/frames/MainFrame.java

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,13 @@ public class MainFrame extends JFrame {
5757
private JTable coordTable;
5858
public TableHelper imgListTH;
5959
public TableHelper coordListTH;
60-
private String recordedImgPath = "";
61-
62-
private String recordedAnnotPath = "";
63-
private String recordedSavePath = "";
60+
61+
private String recordedPath = "";
62+
// private String recordedImgPath = "";
63+
// private String recordedAnnotPath = "";
64+
// private String recordedSavePath = "";
65+
66+
6467
private JButton btnReadImageList;
6568

6669
private int leftTableSelectedRow = -1;
@@ -81,15 +84,16 @@ public static void main(String[] args) {
8184
public void run() {
8285
try {
8386
MainFrame frame = new MainFrame();
84-
frame.recordedImgPath = System.getProperty("user.home")+"/Desktop";
85-
// frame.recordedImgPath =
86-
// "/Users/microos/Downloads/originalPics/imgPath.txt";
87-
88-
frame.recordedAnnotPath = System.getProperty("user.home") + "/Desktop";
89-
// frame.recordedAnnotPath =
90-
// "/Users/microos/Downloads/FDDB-folds/FDDB-fold-05-ellipseList.txt";
91-
92-
frame.recordedSavePath = System.getProperty("user.home") + "/Desktop";
87+
frame.recordedPath = System.getProperty("user.home")+"/Desktop";
88+
// frame.recordedImgPath = System.getProperty("user.home")+"/Desktop";
89+
//// frame.recordedImgPath =
90+
//// "/Users/microos/Downloads/originalPics/imgPath.txt";
91+
//
92+
// frame.recordedAnnotPath = System.getProperty("user.home") + "/Desktop";
93+
// // frame.recordedAnnotPath =
94+
// // "/Users/microos/Downloads/FDDB-folds/FDDB-fold-05-ellipseList.txt";
95+
//
96+
// frame.recordedSavePath = System.getProperty("user.home") + "/Desktop";
9397

9498
frame.setVisible(true);
9599
} catch (Exception e) {
@@ -323,11 +327,11 @@ void updateImagePanelSize(MyImage mim) {
323327
}
324328

325329
void loadImageList() {
326-
JFileChooser fc = new JFileChooser(recordedImgPath);
330+
JFileChooser fc = new JFileChooser(recordedPath);
327331
int res = fc.showOpenDialog(this);
328332
if (res == JFileChooser.APPROVE_OPTION) {
329333
File f = fc.getSelectedFile();
330-
recordedImgPath = f.getParent();
334+
recordedPath = f.getParent();
331335
if (!IOTool.isTextFile(f)) {
332336
// not a readable text file
333337
JOptionPane.showMessageDialog(this,
@@ -383,11 +387,11 @@ void loadAnnotList() {
383387
"Suffix", JOptionPane.QUESTION_MESSAGE);
384388
annotContentSuffix = s == null ? "" : s;
385389
}
386-
JFileChooser fc = new JFileChooser(recordedAnnotPath);
390+
JFileChooser fc = new JFileChooser(recordedPath);
387391
int res = fc.showOpenDialog(this);
388392
if (res == JFileChooser.APPROVE_OPTION) {
389393
File f = fc.getSelectedFile();
390-
recordedAnnotPath = f.getParent();
394+
recordedPath = f.getParent();
391395
if (!IOTool.isTextFile(f)) {
392396
// not a readable text file
393397
JOptionPane.showMessageDialog(this,
@@ -566,11 +570,11 @@ void outputAnnotations() {
566570
// make it a .txt file
567571
// ask: output only the new Ellipse or both new and static
568572

569-
JFileChooser fc = new JFileChooser(recordedSavePath);
573+
JFileChooser fc = new JFileChooser(recordedPath);
570574
int res = fc.showOpenDialog(this);
571575
if (res == JFileChooser.APPROVE_OPTION) {
572576
File f = fc.getSelectedFile();
573-
recordedImgPath = f.getParent();
577+
recordedPath = f.getParent();
574578
IOTool.outputEllipse(pathImgPair, f.getAbsolutePath(), pathStaticElpsesPair != null, this);
575579

576580
}

0 commit comments

Comments
 (0)