com.idautomation.aztec
Class Aztec

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Canvas
          extended bycom.idautomation.aztec.Aztec
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class Aztec
extends java.awt.Canvas
implements java.io.Serializable

This is the main Aztec class that generates the Aztec barcode image.

See Also:
Serialized Form

Field Summary
 boolean applyTilde
          If true, ("Y") the tilde (~) will be processed according to the rules in the Aztec section of the user guide.
 boolean autoSize
          If true, will automatically size the control canvas to fit the barcode at design or runtime; Default =True.
 java.awt.Color backColor
          Background color.
 java.awt.Color barColor
          Color of the modules.
 java.lang.String code
          Data to be painted in a Aztec symbol.
 int dotPixels
           
 int ecl
          Error correction Level, 0 = default error correction level; 01 to 99 = minimum error correction percentage; 101 to 104 = 1 to 4-layer Compact symbol; 201 to 232 = 1 to 32-layer Full-Range symbol; 300 = a simple Aztec "Rune"
 int height
          Initial preferred height property of the bean
 double leftMarginCM
          The left margin of the barcode (also know as quiet zone); The default is .06 CM.
 java.lang.String msgApp
          Optional null-terminated ID field for Append.
 int numOfSym
          Invokes message append across symbols the number of symbols specified.
 int pHeight
          The preferred height of the barcode image in pixels after barcode is generated.
 int pWidth
          The preferred width of the barcode image in pixels after barcode is generated.
 boolean readerInit
          Adds the reader initialization symbol to the barcode for older scanners, which require it.
 boolean reBuild
           
 int resolution
          The resolution used to create the X dimension and other measurements in pixels; Default is 38 Pixels Per CM which is about 96 DPI.
 int rotate
          Rotation angle; valid values are 0 (default), 90, 180 & 270.
 double topMarginCM
          The top margin of the barcode (also know as quiet zone); The default is .06 CM.
 int width
          Initial preferred width property of the bean
 double X
          The size in CM of modules, default is .06; usually adjustable in increments of .03CM because (X * resolution) is used to convert to pixels; use setPixelsPerCM to change; if X * resolution = < 1, X will be set to one pixel.
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
Aztec()
           
 
Method Summary
 java.lang.String createEPS()
           
 java.lang.String createSVG()
           
 java.lang.String fontEncode()
           
 boolean getApplyTilde()
          Gets applyTilde the property.
 boolean getAutoSize()
          Gets the autoSize property.
 java.awt.Color getBackground()
          Gets the backColor property.
 java.lang.String getDataToEncode()
          Gets the code property.
 int getErrorCorrectionLevel()
          Gets the ecl property.
 java.awt.Color getForeground()
          Gets the barColor property.
 double getLeftMarginCM()
          Gets the leftMarginCM property.
 java.lang.String getMessageAppend()
          Gets the msgApp property.
 java.awt.Dimension getMinimumSize()
          Gets the minimum size in pixels of the barcode image generated.
 int getNumberOfSymbols()
          Gets the numOfSym property.
 int getPixelsPerCM()
          Gets the resolution property.
 java.awt.Dimension getPreferredSize()
          Returns the size in pixels appropriate for the generated image after it is generated.
 boolean getReaderInitialization()
          Gets the readerInit property.
 int getRotationAngle()
          Gets the rotate property.
 double getTopMarginCM()
          Gets the topMarginCM property.
 double getXDimensionCM()
          Gets the X property.
 void paint(java.awt.Graphics g2)
          Paints the barcode and rotates it if necessary
 void setApplyTilde(boolean newVal)
          Sets the applyTilde property.
 void setAutoSize(boolean newVal)
          Sets the autoSize property.
 void setBackground(java.awt.Color newColor)
          Sets the backColor property.
 void setDataToEncode(java.lang.String newCode)
          Sets the code property.
 void setErrorCorrectionLevel(int value)
          Sets the ecl property.
 void setForeground(java.awt.Color newColor)
          Sets the barColor property.
 void setImageSize(int imgWidth, int imgHeight)
          Sets the size of the generated image, if used then autoSize is set to false.
 void setLeftMarginCM(double newMargin)
          Sets the leftMarginCM property.
 void setMessageAppend(java.lang.String value)
          Sets the msgApp property.
 void setNumberOfSymbols(int value)
          Sets the numOfSym property.
 void setPixelsPerCM(int newRes)
          Sets the resolution property.
 void setReaderInitialization(boolean value)
          Sets the readerInit property.
 void setRotationAngle(int newRotate)
          Sets the rotate property.
 void setTopMarginCM(double newMargin)
          Sets the topMarginCM property.
 void setXDimensionCM(double newX)
          Sets the X property.
 
Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, dispatchEvent, doLayout, enable, enable, enableInputMethods, getAlignmentX, getAlignmentY, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocusInWindow, reshape, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

