com.aspose.barcode.component

Class BarCodeControl

  • java.lang.Object
    • View
      • com.aspose.barcode.component.BarCodeControl


  • public class BarCodeControl
    extends View
    • Constructor Summary

      Constructors 
      Constructor and Description
      BarCodeControl(Context context, AttributeSet attrs)
      Creates BarCodeControl component instance
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getAutoSizeMode()
      Gets the mode by which the barcode automatically changes sizes.
      java.lang.String getBarCodeImageHeight()
      Gets BarCode image's height.
      java.lang.String getBarCodeImageWidth()
      Gets BarCode image's width.
      java.lang.String getCodeText()
      Gets assigned data for BarCode as codeText that will be encoded.
      java.lang.String getEncodeType()
      BarCode's encode type (symbology).
      java.lang.String getGraphicsUnit()
      Gets graphics unit.
      java.lang.String getImageLeftOffset()
      Gets value for Image's top left corner offset from left egde
      java.lang.String getImageTopOffset()
      Gets value assigned for Image's top left corner offset from top egde
      boolean isGenerateFromAttributes()
      Determines the data source for generating barcode
      protected void onDraw(Canvas canvas) 
      void setAutoSizeMode(java.lang.String autoSizeMode)
      Sets the mode by which the barcode automatically changes sizes.
      void setBarCodeImageHeight(java.lang.String barCodeImageHeight)
      Sets BarCode image's height.
      void setBarCodeImageWidth(java.lang.String barCodeImageWidth)
      Sets BarCode image's width.
      void setCodeText(java.lang.String codeText)
      Assign data for BarCode as codeText that will be encoded.
      void setEncodeType(java.lang.String encodeType)
      Assign encode type for BarCode (symbology)
      void setGenerateFromAttributes(boolean generateFromAttributes)
      Toggle between generation from attributes and from supplied parameters
      void setGraphicsUnit(java.lang.String graphicsUnit)
      Sets graphics unit.
      void setImageLeftOffset(java.lang.String imageLeftOffset)
      Sets value for Image's top left corner offset from left
      void setImageTopOffset(java.lang.String imageTopOffset)
      Sets value for Image's top left corner offset from top egde
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BarCodeControl

        public BarCodeControl(Context context,
                              AttributeSet attrs)
        Creates BarCodeControl component instance
        Parameters:
        context -
        attrs -
    • Method Detail

      • onDraw

        protected void onDraw(Canvas canvas)
      • setCodeText

        public void setCodeText(java.lang.String codeText)
        Assign data for BarCode as codeText that will be encoded. Different types of BarCode may have different CodeText length restrictions.
        Parameters:
        codeText - text which will be encoded
      • setEncodeType

        public void setEncodeType(java.lang.String encodeType)
        Assign encode type for BarCode (symbology)
        Parameters:
        encodeType - encode type for barcode
      • getCodeText

        public java.lang.String getCodeText()
        Gets assigned data for BarCode as codeText that will be encoded. Different types of BarCode may have different CodeText length restrictions.
        Returns:
        data to be encoded
      • isGenerateFromAttributes

        public boolean isGenerateFromAttributes()
        Determines the data source for generating barcode
        Returns:
        true if barcode is generated from attributes
      • setGenerateFromAttributes

        public void setGenerateFromAttributes(boolean generateFromAttributes)
        Toggle between generation from attributes and from supplied parameters
        Parameters:
        generateFromAttributes - if set to true barcode will be generated from attributes
      • getEncodeType

        public java.lang.String getEncodeType()
        BarCode's encode type (symbology).
        Returns:
        BarCode's encode type
      • getGraphicsUnit

        public java.lang.String getGraphicsUnit()
        Gets graphics unit. Measurement of various properties such as width, height etc. Default GraphicsUnit: Millimeter
      • getBarCodeImageWidth

        public java.lang.String getBarCodeImageWidth()
        Gets BarCode image's width.
      • setBarCodeImageWidth

        public void setBarCodeImageWidth(java.lang.String barCodeImageWidth)
        Sets BarCode image's width.
      • getBarCodeImageHeight

        public java.lang.String getBarCodeImageHeight()
        Gets BarCode image's height.
      • setBarCodeImageHeight

        public void setBarCodeImageHeight(java.lang.String barCodeImageHeight)
        Sets BarCode image's height.
      • setGraphicsUnit

        public void setGraphicsUnit(java.lang.String graphicsUnit)
        Sets graphics unit. Measurement of various properties such as width, height etc. Default GraphicsUnit: Millimeter
      • setImageLeftOffset

        public void setImageLeftOffset(java.lang.String imageLeftOffset)
        Sets value for Image's top left corner offset from left
        Parameters:
        imageLeftOffset - value for offset
      • getImageLeftOffset

        public java.lang.String getImageLeftOffset()
        Gets value for Image's top left corner offset from left egde
        Returns:
        value for offset that was assigned
      • setImageTopOffset

        public void setImageTopOffset(java.lang.String imageTopOffset)
        Sets value for Image's top left corner offset from top egde
        Parameters:
        imageTopOffset - value for offset
      • getImageTopOffset

        public java.lang.String getImageTopOffset()
        Gets value assigned for Image's top left corner offset from top egde
        Returns:
        value for offset that was assigned
      • getAutoSizeMode

        public java.lang.String getAutoSizeMode()
        Gets the mode by which the barcode automatically changes sizes. Default value is AutoSizeMode.None.
      • setAutoSizeMode

        public void setAutoSizeMode(java.lang.String autoSizeMode)
        Sets the mode by which the barcode automatically changes sizes. Default value is AutoSizeMode.None.