gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] alph/org/nongnu/alph Alph.java impl/PageImageSc...


From: Tuomas J. Lukka
Subject: [Gzz-commits] alph/org/nongnu/alph Alph.java impl/PageImageSc...
Date: Mon, 21 Apr 2003 15:33:31 -0400

CVSROOT:        /cvsroot/alph
Module name:    alph
Changes by:     Tuomas J. Lukka <address@hidden>        03/04/21 15:33:30

Modified files:
        org/nongnu/alph: Alph.java 
        org/nongnu/alph/impl: PageImageScroll.java StormAlph.java 
Added files:
        org/nongnu/alph/impl: stormalph.test 

Log message:
        Testing new features

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/alph/alph/org/nongnu/alph/Alph.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/alph/alph/org/nongnu/alph/impl/stormalph.test?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/alph/alph/org/nongnu/alph/impl/PageImageScroll.java.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/alph/alph/org/nongnu/alph/impl/StormAlph.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: alph/org/nongnu/alph/Alph.java
diff -u alph/org/nongnu/alph/Alph.java:1.1 alph/org/nongnu/alph/Alph.java:1.2
--- alph/org/nongnu/alph/Alph.java:1.1  Mon Apr 21 12:31:23 2003
+++ alph/org/nongnu/alph/Alph.java      Mon Apr 21 15:33:30 2003
@@ -8,10 +8,37 @@
  */
 public abstract class Alph {
     public abstract ScrollBlock getScrollBlock(String uri);
+
     public abstract BlockFile getBlockFile(ScrollBlock block);
     public abstract java.io.InputStream getBlockInputStream(ScrollBlock block) 
;
 
+    /** Add a file to this Alph.
+     * This is an optional method, and may be missing from some 
implementations.
+     * <p>
+     * This method is final because it fixes the implementation
+     * to call addFile_id and then getScrollBlock. This is done
+     * to obtain a certain fuzzy feeling of security about
+     * the file being there also the <b>next</b> time the program
+     * is started by avoiding certain kinds of optimizations.
+     */
+    public final ScrollBlock addFile(File f, String contentType) {
+       String id = addFile_id(f, contentType);
+       return getScrollBlock(id);
+    }
+
+    /** Implement adding a file to this Alph.
+     * @return The id; passing the id to getScrollBlock() shall return the 
file.
+     */
+    protected String addFile_id(File f, String contentType) {
+       throw new UnsupportedOperationException();
+    }
+
+    /** The directory in which SMALL items pertaining to blocks may be cached.
+     * Currently intended for postscript/PDF DSC files for page sizes.
+     */
     protected File cacheDir;
+
+
     /** Get the cache dir for small items.
      * Nothing larger than 1kb/block should be stored there.
      */
Index: alph/org/nongnu/alph/impl/PageImageScroll.java
diff -u alph/org/nongnu/alph/impl/PageImageScroll.java:1.6 
alph/org/nongnu/alph/impl/PageImageScroll.java:1.7
--- alph/org/nongnu/alph/impl/PageImageScroll.java:1.6  Mon Apr 21 14:50:35 2003
+++ alph/org/nongnu/alph/impl/PageImageScroll.java      Mon Apr 21 15:33:30 2003
@@ -39,7 +39,7 @@
  */
 
 public class PageImageScroll extends AbstractScrollBlock implements 
PageScrollBlock{
-String rcsid = "$Id: PageImageScroll.java,v 1.6 2003/04/21 18:50:35 tjl Exp $";
+String rcsid = "$Id: PageImageScroll.java,v 1.7 2003/04/21 19:33:30 tjl Exp $";
     public static boolean dbg = true;
     final static void p(String s) { if(dbg) System.out.println(s); }
     final static void pa(String s) { System.out.println(s); }
@@ -128,12 +128,6 @@
     public ImageSpan getPage(int p) {
        return new PageImageSpan(this, p, 0, 0, WIDTH, HEIGHT);
     }
-
-    /*
-    public Span getSpan(int p0, int p1, int x, int y, int w, int h) {
-       return new StdPageSpan(p0, p1, x, y, w, h);
-    }
-    */
 
 
 }
Index: alph/org/nongnu/alph/impl/StormAlph.java
diff -u alph/org/nongnu/alph/impl/StormAlph.java:1.1 
alph/org/nongnu/alph/impl/StormAlph.java:1.2
--- alph/org/nongnu/alph/impl/StormAlph.java:1.1        Mon Apr 21 12:31:23 2003
+++ alph/org/nongnu/alph/impl/StormAlph.java    Mon Apr 21 15:33:30 2003
@@ -10,6 +10,10 @@
 
     StormPool stormPool;
 
+    public StormAlph(StormPool stormPool) {
+       this.stormPool = stormPool;
+    }
+
     public ScrollBlock getScrollBlock(String uri) {
        BlockId id = new BlockId(uri);
        String ct = id.getContentType();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]