code

public java.lang.String code
Data to be painted in a Aztec symbol.

See Also:
setDataToEncode(String newCode), getDataToEncode(), User Manual

leftMarginCM

public double leftMarginCM
The left margin of the barcode (also know as quiet zone); The default is .06 CM.

See Also:
setLeftMarginCM(double newMargin), getLeftMarginCM(), User Manual

topMarginCM

public double topMarginCM
The top margin of the barcode (also know as quiet zone); The default is .06 CM.

See Also:
setTopMarginCM(double newMargin), getTopMarginCM(), User Manual

backColor

public java.awt.Color backColor
Background color.

See Also:
setBackground(Color newColor), getBackground(), User Manual

resolution

public int resolution
The resolution used to create the X dimension and other measurements in pixels; Default is 38 Pixels Per CM which is about 96 DPI. 96 DPI is the resolution of the web browser; this setting works best when using the servlet. Enter 118 to create a 300 DPI image

See Also:
setPixelsPerCM(int newRes), getPixelsPerCM(), User Manual

X

public double X
The size in CM of modules, default is .06; usually adjustable in increments of .03CM because (X * resolution) is used to convert to pixels; use setPixelsPerCM to change; if X * resolution = < 1, X will be set to one pixel.

See Also:
setXDimensionCM(double newX), getXDimensionCM(), User Manual

width

public int width
Initial preferred width property of the bean


height

public int height
Initial preferred height property of the bean


pWidth

public int pWidth
The preferred width of the barcode image in pixels after barcode is generated.

See Also:
getPreferredSize(), User Manual

pHeight

public int pHeight
The preferred height of the barcode image in pixels after barcode is generated.

See Also:
getPreferredSize(), User Manual

autoSize

public boolean autoSize
If true, will automatically size the control canvas to fit the barcode at design or runtime; Default =True.

See Also:
setAutoSize(boolean newVal), getAutoSize(), User Manual

barColor

public java.awt.Color barColor
Color of the modules.

See Also:
setForeground(Color newColor), getForeground(), User Manual

rotate

public int rotate
Rotation angle; valid values are 0 (default), 90, 180 & 270.

See Also:
setRotationAngle(int newRotate), getRotationAngle(), User Manual

numOfSym

public int numOfSym
Invokes message append across symbols the number of symbols specified.

See Also:
setNumberOfSymbols(int value), getNumberOfSymbols(), User Manual

ecl

public int ecl
Error correction Level, 0 = default error correction level; 01 to 99 = minimum error correction percentage; 101 to 104 = 1 to 4-layer Compact symbol; 201 to 232 = 1 to 32-layer Full-Range symbol; 300 = a simple Aztec "Rune"

See Also:
setErrorCorrectionLevel(int value), getErrorCorrectionLevel(), User Manual

msgApp

public java.lang.String msgApp
Optional null-terminated ID field for Append.

See Also:
setMessageAppend(String value), getMessageAppend(), User Manual

readerInit

public boolean readerInit
Adds the reader initialization symbol to the barcode for older scanners, which require it.

See Also:
setReaderInitialization(boolean value), getReaderInitialization(), User Manual

dotPixels

public int dotPixels

applyTilde

public boolean applyTilde
If true, ("Y") the tilde (~) will be processed according to the rules in the Aztec section of the user guide. If not it will be treated as a normal character; Default =False.

See Also:
setApplyTilde(boolean newVal), getApplyTilde(), User Manual

reBuild

public boolean reBuild
Constructor Detail

Aztec

public Aztec()
Method Detail

setDataToEncode

public void setDataToEncode(java.lang.String newCode)
Sets the code property.

Parameters:
newCode - the new value for the code variable.
See Also:
code, User Manual

getDataToEncode

public java.lang.String getDataToEncode()
Gets the code property.

Returns:
the current value of the code variable.
See Also:
code, User Manual

setLeftMarginCM

public void setLeftMarginCM(double newMargin)
Sets the leftMarginCM property.

Parameters:
newMargin - the new value for the leftMarginCM variable.
See Also:
leftMarginCM, User Manual

getLeftMarginCM

public double getLeftMarginCM()
Gets the leftMarginCM property.

Returns:
the current value of the leftMarginCM variable.
See Also:
leftMarginCM, User Manual

setTopMarginCM

public void setTopMarginCM(double newMargin)
Sets the topMarginCM property.

