Package com.idautomation.aztec
Class Aztec
java.lang.Object
java.awt.Component
java.awt.Canvas
com.idautomation.aztec.Aztec
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Accessible
This is the main Aztec class that generates the Aztec barcode image.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.awt.Component
Component.BaselineResizeBehavior -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanIf true, ("Y") the tilde (~) will be processed according to the rules in the Aztec section of the user guide.booleanIf true, will automatically size the control canvas to fit the barcode at design or runtime; Default =True.Background color.Color of the modules.Data to be painted in a Aztec symbol.Optional null-terminated ID field for Append.intintError 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"intInitial preferred height property of the beandoubleThe left margin of the barcode (also know as quiet zone); The default is .06 CM.intInvokes message append across symbols the number of symbols specified.intThe preferred height of the barcode image in pixels after barcode is generated.intThe preferred width of the barcode image in pixels after barcode is generated.booleanAdds the reader initialization symbol to the barcode for older scanners, which require it.booleanintThe resolution used to create the X dimension and other measurements in pixels; Default is 38 Pixels Per CM which is about 96 DPI.intRotation angle; valid values are 0 (default), 90, 180 & 270.doubleThe top margin of the barcode (also know as quiet zone); The default is .06 CM.intInitial preferred width property of the beandoubleThe 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_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets applyTilde the property.booleanGets the autoSize property.Gets the backColor property.Gets the code property.intGets the ecl property.Gets the barColor property.doubleGets the leftMarginCM property.Gets the codeApp property.Gets the minimum size in pixels of the barcode image generated.intGets the numOfSym property.intGets the resolution property.Returns the size in pixels appropriate for the generated image after it is generated.booleanGets the readerInit property.intGets the rotate property.doubleGets the topMarginCM property.doubleGets the X property.voidPaints the barcode and rotates it if necessaryvoidsetApplyTilde(boolean newVal) Sets the applyTilde property.voidsetAutoSize(boolean newVal) Sets the autoSize property.voidsetBackground(Color newColor) Sets the backColor property.voidsetDataToEncode(String newCode) Sets the code property.voidsetErrorCorrectionLevel(int value) Sets the ecl property.voidsetForeground(Color newColor) Sets the barColor property.voidsetImageSize(int imgWidth, int imgHeight) Sets the size of the generated image, if used then autoSize is set to false.voidsetLeftMarginCM(double newMargin) Sets the leftMarginCM property.voidsetMessageAppend(String value) Sets the codeApp property.voidsetNumberOfSymbols(int value) Sets the numOfSym property.voidsetPixelsPerCM(int newRes) Sets the resolution property.voidsetReaderInitialization(boolean value) Sets the readerInit property.voidsetRotationAngle(int newRotate) Sets the rotate property.voidsetTopMarginCM(double newMargin) Sets the topMarginCM property.voidsetXDimensionCM(double newX) Sets the X property.Methods inherited from class java.awt.Canvas
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, updateMethods 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBaseline, getBaselineResizeBehavior, 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, getMousePosition, getMouseWheelListeners, getName, getParent, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, revalidate, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setMixingCutoutShape, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate
-
Field Details
-
code
Data to be painted in a Aztec symbol. -
leftMarginCM
public double leftMarginCMThe left margin of the barcode (also know as quiet zone); The default is .06 CM. -
topMarginCM
public double topMarginCMThe top margin of the barcode (also know as quiet zone); The default is .06 CM. -
backColor
Background color. -
resolution
public int resolutionThe 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 -
X
public double XThe 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. -
width
public int widthInitial preferred width property of the bean -
height
public int heightInitial preferred height property of the bean -
pWidth
public int pWidthThe preferred width of the barcode image in pixels after barcode is generated.- See Also:
-
pHeight
public int pHeightThe preferred height of the barcode image in pixels after barcode is generated.- See Also:
-
autoSize
public boolean autoSizeIf true, will automatically size the control canvas to fit the barcode at design or runtime; Default =True. -
barColor
Color of the modules. -
rotate
public int rotateRotation angle; valid values are 0 (default), 90, 180 & 270. -
numOfSym
public int numOfSymInvokes message append across symbols the number of symbols specified. -
ecl
public int eclError 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" -
codeApp
Optional null-terminated ID field for Append. -
readerInit
public boolean readerInitAdds the reader initialization symbol to the barcode for older scanners, which require it. -
dotPixels
public int dotPixels -
applyTilde
public boolean applyTildeIf 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. -
reBuild
public boolean reBuild
-
-
Constructor Details
-
Aztec
public Aztec()
-
-
Method Details
-
setDataToEncode
Sets the code property.- Parameters:
newCode- the new value for the code variable.- See Also:
-
getDataToEncode
Gets the code property.- Returns:
- the current value of the code variable.
- See Also:
-
setLeftMarginCM
public void setLeftMarginCM(double newMargin) Sets the leftMarginCM property.- Parameters:
newMargin- the new value for the leftMarginCM variable.- See Also:
-
getLeftMarginCM
public double getLeftMarginCM()Gets the leftMarginCM property.- Returns:
- the current value of the leftMarginCM variable.
- See Also:
-
setTopMarginCM
public void setTopMarginCM(double newMargin) Sets the topMarginCM property.- Parameters:
newMargin- the new value for the topMarginCM variable.- See Also:
-
getTopMarginCM
public double getTopMarginCM()Gets the topMarginCM property.- Returns:
- the current value of the topMarginCM variable.
- See Also:
-
setBackground
Sets the backColor property.- Overrides:
setBackgroundin classComponent- Parameters:
newColor- the new value for the backColor variable.- See Also:
-
getBackground
Gets the backColor property.- Overrides:
getBackgroundin classComponent- Returns:
- the current value of the backColor variable.
- See Also:
-
setPixelsPerCM
public void setPixelsPerCM(int newRes) Sets the resolution property.- Parameters:
newRes- the new value for the resolution variable.- See Also:
-
getPixelsPerCM
public int getPixelsPerCM()Gets the resolution property.- Returns:
- the current value of the resolution variable.
- See Also:
-
setXDimensionCM
public void setXDimensionCM(double newX) Sets the X property.- Parameters:
newX- the new value for the X variable.- See Also:
-
getXDimensionCM
public double getXDimensionCM()Gets the X property.- Returns:
- the current value of the X variable.
- See Also:
-
setAutoSize
public void setAutoSize(boolean newVal) Sets the autoSize property.- Parameters:
newVal- the new value for the autoSize variable.- See Also:
-
getAutoSize
public boolean getAutoSize()Gets the autoSize property.- Returns:
- the current value of the autoSize variable.
- See Also:
-
setImageSize
public void setImageSize(int imgWidth, int imgHeight) Sets the size of the generated image, if used then autoSize is set to false. -
getPreferredSize
Returns the size in pixels appropriate for the generated image after it is generated.- Overrides:
getPreferredSizein classComponent
-
getMinimumSize
Gets the minimum size in pixels of the barcode image generated.- Overrides:
getMinimumSizein classComponent- Returns:
- Dimension(8,8)
- See Also:
-
setForeground
Sets the barColor property.- Overrides:
setForegroundin classComponent- Parameters:
newColor- the new value for the barColor variable.- See Also:
-
getForeground
Gets the barColor property.- Overrides:
getForegroundin classComponent- Returns:
- the current value of the barColor variable.
- See Also:
-
setRotationAngle
public void setRotationAngle(int newRotate) Sets the rotate property.- Parameters:
newRotate- the new value for the rotate variable.- See Also:
-
getRotationAngle
public int getRotationAngle()Gets the rotate property.- Returns:
- the current value of the rotate variable.
- See Also:
-
setNumberOfSymbols
public void setNumberOfSymbols(int value) Sets the numOfSym property.- Parameters:
value- the new value for the numOfSym variable.- See Also:
-
getNumberOfSymbols
public int getNumberOfSymbols()Gets the numOfSym property.- Returns:
- the current value of the numOfSym variable.
- See Also:
-
setErrorCorrectionLevel
public void setErrorCorrectionLevel(int value) Sets the ecl property.- Parameters:
value- the new value for the ecl variable.- See Also:
-
getErrorCorrectionLevel
public int getErrorCorrectionLevel()Gets the ecl property.- Returns:
- the current value of the ecl variable.
- See Also:
-
setMessageAppend
Sets the codeApp property.- Parameters:
value- the new value for the codeApp variable.- See Also:
-
getMessageAppend
Gets the codeApp property.- Returns:
- the current value of the codeApp variable.
- See Also:
-
setReaderInitialization
public void setReaderInitialization(boolean value) Sets the readerInit property.- Parameters:
value- the new value for the readerInit variable.- See Also:
-
getReaderInitialization
public boolean getReaderInitialization()Gets the readerInit property.- Returns:
- the current value of the readerInit variable.
- See Also:
-
setApplyTilde
public void setApplyTilde(boolean newVal) Sets the applyTilde property.- Parameters:
the- newVal new value for the newVal variable.- See Also:
-
getApplyTilde
public boolean getApplyTilde()Gets applyTilde the property.- Returns:
- the current value of the applyTilde variable.
- See Also:
-
createSVG
-
createEPS
-
paint
Paints the barcode and rotates it if necessary
-