[]
        
(Showing Draft Content)

IDataBarBorder

Interface IDataBarBorder


public interface IDataBarBorder
Represents the border of the data bars specified by a conditional formatting rule.

An IDataBarBorder object is used to configure whether a data bar shows a border and, if so, the border color and border type. Use IDataBar.getBarBorder() to obtain this interface from a data bar conditional formatting rule.


 worksheet.getRange("A1:A5").setValue(new Object[][] {{1}, {2}, {3}, {4}, {5}});
 IDataBar dataBar = worksheet.getRange("A1:A5").getFormatConditions().addDatabar();
 IDataBarBorder border = dataBar.getBarBorder();
 border.setType(DataBarBorderType.Solid);
 border.getColor().setColor(Color.GetRed());
 
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets an object that specifies the border color of data bars in a conditional formatting rule.
    Gets the border type for data bars specified by a conditional formatting rule.
    void
    Sets the border type for data bars in this conditional formatting rule.
  • Method Details

    • getColor

      IFormatColor getColor()
      Gets an object that specifies the border color of data bars in a conditional formatting rule.

      Use the returned IFormatColor object to read or modify the border color for the current data bar rule.

      
       worksheet.getRange("A1:A5").setValue(new Object[][] {{1}, {2}, {3}, {4}, {5}});
       IDataBar dataBar = worksheet.getRange("A1:A5").getFormatConditions().addDatabar();
       IDataBarBorder border = dataBar.getBarBorder();
       border.setType(DataBarBorderType.Solid);
       IFormatColor color = border.getColor();
       color.setColor(Color.GetRed());
       
      Returns:
      The IFormatColor object that specifies the border color of data bars in a conditional formatting rule; see IFormatColor.
    • getType

      Gets the border type for data bars specified by a conditional formatting rule.

      The returned value indicates whether the data bar border is disabled or displayed as a solid border.

      
       worksheet.getRange("A1:A5").setValue(new Object[][] {{1}, {2}, {3}, {4}, {5}});
       IDataBar dataBar = worksheet.getRange("A1:A5").getFormatConditions().addDatabar();
       IDataBarBorder border = dataBar.getBarBorder();
       border.setType(DataBarBorderType.Solid);
       DataBarBorderType type = border.getType();
       
      Returns:
      The border type for data bars specified by a conditional formatting rule.
    • setType

      void setType(DataBarBorderType value)
      Sets the border type for data bars in this conditional formatting rule.

      Use this method to control whether the data bar displays no border or a solid border.

      
       worksheet.getRange("A1:A5").setValue(new Object[][] {{1}, {2}, {3}, {4}, {5}});
       IDataBar dataBar = worksheet.getRange("A1:A5").getFormatConditions().addDatabar();
       IDataBarBorder border = dataBar.getBarBorder();
       border.setType(DataBarBorderType.Solid);
       
      Parameters:
      value - The data bar border type. Must not be null.