[]
        
(Showing Draft Content)

ILabelOption

Interface ILabelOption

All Known Subinterfaces:
ICodabar, ICode128, ICode39, ICode49, ICode93, IEAN13, IEAN8, IGS1128

public interface ILabelOption
Represents label display options for a barcode.

This interface is implemented by barcode objects that support human-readable labels. Use it to determine whether the label is displayed and where the label is positioned relative to the barcode.


 worksheet.getRange("A1").setValue("123456");
 worksheet.getRange("B1").setFormula("=BC_CODE39(A1)");
 ILabelOption labelOption = (ILabelOption) worksheet.getRange("B1").getValue();
 boolean showLabel = labelOption.getShowLabel();
 String labelPosition = labelOption.getLabelPosition();
 // showLabel is true and labelPosition is "bottom".
 
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the position of the label text when the barcode displays a label.
    boolean
    Gets whether the barcode displays its human-readable label text.
  • Method Details

    • getShowLabel

      boolean getShowLabel()
      Gets whether the barcode displays its human-readable label text.

      Use this property to determine whether the barcode renders label text. When this property returns true, the label position is defined by getLabelPosition().

      
       worksheet.getRange("A1").setValue("123456");
       worksheet.getRange("B1").setFormula("=BC_CODE39(A1,,,TRUE,\"bottom\")");
       ILabelOption labelOption = (ILabelOption) worksheet.getRange("B1").getValue();
       boolean showLabel = labelOption.getShowLabel();
       
      Returns:
      true if the barcode shows label text; otherwise, false.
    • getLabelPosition

      String getLabelPosition()
      Gets the position of the label text when the barcode displays a label.

      Use this property together with getShowLabel() to determine how the human-readable label is displayed for a barcode. Common values include "top" and "bottom".

      
       worksheet.getRange("A1").setValue("123456");
       worksheet.getRange("B1").setFormula("=BC_CODE39(A1,,,TRUE,\"bottom\")");
       ILabelOption labelOption = (ILabelOption) worksheet.getRange("B1").getValue();
       String labelPosition = labelOption.getLabelPosition();
       
      Returns:
      The label position string for the barcode label text.