com.aspose.barcode.generation

Class BorderProperties

  • java.lang.Object
    • com.aspose.barcode.generation.BorderProperties


  • public class BorderProperties
    extends java.lang.Object

    Contains specific configuration properties for barcode border.


      This sample shows how to create and save a BarCode image.
      
             BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.CODE_128);
             generator.getBorder().setVisible(true);
             generator.getBorder().setColor(Color.BLUE);
             generator.getBorder().setDashStyle(BorderDashStyle.DashDotDot);
             generator.getBorder().getWidth().setPixels(5);
             generator.save("test.png");
            

    • Constructor Summary

      Constructors 
      Constructor and Description
      BorderProperties() 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.awt.Color getColor()
      BarCode Image's border's color.
      BorderDashStyle getDashStyle()
      Border style of BarCode Image.
      boolean getVisible()
      Gets or sets a value indicating whether [border visible].
      Unit getWidth()
      Border width of the BarCode image in Unit value.
      void setColor(java.awt.Color value)
      BarCode Image's border's color.
      void setDashStyle(BorderDashStyle value)
      Border style of BarCode Image.
      void setDashStyle(int value)
      Deprecated. 
      void setVisible(boolean value)
      Gets or sets a value indicating whether [border visible].
      void setWidth(Unit value)
      Border width of the BarCode image in Unit value.
      • Methods inherited from class java.lang.Object

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

      • BorderProperties

        public BorderProperties()
    • Method Detail

      • getVisible

        public boolean getVisible()

        Gets or sets a value indicating whether [border visible].

        Value: true if [border visible]; otherwise, false.
      • setVisible

        public void setVisible(boolean value)

        Gets or sets a value indicating whether [border visible].

        Value: true if [border visible]; otherwise, false.
      • getWidth

        public Unit getWidth()

        Border width of the BarCode image in Unit value.

      • setWidth

        public void setWidth(Unit value)

        Border width of the BarCode image in Unit value.

        Throws:
        java.lang.IllegalArgumentException - <p>The <b>Width</b> parameter value is less than 0.</p>
      • getDashStyle

        public BorderDashStyle getDashStyle()

        Border style of BarCode Image.

      • setDashStyle

        public void setDashStyle(BorderDashStyle value)

        Border style of BarCode Image.

      • setDashStyle

        @Deprecated
        public void setDashStyle(int value)
        Deprecated. 

        Border style of BarCode Image.

      • getColor

        public java.awt.Color getColor()

        BarCode Image's border's color.

      • setColor

        public void setColor(java.awt.Color value)

        BarCode Image's border's color.