/[alph]/alph/org/nongnu/alph/impl/ScrollBlockManager.java
ViewVC logotype

Diff of /alph/org/nongnu/alph/impl/ScrollBlockManager.java

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

revision 1.5 by tjl, Sun Apr 20 08:50:02 2003 UTC revision 1.6 by tjl, Mon Apr 21 16:31:23 2003 UTC
# Line 384  String rcsid = "$Id$"; Line 384  String rcsid = "$Id$";
384              throw new Error("Loading image failed: "+id);              throw new Error("Loading image failed: "+id);
385          }          }
386          if(block==null) {          if(block==null) {
387              block = new SimpleImageScroll(ms, id);  //          block = new SimpleImageScroll(ms, id);
388              msCache.put(id, block);              msCache.put(id, block);
389          }          }
390          return block.getSpan(x, y, w, h);          return block.getSpan(x, y, w, h);
# Line 402  String rcsid = "$Id$"; Line 402  String rcsid = "$Id$";
402          } catch (CannotLoadScrollBlockException _) {          } catch (CannotLoadScrollBlockException _) {
403              throw new Error("Loading pageimage failed: "+id);              throw new Error("Loading pageimage failed: "+id);
404          }          }
405            /*
406          if(block==null) {          if(block==null) {
407              block = new PageImageScroll(ms, id);              block = new PageImageScroll(ms, id);
408              msCache.put(id, block);              msCache.put(id, block);
409          }          }
410            */
411          return block.getSpan(p0, p1, x, y, w, h);          return block.getSpan(p0, p1, x, y, w, h);
412      }      }
413    
# Line 419  String rcsid = "$Id$"; Line 421  String rcsid = "$Id$";
421          if(id == null)          if(id == null)
422              throw new NullPointerException("cannot get block with id null");              throw new NullPointerException("cannot get block with id null");
423          TextScrollBlock b = (TextScrollBlock)msCache.get(id);          TextScrollBlock b = (TextScrollBlock)msCache.get(id);
424            /*
425          if(b == null) {          if(b == null) {
426              b = new PermanentTextScroll(ms, id);              b = new PermanentTextScroll(ms, id);
427              msCache.put(id, b);              msCache.put(id, b);
428          }          }
429            */
430          return b;          return b;
431      }      }
432    
# Line 493  String rcsid = "$Id$"; Line 497  String rcsid = "$Id$";
497                 !ct.equals("application/x-gzigzag-GZZ1"))                 !ct.equals("application/x-gzigzag-GZZ1"))
498               throw new CannotLoadScrollBlockException("Unknown text block '"+ct               throw new CannotLoadScrollBlockException("Unknown text block '"+ct
499                              +"'");                              +"'");
500              return new PermanentTextScroll(ms, id);              // return new PermanentTextScroll(ms, id);
501          } else if(type.equals("image")) {          } else if(type.equals("image")) {
502              return new SimpleImageScroll(ms, id);              // return new SimpleImageScroll(ms, id);
503          } else if(ct.equals("application/postscript") ||          } else if(ct.equals("application/postscript") ||
504                    ct.equals("application/pdf")) {                    ct.equals("application/pdf")) {
505              p("Loaded page image scroll block.");              p("Loaded page image scroll block.");
506              return new PageImageScroll(ms, id);              // return new PageImageScroll(ms, id);
507          } else {          } else {
508    
509              throw new CannotLoadScrollBlockException("Unknown mediatype "+ct);              throw new CannotLoadScrollBlockException("Unknown mediatype "+ct);
510          }          }
511            return null;
512    
513      }      }
514    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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