Parameters:
newMargin - the new value for the topMarginCM variable.
See Also:
topMarginCM, User Manual

getTopMarginCM

public double getTopMarginCM()
Gets the topMarginCM property.

Returns:
the current value of the topMarginCM variable.
See Also:
topMarginCM, User Manual

setBackground

public void setBackground(java.awt.Color newColor)
Sets the backColor property.

Parameters:
newColor - the new value for the backColor variable.
See Also:
backColor, User Manual

getBackground

public java.awt.Color getBackground()
Gets the backColor property.

Returns:
the current value of the backColor variable.
See Also:
backColor, User Manual

setPixelsPerCM

public void setPixelsPerCM(int newRes)
Sets the resolution property.

Parameters:
newRes - the new value for the resolution variable.
See Also:
resolution, User Manual

getPixelsPerCM

public int getPixelsPerCM()
Gets the resolution property.

Returns:
the current value of the resolution variable.
See Also:
resolution, User Manual

setXDimensionCM

public void setXDimensionCM(double newX)
Sets the X property.

Parameters:
newX - the new value for the X variable.
See Also:
X, User Manual

getXDimensionCM

public double getXDimensionCM()
Gets the X property.

Returns:
the current value of the X variable.
See Also:
X, User Manual

setAutoSize

public void setAutoSize(boolean newVal)
Sets the autoSize property.

Parameters:
newVal - the new value for the autoSize variable.
See Also:
autoSize, User Manual

getAutoSize

public boolean getAutoSize()
Gets the autoSize property.

Returns:
the current value of the autoSize variable.
See Also:
autoSize, User Manual

setImageSize

public void setImageSize(int imgWidth,
                         int imgHeight)
Sets the size of the generated image, if used then autoSize is set to false.


getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the size in pixels appropriate for the generated image after it is generated.


getMinimumSize

public java.awt.Dimension getMinimumSize()
Gets the minimum size in pixels of the barcode image generated.

Returns:
Dimension(8,8)
See Also:
User Manual

setForeground

public void setForeground(java.awt.Color newColor)
Sets the barColor property.

Parameters:
newColor - the new value for the barColor variable.
See Also:
barColor, User Manual

getForeground

public java.awt.Color getForeground()
Gets the barColor property.

Returns:
the current value of the barColor variable.
See Also:
barColor, User Manual

setRotationAngle

public void setRotationAngle(int newRotate)
Sets the rotate property.

Parameters:
newRotate - the new value for the rotate variable.
See Also:
rotate, User Manual

getRotationAngle

public int getRotationAngle()
Gets the rotate property.

Returns:
the current value of the rotate variable.
See Also:
rotate, User Manual

setNumberOfSymbols

public void setNumberOfSymbols(int value)
Sets the numOfSym property.

Parameters:
value - the new value for the numOfSym variable.
See Also:
numOfSym, User Manual

getNumberOfSymbols

public int getNumberOfSymbols()
Gets the numOfSym property.

Returns:
the current value of the numOfSym variable.
See Also:
numOfSym, User Manual

setErrorCorrectionLevel

public void setErrorCorrectionLevel(int value)
Sets the ecl property.

Parameters:
value - the new value for the ecl variable.
See Also:
ecl, User Manual

getErrorCorrectionLevel

public int getErrorCorrectionLevel()
Gets the ecl property.

Returns:
the current value of the ecl variable.
See Also:
ecl, User Manual

setMessageAppend

public void setMessageAppend(java.lang.String value)
Sets the msgApp property.

Parameters:
value - the new value for the msgApp variable.
See Also:
msgApp, User Manual

getMessageAppend

public java.lang.String getMessageAppend()
Gets the msgApp property.

Returns:
the current value of the msgApp variable.
See Also:
msgApp, User Manual

setReaderInitialization

public void setReaderInitialization(boolean value)
Sets the readerInit property.

Parameters:
value - the new value for the readerInit variable.
See Also:
readerInit, User Manual

getReaderInitialization

public boolean getReaderInitialization()
Gets the readerInit property.

Returns:
the current value of the readerInit variable.
See Also:
readerInit, User Manual

setApplyTilde

public void setApplyTilde(boolean newVal)
Sets the applyTilde property.

See Also:
applyTilde, User Manual

getApplyTilde

public boolean getApplyTilde()
Gets applyTilde the property.

Returns:
the current value of the applyTilde variable.
See Also:
applyTilde, User Manual

createSVG

public java.lang.String createSVG()

createEPS

public java.lang.String createEPS()

fontEncode

public java.lang.String fontEncode()

paint

public void paint(java.awt.Graphics g2)
Paints the barcode and rotates it if necessary