You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by cj...@apache.org on 2001/03/21 16:59:31 UTC

cvs commit: xml-batik/sources/org/apache/batik/svggen SVGGeneratorContext.java

cjolif      01/03/21 07:59:27

  Modified:    sources/org/apache/batik/svggen SVGGeneratorContext.java
  Log:
  documentation of the context
  
  Revision  Changes    Path
  1.2       +55 -2     xml-batik/sources/org/apache/batik/svggen/SVGGeneratorContext.java
  
  Index: SVGGeneratorContext.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/svggen/SVGGeneratorContext.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SVGGeneratorContext.java	2001/03/21 14:36:03	1.1
  +++ SVGGeneratorContext.java	2001/03/21 15:59:19	1.2
  @@ -11,9 +11,14 @@
   import org.w3c.dom.Document;
   
   /**
  + * This class contains all non graphical contextual information that
  + * are needed by the {@link org.apache.batik.svggen.SVGGraphics2D} to
  + * generate SVG from Java 2D primitives.
  + * You can subclass it to change the defaults.
    *
  + * @see org.apache.batik.svggen.SVGGraphics2D#SVGGraphics2D(SVGGeneratorContext,boolean)
    * @author <a href="mailto:cjolif@ilog.fr>Christophe Jolif</a>
  - * @version $Id: SVGGeneratorContext.java,v 1.1 2001/03/21 14:36:03 cjolif Exp $
  + * @version $Id: SVGGeneratorContext.java,v 1.2 2001/03/21 15:59:19 cjolif Exp $
    */
   final public class SVGGeneratorContext {
       /**
  @@ -28,7 +33,7 @@
       private static final String ERROR_ID_GENERATOR_NULL =
           "idGenerator should not be null";
   
  -    // this fields are package access for read-only purposey
  +    // this fields are package access for read-only purpose
   
       /**
        * Factory used by this Graphics2D to create Elements
  @@ -57,10 +62,26 @@
        */
       SVGIDGenerator idGenerator;
   
  +    /**
  +     * Builds an instance of <code>SVGGeneratorContext</code> with the given
  +     * <code>domFactory</code> but let the user set later the other contextual
  +     * information.
  +     * @see #setIDGenerator
  +     * @see #setExtensionHandler
  +     * @see #setImageHandler
  +     */
       protected SVGGeneratorContext(Document domFactory) {
           setDOMFactory(domFactory);
       }
   
  +    /**
  +     * Creates an instance of <code>SVGGeneratorContext</code> with the
  +     * given <code>domFactory</code> and with the default values for the
  +     * other information.
  +     * @see org.apache.batik.svggen.SVGIDGenerator
  +     * @see org.apache.batik.svggen.DefaultExtensionHandler
  +     * @see org.apache.batik.svggen.ImageHandlerBase64Encoder
  +     */
       public static SVGGeneratorContext createDefault(Document domFactory) {
           SVGGeneratorContext ctx = new SVGGeneratorContext(domFactory);
           ctx.setIDGenerator(new SVGIDGenerator());
  @@ -69,40 +90,72 @@
           return ctx;
       }
   
  +    /**
  +     * Returns the {@link org.apache.batik.svggen.SVGIDGenerator} that
  +     * has been set.
  +     */
       public SVGIDGenerator getIDGenerator() {
           return idGenerator;
       }
   
  +    /**
  +     * Sets the {@link org.apache.batik.svggen.SVGIDGenerator}
  +     * to be used. It should not be <code>null</code>.
  +     */
       protected void setIDGenerator(SVGIDGenerator idGenerator) {
           if (idGenerator == null)
               throw new IllegalArgumentException(ERROR_ID_GENERATOR_NULL);
           this.idGenerator = idGenerator;
       }
   
  +    /**
  +     * Returns the DOM Factory that
  +     * has been set.
  +     */
       public Document getDOMFactory() {
           return domFactory;
       }
   
  +    /**
  +     * Sets the DOM Factory
  +     * to be used. It should not be <code>null</code>.
  +     */
       protected void setDOMFactory(Document domFactory) {
           if (domFactory == null)
               throw new IllegalArgumentException(ERROR_DOM_FACTORY_NULL);
           this.domFactory = domFactory;
       }
   
  +    /**
  +     * Returns the {@link org.apache.batik.svggen.ExtensionHandler} that
  +     * has been set.
  +     */
       public ExtensionHandler getExtensionHandler() {
           return extensionHandler;
       }
   
  +    /**
  +     * Sets the {@link org.apache.batik.svggen.ExtensionHandler}
  +     * to be used. It should not be <code>null</code>.
  +     */
       protected void setExtensionHandler(ExtensionHandler extensionHandler) {
           if (extensionHandler == null)
               throw new IllegalArgumentException(ERROR_EXTENSION_HANDLER_NULL);
           this.extensionHandler = extensionHandler;
       }
   
  +    /**
  +     * Returns the {@link org.apache.batik.svggen.ImageHandler} that
  +     * has been set.
  +     */
       public ImageHandler getImageHandler() {
           return imageHandler;
       }
   
  +    /**
  +     * Sets the {@link org.apache.batik.svggen.ImageHandler}
  +     * to be used. It should not be <code>null</code>.
  +     */
       protected void setImageHandler(ImageHandler imageHandler) {
           if (imageHandler == null)
               throw new IllegalArgumentException(ERROR_IMAGE_HANDLER_NULL);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org