com.java4less.j2me.qrcode
Class QRCodeCanvas

java.lang.Object
  extended by Canvas
      extended by com.java4less.j2me.qrcode.QRCodeCanvas

public class QRCodeCanvas
extends Canvas

This is a subclass of javax.microedition.lcdui.Canvas used to display QRCodes


Constructor Summary
QRCodeCanvas()
           
 
Method Summary
 int getCurrentX()
          get last X possition.
 int getCurrentY()
          get last Y possition.
 int getMargin()
          margin of the barcode (also know as quite zone).
 double getModuleSize()
          size (width) of the bars (module).
 QRCode getQRCode()
          get QRCode class
 void paint(Graphics g)
          paints the symbol.
 void setMargin(int d)
          margin of the barcode (also know as quite zone).
 void setModuleSize(int d)
          size (width) of the bars (module).
 void setQRCode(QRCode q)
          set QRCode class
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QRCodeCanvas

public QRCodeCanvas()
Method Detail

getQRCode

public QRCode getQRCode()
get QRCode class


setQRCode

public void setQRCode(QRCode q)
set QRCode class

Parameters:
q -

getMargin

public int getMargin()
margin of the barcode (also know as quite zone). The default is 20 pixels.


setMargin

public void setMargin(int d)
margin of the barcode (also know as quite zone). The default is 20 pixels.


getModuleSize

public double getModuleSize()
size (width) of the bars (module). The default value is 4.


setModuleSize

public void setModuleSize(int d)
size (width) of the bars (module). The default value is 4.


paint

public void paint(Graphics g)
paints the symbol.


getCurrentX

public int getCurrentX()
get last X possition. Use this property to find out the size in pixels of the barcode.


getCurrentY

public int getCurrentY()
get last Y possition. Use this property to find out the size in pixels of the barcode.