krysalis-barcode/src/java/org/krysalis/barcode/servlet BarcodeServlet.java,1.11,1.12

[email protected]
Newsgroups gmane.comp.krysalis.cvs
Message-ID <[email protected]>
Update of /cvsroot/krysalis/krysalis-barcode/src/java/org/krysalis/barcode/servlet
In directory sc8-pr-cvs1:/tmp/cvs-serv27420/src/java/org/krysalis/barcode/servlet

Modified Files:
	BarcodeServlet.java 
Log Message:
Add support for font and font size in servlet.

Index: BarcodeServlet.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-barcode/src/java/org/krysalis/barcode/servlet/BarcodeServlet.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** BarcodeServlet.java	29 Oct 2003 07:50:27 -0000	1.11
--- BarcodeServlet.java	6 Nov 2003 15:08:35 -0000	1.12
***************
*** 90,112 ****
  
      /** Parameter name for the message */
!     public static final String BARCODE_MSG                = "msg";
      /** Parameter name for the barcode type */
!     public static final String BARCODE_TYPE               = "type";
      /** Parameter name for the barcode height */
!     public static final String BARCODE_HEIGHT             = "height";
      /** Parameter name for the module width */
!     public static final String BARCODE_MODULE_WIDTH       = "mw";
      /** Parameter name for the wide factor */
!     public static final String BARCODE_WIDE_FACTOR        = "wf";
      /** Parameter name for the quiet zone */
!     public static final String BARCODE_QUIET_ZONE         = "qz";
      /** Parameter name for the human-readable placement */
!     public static final String BARCODE_HUMAN_READABLE_POS = "hrp";
      /** Parameter name for the output format */
!     public static final String BARCODE_FORMAT             = "fmt";
      /** Parameter name for the image resolution (for bitmaps) */
!     public static final String BARCODE_IMAGE_RESOLUTION   = "res";
      /** Parameter name for the grayscale or b/w image (for bitmaps) */
!     public static final String BARCODE_IMAGE_GRAYSCALE    = "gray";
  
      private Logger log = new ConsoleLogger(ConsoleLogger.LEVEL_INFO);
--- 90,116 ----
  
      /** Parameter name for the message */
!     public static final String BARCODE_MSG                 = "msg";
      /** Parameter name for the barcode type */
!     public static final String BARCODE_TYPE                = "type";
      /** Parameter name for the barcode height */
!     public static final String BARCODE_HEIGHT              = "height";
      /** Parameter name for the module width */
!     public static final String BARCODE_MODULE_WIDTH        = "mw";
      /** Parameter name for the wide factor */
!     public static final String BARCODE_WIDE_FACTOR         = "wf";
      /** Parameter name for the quiet zone */
!     public static final String BARCODE_QUIET_ZONE          = "qz";
      /** Parameter name for the human-readable placement */
!     public static final String BARCODE_HUMAN_READABLE_POS  = "hrp";
      /** Parameter name for the output format */
!     public static final String BARCODE_FORMAT              = "fmt";
      /** Parameter name for the image resolution (for bitmaps) */
!     public static final String BARCODE_IMAGE_RESOLUTION    = "res";
      /** Parameter name for the grayscale or b/w image (for bitmaps) */
!     public static final String BARCODE_IMAGE_GRAYSCALE     = "gray";
!     /** Parameter name for the font size of the human readable display */
!     public static final String BARCODE_HUMAN_READABLE_SIZE = "hrsize";
!     /** Parameter name for the font name of the human readable display */
!     public static final String BARCODE_HUMAN_READABLE_FONT = "hrfont";
  
      private Logger log = new ConsoleLogger(ConsoleLogger.LEVEL_INFO);
***************
*** 250,253 ****
--- 254,269 ----
              attr = new DefaultConfiguration("human-readable");
              attr.setValue(humanReadable);
+             child.addChild(attr);
+         }
+         String humanReadableSize = request.getParameter(BARCODE_HUMAN_READABLE_SIZE);
+         if (humanReadableSize != null) {
+             attr = new DefaultConfiguration("human-readable-size");
+             attr.setValue(humanReadableSize);
+             child.addChild(attr);
+         }
+         String humanReadableFont = request.getParameter(BARCODE_HUMAN_READABLE_FONT);
+         if (humanReadableFont != null) {
+             attr = new DefaultConfiguration("human-readable-font");
+             attr.setValue(humanReadableFont);
              child.addChild(attr);
          }




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.