public final class BarCodeControl extends javax.swing.JPanel implements IBarCodeControl
To use BarCodeControl add aspose-barcode.jar to classpath. Supported symbology: 1D: Codabar, Code11, Code128, Code39Standard, Code39Extended Code93Standard, Code93Extended, EAN13, EAN8, Interleaved2of5, MSI, Standard2of5, UPCA, UPCE, ISBN, GS1Code128, Postnet, Planet EAN14, SCC14, SSCC18, ITF14, SingaporePost 2D: DataMatrix, PDf417, QR code
BarCodeBuilder
,
Serialized Formjavax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
BarCodeControl()
Initializes a new instance of the
BarCodeControl class. |
BarCodeControl(java.lang.String codeText)
Initializes a new instance of the
BarCodeControl class. |
BarCodeControl(java.lang.String codeText,
BaseEncodeType encodeType)
Initializes a new instance of the
BarCodeControl class. |
Modifier and Type | Method and Description |
---|---|
float |
getAspectRatio()
2D BarCode's module's height/width ratio (yDimension/xDimension).
|
boolean |
getAutoSize()
Wether ajust image's size automatically.
|
int |
getAztectErrorLevel()
Level of error corection of Aztect types of barcode.
|
java.awt.Color |
getBackColor()
Background color of the barcode image
see
System.Drawing.Color |
java.awt.image.BufferedImage |
getBarCodeImage()
Gets the BarCode Image.
|
float |
getBarHeight()
height of 1D barcodes' bars.
|
java.awt.Color |
getBorderColor()
BarCode Image's border's color
see
System.Drawing.Color
see BorderWidth
see BorderVisible
see BorderDashStyle |
int |
getBorderDashStyle()
BarCode Image's border's style
see
BarCode.BorderDashStyle
see BorderWidth
see BorderVisible
see BorderColor |
boolean |
getBorderVisible()
wether BarCode Image's border is visible
see
BorderWidth
see
see |
float |
getBorderWidth()
BarCode Image's border's width
Default Graphics Unit: Millimeter
see
BorderVisible
see
see |
Caption |
getCaptionAbove()
Caption Above the BarCode image.
|
Caption |
getCaptionBelow()
Caption Below the BarCode image.
|
short |
getCodabarStartSymbol()
Start symbol (character) of codabar symbology
see
CodabarStopSymbol
see CodabarSymbol |
short |
getCodabarStopSymbol()
Stop symbol (character) of codabar symbology
see
CodabarStartSymbol
see CodabarSymbol |
int |
getCodeLocation()
Specify the displaying CodeText's Location, set to CodeLocation.None to hide CodeText.
|
java.lang.String |
getCodeText()
Data to be encoded, different types of BarCode may have different CodeText length restrictions
See EnableEscape.
|
int |
getCodeTextAlignment()
Gets or sets the alignment of the code text.
|
java.awt.Color |
getCodeTextColor()
Specify the displaying CodeText's Color
see
System.Drawing.Color |
java.nio.charset.Charset |
getCodeTextEncoding()
Gets a character encoding.
|
java.awt.Font |
getCodeTextFont()
Specify the displaying CodeText's font
|
float |
getCodeTextSpace()
Space between the CodeText and the BarCode.
|
int |
getColumns()
2D BarCode's columns, if setting is illegal then columns will be calculated automatically
appliable SymbologyType: Pdf417
|
int |
getCustomerInformationInterpretingType()
Interpreting type for the Customer Information of AustralianPost, default to CustomerInformationInterpretingType.Other"
See
BarCode.CustomerInformationInterpretingType . |
int |
getDataMatrixEncodeMode()
Encode mode of Datamatrix barcode, default to Auto
see
BarCode.DataMatrixEncodeModeDataMatrixEncodeMode . |
java.lang.String |
getDisplay2DText()
Gets the text will displayed on the barcode's image.
|
int |
getEnableChecksum() |
boolean |
getEnableEscape()
Indicates whether explains the character "\" as an escape character in CodeText property.
|
BaseEncodeType |
getEncodeType()
BarCode's encode type (symbology).
|
java.awt.Color |
getForeColor()
Foreground color of the barcode image, that is,
Bar's color of 1D barcode, Module's color of 2D barcode
see
System.Drawing.Color |
int |
getGraphicsUnit()
Measurement of various properties such as width, height etc.
|
float |
getImageHeight()
BarCode image's height see
AutoSize , if AutoSize is true, height will
be increased accordingly
Default Graphics Unit: Millimeter |
int |
getImageQuality()
Graphics quality mode, when RotationAngleF not equal to 0, 90, 180 or 270, do set quality mode to anti-alias.
|
float |
getImageWidth()
BarCode image's width see
AutoSize , if AutoSize is true, ImageWidth will
be increased accordingly
Default Graphics Unit: Millimeter |
int |
getITF14BorderType()
Border type of ITF14 barcode, quiet zone will be determined by margin settings.
|
int |
getMacroPdf417FileID()
Gets macro pdf417 barcode's file ID.
|
int |
getMacroPdf417SegmentID()
Gets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
|
int |
getMacroPdf417SegmentsCount()
Gets macro pdf417 barcode segments count.
|
MarginsF |
getMargins()
Margin area around the core BarCode image
If AutoSize is false, then width and height is fixed, thus Margins setting will be ignored
Default Graphics Unit: Millimeter
|
int |
getPdf417CompactionMode()
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is
<bode>Auto</bode>
see BarCode.Pdf417CompactionMode |
int |
getPdf417ErrorLevel()
Gets Pdf417 symbology type of BarCode's error coccrection level
ranging from level0 to level9, level0 means no error correction info,
level9 means best error correction which means a larger picture
|
boolean |
getPdf417Truncate()
whether pdf417 symbology type of BarCode is truncated (to reduce space)
|
float |
getPlanetShortBarHeight()
Short bar's height of Planet barcode, it has to be between 1 millimeter and 1.5 milimeters.
|
float |
getPostnetShortBarHeight()
Short bar's height of Postnet barcode, it has to be between 1 millimeter and 1.5 milimeter (0.04 inch and 0.06 inch).
|
java.lang.String |
getPrinterName()
Choose printer, if not specified, Print() method will choose the first available printer
|
int |
getQREncodeMode()
QR symbology type of BarCode's encoding mode, default mode is
<bode>Auto</bode> |
int |
getQRErrorLevel()
Level of Reed-Solomon error correction for QR barcode.
|
Resolution |
getResolution()
Gets the resolution of the BarCode image
see
BarCode.Resolution |
float |
getRotationAngleF()
BarCode image's rotation angle, measured in degree, e.g.
|
int |
getRows()
2D BarCode's rows, if setting is illegal then rows will be calculated automatically
appliable SymbologyType: Pdf417
|
java.lang.String |
getSupplementData()
Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5.
|
float |
getSupplementSpace()
Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter
see
System.Drawing.GraphicsUnit
see SupplementData |
int |
getTextRenderingHint()
Specifies the quality of text rendering.
|
float |
getWideNarrowRatio()
Wide bars to Narrow bars ratio for some 1D BarCode.
|
float |
getxDimension()
x-dimension, smallest width unit of BarCode's bars or spaces.
|
float |
getyDimension()
y-dimension, smallest height unit of 2D BarCode's modules.
|
protected void |
paintComponent(java.awt.Graphics g) |
void |
print()
Print BarCodeImage
see
PrinterName |
void |
rotate()
Rotate barcode image clockwise for 90 degrees
|
void |
rotate(float angle)
Rotate barcode image clockwise
|
void |
rotate(int direction,
float angle)
Rotate the barcode image
|
void |
save(java.io.OutputStream stream,
int format)
Save BarCodeImage to specific file in specific format
|
void |
save(java.lang.String filename)
Save BarCodeImage to specific file in specific format
|
void |
save(java.lang.String filename,
com.aspose.barcode.ImageFormat format)
Save BarCodeImage to specific file in specific format
|
void |
save(java.lang.String filename,
int format)
Save BarCodeImage to specific file in specific format
|
void |
setAspectRatio(float value)
2D BarCode's module's height/width ratio (yDimension/xDimension).
|
void |
setAutoSize(boolean value)
Sets a value indicating whether the image size is to be adjusted automatically.
|
void |
setAztectErrorLevel(int value)
Level of error corection of Aztect types of barcode.
|
void |
setBackColor(java.awt.Color value)
Background color of the barcode image
see
System.Drawing.Color |
void |
setBarHeight(float value)
height of 1D barcodes' bars.
|
void |
setBorderColor(java.awt.Color value)
BarCode Image's border's color
see
System.Drawing.Color
see BorderWidth
see BorderVisible
see BorderDashStyle |
void |
setBorderDashStyle(int value)
BarCode Image's border's style
see
BarCode.BorderDashStyle
see BorderWidth
see BorderVisible
see BorderColor |
void |
setBorderVisible(boolean value)
wether BarCode Image's border is visible
see
BorderWidth
see
see |
void |
setBorderWidth(float value)
BarCode Image's border's width
Default Graphics Unit: Millimeter
see
BorderVisible
see
see |
void |
setCaptionAbove(Caption value)
Caption Above the BarCode image.
|
void |
setCaptionBelow(Caption value)
Caption Below the BarCode image.
|
void |
setCodabarStartSymbol(short value)
Start symbol (character) of codabar symbology
see
CodabarStopSymbol
see CodabarSymbol |
void |
setCodabarStopSymbol(short value)
Stop symbol (character) of codabar symbology
see
CodabarStartSymbol
see CodabarSymbol |
void |
setCodeLocation(int value)
Specify the displaying CodeText's Location, set to CodeLocation.None to hide CodeText.
|
void |
setCodeText(java.lang.String value)
Data to be encoded, different types of BarCode may have different CodeText length restrictions
See EnableEscape.
|
void |
setCodeTextAlignment(int value)
CodeTextAlignment
|
void |
setCodeTextColor(java.awt.Color value)
Specify the displaying CodeText's Color
see
System.Drawing.Color |
void |
setCodeTextEncoding(java.nio.charset.Charset value)
Sets a character encoding.
|
void |
setCodeTextFont(java.awt.Font value)
Specify the displaying CodeText's font
|
void |
setCodeTextSpace(float value)
Space between the CodeText and the BarCode.
|
void |
setColumns(int value)
2D BarCode's columns, if setting is illegal then columns will be calculated automatically
appliable SymbologyType: Pdf417
|
void |
setCustomerInformationInterpretingType(int value)
Interpreting type for the Customer Information of AustralianPost, default to CustomerInformationInterpretingType.Other"
See
BarCode.CustomerInformationInterpretingType . |
void |
setDataMatrixEncodeMode(int value)
Encode mode of Datamatrix barcode, default to Auto
see
BarCode.DataMatrixEncodeModeDataMatrixEncodeMode . |
void |
setDisplay2DText(java.lang.String value)
Sets the text will displayed on the barcode's image.
|
void |
setEnableChecksum(int value) |
void |
setEnableEscape(boolean value)
Indicates whether explains the character "\" as an escape character in CodeText property.
|
void |
setEncodeType(BaseEncodeType value)
BarCode's encode type (symbology).
|
void |
setForeColor(java.awt.Color value)
Foreground color of the barcode image, that is,
Bar's color of 1D barcode, Module's color of 2D barcode
see
System.Drawing.Color |
void |
setGraphicsUnit(int value)
Measurement of various properties such as width, height etc.
|
void |
setImageHeight(float value)
BarCode image's height see
AutoSize , if AutoSize is true, height will
be increased accordingly
Default Graphics Unit: Millimeter |
void |
setImageQuality(int value)
Graphics quality mode, when RotationAngleF not equal to 0, 90, 180 or 270, do set quality mode to anti-alias.
|
void |
setImageWidth(float value)
BarCode image's width.
|
void |
setITF14BorderType(int value)
Border type of ITF14 barcode, quiet zone will be determined by margin settings.
|
void |
setMacroPdf417FileID(int value)
Sets macro pdf417 barcode's file ID.
|
void |
setMacroPdf417SegmentID(int value)
Sets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
|
void |
setMacroPdf417SegmentsCount(int value)
Sets macro pdf417 barcode segments count.
|
void |
setMargins(MarginsF value)
Margin area around the core BarCode image
If AutoSize is false, then width and height is fixed, thus Margins setting will be ignored
Default Graphics Unit: Millimeter
|
void |
setPdf417CompactionMode(int value)
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is
<bode>Auto</bode>
see BarCode.Pdf417CompactionMode |
void |
setPdf417ErrorLevel(int value)
Sets Pdf417 symbology type of BarCode's error coccrection level
ranging from level0 to level9, level0 means no error correction info,
level9 means best error correction which means a larger picture
|
void |
setPdf417Truncate(boolean value)
whether pdf417 symbology type of BarCode is truncated (to reduce space)
|
void |
setPlanetShortBarHeight(float value)
Short bar's height of Planet barcode, it has to be between 1 millimeter and 1.5 milimeters.
|
void |
setPostnetShortBarHeight(float value)
Short bar's height of Postnet barcode, it has to be between 1 millimeter and 1.5 milimeter (0.04 inch and 0.06 inch).
|
void |
setPrinterName(java.lang.String value)
Choose printer, if not specified, Print() method will choose the first available printer
|
void |
setQREncodeMode(int value)
QR symbology type of BarCode's encoding mode, default mode is
<bode>Auto</bode> |
void |
setQRErrorLevel(int value)
Level of Reed-Solomon error correction for QR barcode.
|
void |
setResolution(Resolution value)
Sets the resolution of the BarCode image
see
BarCode.Resolution |
void |
setRotationAngleF(float value)
BarCode image's rotation angle, measured in degree, e.g.
|
void |
setRows(int value)
2D BarCode's rows, if setting is illegal then rows will be calculated automatically
appliable SymbologyType: Pdf417
|
void |
setSize(int width,
int height) |
void |
setSupplementData(java.lang.String value)
Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5.
|
void |
setSupplementSpace(float value)
Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter
see
System.Drawing.GraphicsUnit
see SupplementData |
void |
setTextRenderingHint(int value)
Specifies the quality of text rendering.
|
void |
setWideNarrowRatio(float value)
Wide bars to Narrow bars ratio for some 1D BarCode.
|
void |
setxDimension(float value)
x-dimension, smallest width unit of BarCode's bars or spaces.
|
void |
setyDimension(float value)
y-dimension, smallest height unit of 2D BarCode's modules.
|
java.lang.String |
toString()
overried to string method
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, show, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
public BarCodeControl()
Initializes a new instance of the BarCodeControl
class.
public BarCodeControl(java.lang.String codeText, BaseEncodeType encodeType)
Initializes a new instance of the BarCodeControl
class.
codeText
- data to be encodedencodeType
- barcode's typepublic BarCodeControl(java.lang.String codeText)
Initializes a new instance of the BarCodeControl
class.
codeText
- data to be encodedpublic void setSize(int width, int height)
setSize
in class java.awt.Component
protected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public BaseEncodeType getEncodeType()
IBarCodeControl
getEncodeType
in interface IBarCodeControl
public void setEncodeType(BaseEncodeType value)
IBarCodeControl
setEncodeType
in interface IBarCodeControl
public java.nio.charset.Charset getCodeTextEncoding()
Gets a character encoding.
public void setCodeTextEncoding(java.nio.charset.Charset value)
Sets a character encoding.
public java.lang.String getCodeText()
Data to be encoded, different types of BarCode may have different CodeText length restrictions See EnableEscape. See CodeTextFont. See CodeTextColor. See CodeLocation. See CodeTextSpace. See CodeTextAlignment.
Create and save a BarCode imagecom.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.setSymbologyType(com.aspose.barcode.Symbology.Codabar; b.setCodeText("12345678"); b.save("test.bmp");
getCodeText
in interface IBarCodeControl
public void setCodeText(java.lang.String value)
Data to be encoded, different types of BarCode may have different CodeText length restrictions See EnableEscape. See CodeTextFont. See CodeTextColor. See CodeLocation. See CodeTextSpace. See CodeTextAlignment.
Create and save a BarCode imagecom.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.setSymbologyType(com.aspose.barcode.Symbology.Codabar; b.setCodeText("12345678"); b.save("test.bmp");
setCodeText
in interface IBarCodeControl
public java.lang.String getDisplay2DText()
Gets the text will displayed on the barcode's image. Available only for 2D barcodes. Limited to 1000 chars.
Value: The text to display.getDisplay2DText
in interface IBarCodeControl
public void setDisplay2DText(java.lang.String value)
Sets the text will displayed on the barcode's image. Available only for 2D barcodes. Limited to 1000 chars.
Value: The text to display.setDisplay2DText
in interface IBarCodeControl
public int getITF14BorderType()
Border type of ITF14 barcode, quiet zone will be determined by margin settings.
public void setITF14BorderType(int value)
Border type of ITF14 barcode, quiet zone will be determined by margin settings.
public boolean getEnableEscape()
Indicates whether explains the character "\" as an escape character in CodeText property.
see CodeText
<note>If the EnableEscape is true, "\" will be explained as a special escape character. Otherwise, "\" acts as normal characters.</note>
getEnableEscape
in interface IBarCodeControl
public void setEnableEscape(boolean value)
Indicates whether explains the character "\" as an escape character in CodeText property.
see CodeText
<note>If the EnableEscape is true, "\" will be explained as a special escape character. Otherwise, "\" acts as normal characters.</note>
setEnableEscape
in interface IBarCodeControl
public java.awt.Font getCodeTextFont()
getCodeTextFont
in interface IBarCodeControl
public void setCodeTextFont(java.awt.Font value)
setCodeTextFont
in interface IBarCodeControl
value
- CodeTextFontpublic java.awt.Color getCodeTextColor()
Specify the displaying CodeText's Color
see System.Drawing.Color
getCodeTextColor
in interface IBarCodeControl
public void setCodeTextColor(java.awt.Color value)
Specify the displaying CodeText's Color
see System.Drawing.Color
setCodeTextColor
in interface IBarCodeControl
public int getCodeLocation()
BarCode.CodeLocation
getCodeLocation
in interface IBarCodeControl
CodeLocation
public void setCodeLocation(int value)
BarCode.CodeLocation
setCodeLocation
in interface IBarCodeControl
CodeLocation
public float getCodeTextSpace()
Space between the CodeText and the BarCode.
Default Graphics Unit: Millimeter
see CodeText
see CodeLocation
see CodeTextFont
see CodeTextColor
see CodeTextAlignment
getCodeTextSpace
in interface IBarCodeControl
public void setCodeTextSpace(float value)
Space between the CodeText and the BarCode.
Default Graphics Unit: Millimeter
see CodeText
see CodeLocation
see CodeTextFont
see CodeTextColor
see CodeTextAlignment
setCodeTextSpace
in interface IBarCodeControl
public int getCodeTextAlignment()
Gets or sets the alignment of the code text.
see System.Drawing.StringAlignment
see
see
see
getCodeTextAlignment
in interface IBarCodeControl
public void setCodeTextAlignment(int value)
IBarCodeControl
setCodeTextAlignment
in interface IBarCodeControl
public float getRotationAngleF()
BarCode image's rotation angle, measured in degree, e.g. RotationAngleF = 0 or RotationAngleF = 360 means no rotation If RotationAngleF NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image, please set quality mode to anti-alias
getRotationAngleF
in interface IBarCodeControl
public void setRotationAngleF(float value)
IBarCodeControl
setRotationAngleF
in interface IBarCodeControl
public boolean getAutoSize()
Wether ajust image's size automatically. Recommended:true
getAutoSize
in interface IBarCodeControl
public void setAutoSize(boolean value)
IBarCodeControl
setAutoSize
in interface IBarCodeControl
public float getImageWidth()
BarCode image's width see AutoSize
, if AutoSize is true, ImageWidth will
be increased accordingly
Default Graphics Unit: Millimeter
getImageWidth
in interface IBarCodeControl
public void setImageWidth(float value)
IBarCodeControl
setImageWidth
in interface IBarCodeControl
public float getImageHeight()
BarCode image's height see AutoSize
, if AutoSize is true, height will
be increased accordingly
Default Graphics Unit: Millimeter
getImageHeight
in interface IBarCodeControl
public void setImageHeight(float value)
BarCode image's height see AutoSize
, if AutoSize is true, height will
be increased accordingly
Default Graphics Unit: Millimeter
setImageHeight
in interface IBarCodeControl
public Caption getCaptionAbove()
Caption Above the BarCode image. see Caption
CaptionAbove contains the following properties:
CaptionAbove.Font,
CaptionAbove.ForeColor,
CaptionAbove.Space,
CaptionAbove.Visible,
CaptionAbove.Text,
CaptionAbove.TextAlign
getCaptionAbove
in interface IBarCodeControl
public void setCaptionAbove(Caption value)
Caption Above the BarCode image. see Caption
CaptionAbove contains the following properties:
CaptionAbove.Font,
CaptionAbove.ForeColor,
CaptionAbove.Space,
CaptionAbove.Visible,
CaptionAbove.Text,
CaptionAbove.TextAlign
setCaptionAbove
in interface IBarCodeControl
public Caption getCaptionBelow()
Caption Below the BarCode image. see Caption
CaptionBelow contains the following properties:
CaptionBelow.Font,
CaptionBelow.ForeColor,
CaptionBelow.Space,
CaptionBelow.Visible,
CaptionBelow.Text,
CaptionBelow.TextAlign
getCaptionBelow
in interface IBarCodeControl
public void setCaptionBelow(Caption value)
Caption Below the BarCode image. see Caption
CaptionBelow contains the following properties:
CaptionBelow.Font,
CaptionBelow.ForeColor,
CaptionBelow.Space,
CaptionBelow.Visible,
CaptionBelow.Text,
CaptionBelow.TextAlign
setCaptionBelow
in interface IBarCodeControl
public int getGraphicsUnit()
Measurement of various properties such as width, height etc.
Default GraphicsUnit: Millimeter
see System.Drawing.GraphicsUnit
getGraphicsUnit
in interface IBarCodeControl
public void setGraphicsUnit(int value)
Measurement of various properties such as width, height etc.
Default GraphicsUnit: Millimeter
see System.Drawing.GraphicsUnit
setGraphicsUnit
in interface IBarCodeControl
public Resolution getResolution()
Gets the resolution of the BarCode image
see BarCode.Resolution
getResolution
in interface IBarCodeControl
public void setResolution(Resolution value)
Sets the resolution of the BarCode image
see BarCode.Resolution
setResolution
in interface IBarCodeControl
public float getBorderWidth()
BarCode Image's border's width
Default Graphics Unit: Millimeter
see BorderVisible
see
see
getBorderWidth
in interface IBarCodeControl
BorderDashStyle
public void setBorderWidth(float value)
BarCode Image's border's width
Default Graphics Unit: Millimeter
see BorderVisible
see
see
setBorderWidth
in interface IBarCodeControl
BorderDashStyle
public boolean getBorderVisible()
wether BarCode Image's border is visible
see BorderWidth
see
see
getBorderVisible
in interface IBarCodeControl
BorderDashStyle
public void setBorderVisible(boolean value)
wether BarCode Image's border is visible
see BorderWidth
see
see
setBorderVisible
in interface IBarCodeControl
BorderDashStyle
public java.awt.Color getBorderColor()
BarCode Image's border's color
see System.Drawing.Color
see BorderWidth
see BorderVisible
see BorderDashStyle
getBorderColor
in interface IBarCodeControl
public void setBorderColor(java.awt.Color value)
BarCode Image's border's color
see System.Drawing.Color
see BorderWidth
see BorderVisible
see BorderDashStyle
setBorderColor
in interface IBarCodeControl
public int getBorderDashStyle()
BarCode Image's border's style
see BarCode.BorderDashStyle
see BorderWidth
see BorderVisible
see BorderColor
getBorderDashStyle
in interface IBarCodeControl
public void setBorderDashStyle(int value)
BarCode Image's border's style
see BarCode.BorderDashStyle
see BorderWidth
see BorderVisible
see BorderColor
setBorderDashStyle
in interface IBarCodeControl
public short getCodabarStartSymbol()
Start symbol (character) of codabar symbology
see CodabarStopSymbol
see CodabarSymbol
getCodabarStartSymbol
in interface IBarCodeControl
public void setCodabarStartSymbol(short value)
Start symbol (character) of codabar symbology
see CodabarStopSymbol
see CodabarSymbol
setCodabarStartSymbol
in interface IBarCodeControl
public short getCodabarStopSymbol()
Stop symbol (character) of codabar symbology
see CodabarStartSymbol
see CodabarSymbol
getCodabarStopSymbol
in interface IBarCodeControl
public void setCodabarStopSymbol(short value)
Stop symbol (character) of codabar symbology
see CodabarStartSymbol
see CodabarSymbol
setCodabarStopSymbol
in interface IBarCodeControl
public float getxDimension()
x-dimension, smallest width unit of BarCode's bars or spaces.
increase this will increase the whole barcode image's width if AutoSize is true
Default Graphics Unit: Millimeter
see yDimension
see AutoSize
see BarHeight
getxDimension
in interface IBarCodeControl
public void setxDimension(float value)
x-dimension, smallest width unit of BarCode's bars or spaces.
increase this will increase the whole barcode image's width if AutoSize is true
Default Graphics Unit: Millimeter
see yDimension
see AutoSize
see BarHeight
setxDimension
in interface IBarCodeControl
public float getyDimension()
y-dimension, smallest height unit of 2D BarCode's modules.
Some square symbols (such as DataMatrix) may ignore this and
use x-dimension for both width unit and height unit
In 2D barcode, y-dimension * rows determines BarCode's height
In 1D barcode, BarHeight determines BarCode's height.
Default Graphics Unit: Millimeter
see xDimension
see BarHeight
getyDimension
in interface IBarCodeControl
public void setyDimension(float value)
y-dimension, smallest height unit of 2D BarCode's modules.
Some square symbols (such as DataMatrix) may ignore this and
use x-dimension for both width unit and height unit
In 2D barcode, y-dimension * rows determines BarCode's height
In 1D barcode, BarHeight determines BarCode's height.
Default Graphics Unit: Millimeter
see xDimension
see BarHeight
setyDimension
in interface IBarCodeControl
public float getBarHeight()
height of 1D barcodes' bars.
In 2D barcode, y-dimension * rows determines BarCode's height
In 1D barcode, BarHeight determines BarCode's height.
Default Graphics Unit: Millimeter
see yDimension
getBarHeight
in interface IBarCodeControl
public void setBarHeight(float value)
height of 1D barcodes' bars.
In 2D barcode, y-dimension * rows determines BarCode's height
In 1D barcode, BarHeight determines BarCode's height.
Default Graphics Unit: Millimeter
see yDimension
setBarHeight
in interface IBarCodeControl
public java.awt.Color getForeColor()
Foreground color of the barcode image, that is,
Bar's color of 1D barcode, Module's color of 2D barcode
see System.Drawing.Color
getForeColor
in interface IBarCodeControl
public void setForeColor(java.awt.Color value)
Foreground color of the barcode image, that is,
Bar's color of 1D barcode, Module's color of 2D barcode
see System.Drawing.Color
setForeColor
in interface IBarCodeControl
public java.awt.Color getBackColor()
Background color of the barcode image
see System.Drawing.Color
getBackColor
in interface IBarCodeControl
public void setBackColor(java.awt.Color value)
Background color of the barcode image
see System.Drawing.Color
setBackColor
in interface IBarCodeControl
public int getEnableChecksum()
Enable checksum during generation for 1D barcodes.
Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.
Checksum never used: Codabar
Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN
Checksum always used: Rest symbologies
getEnableChecksum
in interface IBarCodeControl
public void setEnableChecksum(int value)
Enable checksum during generation for 1D barcodes.
Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.
Checksum never used: Codabar
Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN
Checksum always used: Rest symbologies
setEnableChecksum
in interface IBarCodeControl
public int getCustomerInformationInterpretingType()
Interpreting type for the Customer Information of AustralianPost, default to CustomerInformationInterpretingType.Other"
See BarCode.CustomerInformationInterpretingType
.
getCustomerInformationInterpretingType
in interface IBarCodeControl
public void setCustomerInformationInterpretingType(int value)
Interpreting type for the Customer Information of AustralianPost, default to CustomerInformationInterpretingType.Other"
See BarCode.CustomerInformationInterpretingType
.
setCustomerInformationInterpretingType
in interface IBarCodeControl
public float getAspectRatio()
2D BarCode's module's height/width ratio (yDimension/xDimension).
calculated based on xDimension set to 0 means
not using this feature.
see xDimension
see yDimension
getAspectRatio
in interface IBarCodeControl
public void setAspectRatio(float value)
2D BarCode's module's height/width ratio (yDimension/xDimension).
calculated based on xDimension set to 0 means
not using this feature.
see xDimension
see yDimension
setAspectRatio
in interface IBarCodeControl
public int getColumns()
2D BarCode's columns, if setting is illegal then columns will be calculated automatically appliable SymbologyType: Pdf417
getColumns
in interface IBarCodeControl
public void setColumns(int value)
2D BarCode's columns, if setting is illegal then columns will be calculated automatically appliable SymbologyType: Pdf417
setColumns
in interface IBarCodeControl
public int getRows()
2D BarCode's rows, if setting is illegal then rows will be calculated automatically appliable SymbologyType: Pdf417
public void setRows(int value)
2D BarCode's rows, if setting is illegal then rows will be calculated automatically appliable SymbologyType: Pdf417
public int getDataMatrixEncodeMode()
Encode mode of Datamatrix barcode, default to Auto
see BarCode.DataMatrixEncodeModeDataMatrixEncodeMode
.
public void setDataMatrixEncodeMode(int value)
Encode mode of Datamatrix barcode, default to Auto
see BarCode.DataMatrixEncodeModeDataMatrixEncodeMode
.
public int getPdf417CompactionMode()
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is <bode>Auto</bode>
see BarCode.Pdf417CompactionMode
getPdf417CompactionMode
in interface IBarCodeControl
public void setPdf417CompactionMode(int value)
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is <bode>Auto</bode>
see BarCode.Pdf417CompactionMode
setPdf417CompactionMode
in interface IBarCodeControl
public boolean getPdf417Truncate()
whether pdf417 symbology type of BarCode is truncated (to reduce space)
getPdf417Truncate
in interface IBarCodeControl
public void setPdf417Truncate(boolean value)
whether pdf417 symbology type of BarCode is truncated (to reduce space)
setPdf417Truncate
in interface IBarCodeControl
public int getPdf417ErrorLevel()
Gets Pdf417 symbology type of BarCode's error coccrection level ranging from level0 to level9, level0 means no error correction info, level9 means best error correction which means a larger picture
getPdf417ErrorLevel
in interface IBarCodeControl
public void setPdf417ErrorLevel(int value)
Sets Pdf417 symbology type of BarCode's error coccrection level ranging from level0 to level9, level0 means no error correction info, level9 means best error correction which means a larger picture
setPdf417ErrorLevel
in interface IBarCodeControl
public int getMacroPdf417SegmentsCount()
Gets macro pdf417 barcode segments count.
public void setMacroPdf417SegmentsCount(int value)
Sets macro pdf417 barcode segments count.
public int getMacroPdf417SegmentID()
Gets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
public void setMacroPdf417SegmentID(int value)
Sets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
public int getMacroPdf417FileID()
Gets macro pdf417 barcode's file ID.
public void setMacroPdf417FileID(int value)
Sets macro pdf417 barcode's file ID.
public float getWideNarrowRatio()
Wide bars to Narrow bars ratio for some 1D BarCode.
Default WideNarrowRatio:3, that is, wide bars are 3 times as wide as narrow bars
Appliable symbology: Code39Extended, Code39Standard, Standard2of5, Interleaved2of5
see Symbology
getWideNarrowRatio
in interface IBarCodeControl
public void setWideNarrowRatio(float value)
Wide bars to Narrow bars ratio for some 1D BarCode.
Default WideNarrowRatio:3, that is, wide bars are 3 times as wide as narrow bars
Appliable symbology: Code39Extended, Code39Standard, Standard2of5, Interleaved2of5
see Symbology
setWideNarrowRatio
in interface IBarCodeControl
public MarginsF getMargins()
Margin area around the core BarCode image If AutoSize is false, then width and height is fixed, thus Margins setting will be ignored Default Graphics Unit: Millimeter
getMargins
in interface IBarCodeControl
public void setMargins(MarginsF value)
Margin area around the core BarCode image If AutoSize is false, then width and height is fixed, thus Margins setting will be ignored Default Graphics Unit: Millimeter
public java.lang.String getSupplementData()
Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5.
see Symbology
see SupplementSpace
getSupplementData
in interface IBarCodeControl
public void setSupplementData(java.lang.String value)
Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5.
see Symbology
see SupplementSpace
setSupplementData
in interface IBarCodeControl
public float getSupplementSpace()
Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter
see System.Drawing.GraphicsUnit
see SupplementData
getSupplementSpace
in interface IBarCodeControl
public void setSupplementSpace(float value)
Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter
see System.Drawing.GraphicsUnit
see SupplementData
setSupplementSpace
in interface IBarCodeControl
public java.lang.String getPrinterName()
Choose printer, if not specified, Print() method will choose the first available printer
public void setPrinterName(java.lang.String value)
Choose printer, if not specified, Print() method will choose the first available printer
public int getImageQuality()
Graphics quality mode, when RotationAngleF not equal to 0, 90, 180 or 270, do set quality mode to anti-alias. Type: Aspose.BarCode.ImageQualityMode
see ImageQualityMode
getImageQuality
in interface IBarCodeControl
public void setImageQuality(int value)
Graphics quality mode, when RotationAngleF not equal to 0, 90, 180 or 270, do set quality mode to anti-alias. Type: Aspose.BarCode.ImageQualityMode
see ImageQualityMode
setImageQuality
in interface IBarCodeControl
public int getTextRenderingHint()
Specifies the quality of text rendering.
getTextRenderingHint
in interface IBarCodeControl
public void setTextRenderingHint(int value)
Specifies the quality of text rendering.
setTextRenderingHint
in interface IBarCodeControl
public int getQRErrorLevel()
Level of Reed-Solomon error correction for QR barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see BarCode.QRErrorLevelQRErrorLevel
.
public void setQRErrorLevel(int value)
Level of Reed-Solomon error correction for QR barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see BarCode.QRErrorLevelQRErrorLevel
.
public int getQREncodeMode()
QR symbology type of BarCode's encoding mode, default mode is <bode>Auto</bode>
public void setQREncodeMode(int value)
QR symbology type of BarCode's encoding mode, default mode is <bode>Auto</bode>
public void rotate()
Rotate barcode image clockwise for 90 degrees
rotate
in interface IBarCodeControl
public void rotate(float angle)
Rotate barcode image clockwise
rotate
in interface IBarCodeControl
angle
- Rotation Anglepublic void rotate(int direction, float angle)
Rotate the barcode image
rotate
in interface IBarCodeControl
direction
- rotation directionangle
- rotation anglepublic void save(java.lang.String filename)
Save BarCodeImage to specific file in specific format
save
in interface IBarCodeControl
filename
- save to this file pathpublic void save(java.lang.String filename, com.aspose.barcode.ImageFormat format) throws java.io.IOException
IBarCodeControl
save
in interface IBarCodeControl
filename
- Save to this file pathformat
- The specific formatjava.io.IOException
public void save(java.io.OutputStream stream, int format) throws java.io.IOException
Save BarCodeImage to specific file in specific format
save
in interface IBarCodeControl
stream
- System.IO.Streamformat
- System.Drawing.Imaging.ImageFormatjava.io.IOException
public void save(java.lang.String filename, int format) throws java.io.IOException
Save BarCodeImage to specific file in specific format
save
in interface IBarCodeControl
filename
- save to this file pathformat
- System.Drawing.Imaging.ImageFormatjava.io.IOException
public void print() throws javax.print.PrintException
Print BarCodeImage
see PrinterName
javax.print.PrintException
public java.awt.image.BufferedImage getBarCodeImage()
Gets the BarCode Image. Type:Bitmap
getBarCodeImage
in interface IBarCodeControl
public float getPostnetShortBarHeight()
Short bar's height of Postnet barcode, it has to be between 1 millimeter and 1.5 milimeter (0.04 inch and 0.06 inch). To set up tall bar's height, see BarHeight, which has to be between 8.28 milimeter and 9.72 milimeter (0.115 inch and 0.135 inch)
see changing see System.Drawing.GraphicsUnitGraphicsUnit
.
see setting tall bar's height: see BarHeightBarHeight
.
getPostnetShortBarHeight
in interface IBarCodeControl
public void setPostnetShortBarHeight(float value)
Short bar's height of Postnet barcode, it has to be between 1 millimeter and 1.5 milimeter (0.04 inch and 0.06 inch). To set up tall bar's height, see BarHeight, which has to be between 8.28 milimeter and 9.72 milimeter (0.115 inch and 0.135 inch)
see changing see System.Drawing.GraphicsUnitGraphicsUnit
.
see setting tall bar's height: see BarHeightBarHeight
.
setPostnetShortBarHeight
in interface IBarCodeControl
public float getPlanetShortBarHeight()
Short bar's height of Planet barcode, it has to be between 1 millimeter and 1.5 milimeters.
see changing see System.Drawing.GraphicsUnitGraphicsUnit
.
see setting tall bar's height: see BarHeightBarHeight
.
getPlanetShortBarHeight
in interface IBarCodeControl
public void setPlanetShortBarHeight(float value)
Short bar's height of Planet barcode, it has to be between 1 millimeter and 1.5 milimeters.
see changing see System.Drawing.GraphicsUnitGraphicsUnit
.
see setting tall bar's height: see BarHeightBarHeight
.
setPlanetShortBarHeight
in interface IBarCodeControl
public int getAztectErrorLevel()
Level of error corection of Aztect types of barcode. value should between 10 to 95
public void setAztectErrorLevel(int value)
Level of error corection of Aztect types of barcode. value should between 10 to 95
public java.lang.String toString()
overried to string method
toString
in class java.awt.Component