/[fenfire]/fenfire/org/fenfire/view/lava/FenPDFContext.java
ViewVC logotype

Diff of /fenfire/org/fenfire/view/lava/FenPDFContext.java

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

revision 1.15 by mudyc, Wed May 21 16:49:36 2003 UTC revision 1.16 by mudyc, Wed May 21 17:56:04 2003 UTC
# Line 25  import java.io.*; Line 25  import java.io.*;
25  import java.awt.FileDialog;  import java.awt.FileDialog;
26  import java.awt.Frame;  import java.awt.Frame;
27    
28    import org.nongnu.alph.*;
29    import org.nongnu.alph.impl.*;
30    
31    
32  /** FenPDF context what handles keystrokes and  /** FenPDF context what handles keystrokes and
33   * accursed node at least.   * accursed node at least.
# Line 178  public class FenPDFContext implements Line 181  public class FenPDFContext implements
181      }      }
182    
183    
184        public View2D ppView = null;
185        public View2D pageView = null;
186        public StormAlph alph = null;
187    
188      /** @return object of new plane for mainnode view 2d      /** @return object of new plane for mainnode view 2d
189       * or what??? XXX       * or what??? XXX
190       * what this should even do?       * what this should even do?
191       */       */
192      public Object doMouse(MouseEvent e, VobScene oldVS) throws RemoteException {      public Object doMouse(MouseEvent e, VobScene oldVS)
193            throws RemoteException, IOException
194        {
195          if (e.getID() != MouseEvent.MOUSE_CLICKED) return null;          if (e.getID() != MouseEvent.MOUSE_CLICKED) return null;
196          int cs = oldVS.coords.getCSAt(0, e.getX(), e.getY(), null);          int cs = oldVS.coords.getCSAt(0, e.getX(), e.getY(), null);
197          if(cs < 0) return null;          if(cs < 0) return null;
# Line 196  public class FenPDFContext implements Line 205  public class FenPDFContext implements
205                  FileDialog fd = new FileDialog(f, "Valitse liitettava kuva",                  FileDialog fd = new FileDialog(f, "Valitse liitettava kuva",
206                                                 FileDialog.LOAD);                                                 FileDialog.LOAD);
207                  fd.setModal(true);                  fd.setModal(true);
208                  fd.show();                  fd.show();  // now wait until user makes a desicion
209                  fd.hide();                  fd.hide();
210                  p("ps/pdf to be added: "+fd.getDirectory()+fd.getFile());                  p("ps/pdf to be added: "+fd.getDirectory()+fd.getFile());
211                  p("unfortunately - NOT IMPLEMENTED");  
212                    ScrollBlock sc = alph.addFile(new File(fd.getDirectory()+fd.getFile()),
213                                                  "application/pdf");
214                    return new FisheyeMainNode2D(sc, new PageScrollView2D(), 0,0);
215              }              }
216              else if (key.equals("LINK")) {              else if (key.equals("LINK")) {
217                  if (CURR >0) actionLink(1); else actionLink(-1);                  if (CURR >0) actionLink(1); else actionLink(-1);
218              }              }
219              else if (key.equals("NEW_PAPER")) {              else if (key.equals("NEW_PAPER")) {
220                  String paper = ppAct.newPaper();                  String paper = ppAct.newPaper();
221                  return new MainNode2D(Nodes.get(paper), null, 0,0,1);                  return new MainNode2D(Nodes.get(paper), ppView, 0,0,1);
222              }              }
223              else return null;              else return null;
224    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

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