com.java4less.rmaxicode
Class RMaxiCodeFacade

java.lang.Object
  extended by com.java4less.rmaxicode.RMaxiCodeFacade
All Implemented Interfaces:
com.java4less.rbarcode.common.IBarcodeGenerator

public class RMaxiCodeFacade
extends java.lang.Object
implements com.java4less.rbarcode.common.IBarcodeGenerator

helper class for creating barcodes with just one method. Used by webservices and plugins.


Constructor Summary
RMaxiCodeFacade()
           
 
Method Summary
 void createBarcode(java.util.Properties properties)
          create barcode image from properties file
 void createBarcode(java.lang.String code, int mode, int resolution, boolean processTilde, java.lang.String country, java.lang.String serviceClass, java.lang.String zipCode, double L, java.util.Properties properties)
          create barcode object
 java.awt.Image createBarcodeImage(java.lang.String code, int mode, int resolution, boolean processTilde, java.lang.String country, java.lang.String serviceClass, java.lang.String zipCode, double L, java.util.Properties properties)
          generate barcode and return image
 java.awt.Image createImage()
          create image of the generated barcode
 RMaxiCode getBarcode()
          return barcode object
 void paintBarcode(java.awt.Graphics g)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RMaxiCodeFacade

public RMaxiCodeFacade()
Method Detail

getBarcode

public RMaxiCode getBarcode()
return barcode object

Returns:

createBarcodeImage

public java.awt.Image createBarcodeImage(java.lang.String code,
                                         int mode,
                                         int resolution,
                                         boolean processTilde,
                                         java.lang.String country,
                                         java.lang.String serviceClass,
                                         java.lang.String zipCode,
                                         double L,
                                         java.util.Properties properties)
generate barcode and return image

Parameters:
code - data to be encoded. In modes 2 and 3 if the postal code is empty it will be extracted from the begining of this string (see maxicode specifications)
mode - maxicode mode. Values range from 2 to 6
resolution - resolution of the printer in dpi, Default is 200. Other valid vaues are 300,400,500 and 600.
processTilde -
country - country code (modes 2 and 3
serviceClass - service class (modes 2 and 3). In mode 2 it can be an alphanumeric of length 5. In mode 3 can be a numeric of length 9.
zipCode - postal code (modes 2 and 3)
L - Set length of length symbol. The default is 25.5 millimeters
properties -

createBarcode

public void createBarcode(java.lang.String code,
                          int mode,
                          int resolution,
                          boolean processTilde,
                          java.lang.String country,
                          java.lang.String serviceClass,
                          java.lang.String zipCode,
                          double L,
                          java.util.Properties properties)
create barcode object

Parameters:
code - data to be encoded. In modes 2 and 3 if the postal code is empty it will be extracted from the begining of this string (see maxicode specifications)
mode - maxicode mode. Values range from 2 to 6
resolution - resolution of the printer in dpi, Default is 200. Other valid vaues are 300,400,500 and 600.
processTilde -
country - country code (modes 2 and 3
serviceClass - service class (modes 2 and 3). In mode 2 it can be an alphanumeric of length 5. In mode 3 can be a numeric of length 9.
zipCode - postal code (modes 2 and 3)
L - Set length of length symbol. The default is 25.5 millimeters
properties -

createImage

public java.awt.Image createImage()
create image of the generated barcode

Specified by:
createImage in interface com.java4less.rbarcode.common.IBarcodeGenerator
Returns:

createBarcode

public void createBarcode(java.util.Properties properties)
create barcode image from properties file

Specified by:
createBarcode in interface com.java4less.rbarcode.common.IBarcodeGenerator

paintBarcode

public void paintBarcode(java.awt.Graphics g)
Specified by:
paintBarcode in interface com.java4less.rbarcode.common.IBarcodeGenerator