/[fenfire]/fenfire/org/fenfire/spanimages/SpanImageFactory.java
ViewVC logotype

Diff of /fenfire/org/fenfire/spanimages/SpanImageFactory.java

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

revision 1.6 by tjl, Tue Jun 24 12:09:33 2003 UTC revision 1.7 by tjl, Wed Nov 5 10:25:52 2003 UTC
# Line 27  SpanImageFactory.java Line 27  SpanImageFactory.java
27  package org.fenfire.spanimages;  package org.fenfire.spanimages;
28  import org.fenfire.spanimages.gl.*;  import org.fenfire.spanimages.gl.*;
29  import org.nongnu.alph.*;  import org.nongnu.alph.*;
30    import org.fenfire.functional.Function;
31    
32  /** The central interface for creating vobs that contain  /** The central interface for creating vobs that contain
33   * images of ImageSpans.   * images of ImageSpans.
34     * Input: ImageSpan; Output: SpanImageVob
35   * The backend of this interface takes care of all caching and other   * The backend of this interface takes care of all caching and other
36   * operations necessary.   * operations necessary.
37   * <p>   * <p>
# Line 37  import org.nongnu.alph.*; Line 39  import org.nongnu.alph.*;
39   * if the imagespan contains raster data, or 75 pixels per inch, if   * if the imagespan contains raster data, or 75 pixels per inch, if
40   * the imagespan contains vector data.   * the imagespan contains vector data.
41   */   */
42  public abstract class SpanImageFactory {  public abstract class SpanImageFactory implements Function {
43      private static SpanImageFactory instance;      private static SpanImageFactory instance;
44    
45        /** (For tests, mostly) Get a reasonable instance
46         * of SpanImageFactory.
47         */
48      public static SpanImageFactory getDefaultInstance() {      public static SpanImageFactory getDefaultInstance() {
49          // XXX This is wrong - need a mux to handle images!          // XXX This is wrong - need a mux to handle images!
50          if(instance == null)          if(instance == null)
51              instance = new CachingSpanImageFactory(              instance = new CachingSpanImageFactory(
52                              new DefaultSpanImageFactory(                              new DefaultSpanImageFactory(
53                                  new PageScrollBlockImager()));                                  new PageScrollBlockImager(),
54                                    new PlainPaperMaker()
55                                    ));
56          return instance;          return instance;
57      }      }
58    
     abstract public SpanImageVob getSpanImageVob(ImageSpan s);  
59  }  }
60    
61    

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

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