/[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.2 by mudyc, Sun Dec 22 13:36:17 2002 UTC revision 1.3 by mudyc, Sun Dec 22 14:51:15 2002 UTC
# Line 99  public class PPMouseEvents { Line 99  public class PPMouseEvents {
99          public void event(MouseEvent ev, EventHandling.MousePressState p_state,          public void event(MouseEvent ev, EventHandling.MousePressState p_state,
100                            Object[] obs) {                            Object[] obs) {
101              try {              try {
                 pa("Add photo!");  
   
102                  JFileChooser fc = new JFileChooser();                  JFileChooser fc = new JFileChooser();
103                  int returnVal = fc.showOpenDialog(null);                  int returnVal = fc.showOpenDialog(null);
104    
105                  if (returnVal == JFileChooser.APPROVE_OPTION) {                  if (returnVal == JFileChooser.APPROVE_OPTION) {
106                      File file = fc.getSelectedFile();                      File file = fc.getSelectedFile();
                     //this is where a real application would open the file.  
                     pa("Opening: IMG:" + file.getPath() );  
   
107                      Cell c = context.getAccursed();                      Cell c = context.getAccursed();
108                      // XXX no checks!!                      // XXX no checks!!
109                      c = space.getCell(ppactions.newNote(c.h(ppv.d.contains).getId(),                      ppactions.newNote(c.h(ppv.d.contains).getId(),
110                                                          (int)ppv.panx, (int)ppv.pany,                                        (int)ppv.panx, (int)ppv.pany,
111                                                          "IMG:" + file.getPath()                                        "IMG:" + file.getPath()));
                                                         )  
                                       );  
112                  } else {                  } else {
113                      pa("Open command cancelled by user.");                      pa("Open command cancelled by user.");
114                  }                  }
   
                 //ppactions.newPaper();  
115              } catch (Exception e) { pa(e.getMessage()); }              } catch (Exception e) { pa(e.getMessage()); }
116              AbstractUpdateManager.chg();              AbstractUpdateManager.chg();
117          }          }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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