/[gzz]/gzz/gzz/modules/pp/PPMouseEvents.java
ViewVC logotype

Diff of /gzz/gzz/modules/pp/PPMouseEvents.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24 by mudyc, Tue Jan 14 18:30:04 2003 UTC revision 1.25 by mudyc, Wed Jan 15 10:16:49 2003 UTC
# Line 18  import java.awt.event.*; Line 18  import java.awt.event.*;
18  // needed by swing and JFileChooser  // needed by swing and JFileChooser
19  //** uncomment if you need for demo  //** uncomment if you need for demo
20     import java.io.*;     import java.io.*;
21     import javax.swing.JFileChooser;  // import javax.swing.JFileChooser;
22       import java.awt.FileDialog;
23       import java.awt.Frame;
24  //*/  //*/
25    
26    
# Line 159  public static final String rcsid = "$Id$ Line 161  public static final String rcsid = "$Id$
161    
162  //          /*  //          /*
163              try {              try {
164                    /*
165                  JFileChooser fc = new JFileChooser();                  JFileChooser fc = new JFileChooser();
166                  int returnVal = fc.showOpenDialog(null);                  int returnVal = fc.showOpenDialog(null);
167                                    
# Line 172  public static final String rcsid = "$Id$ Line 175  public static final String rcsid = "$Id$
175                  } else {                  } else {
176                      pa("Open command cancelled by user.");                      pa("Open command cancelled by user.");
177                  }                  }
178                    */
179                    Cell c = context.getAccursed();
180                    Frame f = new Frame();
181                    FileDialog fd = new FileDialog(f, "Valitse liitettava kuva",
182                                                   FileDialog.LOAD);
183                    fd.setModal(true);
184                    fd.show();
185                    fd.hide();
186                    pa("photo to be added: "+fd.getDirectory()+fd.getFile());
187                    if (fd.getDirectory() != null) {
188                        // XXX no checks!!
189                        ppactions.newNote(c.h(ppv.d.contains).getId(),
190                                          (int)ppv.panx, (int)ppv.pany,
191                                          "IMG:" + fd.getDirectory() +
192                                          fd.getFile());
193                    } else {
194                        pa("Open command cancelled by user.");
195                    }
196    
197              } catch (Exception e) { pa(e.getMessage()); }              } catch (Exception e) { pa(e.getMessage()); }
198              AbstractUpdateManager.chg();              AbstractUpdateManager.chg();
199  //          */  //          */

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26