[]
        
(Showing Draft Content)

IconPosition

Enum Class IconPosition

java.lang.Object
java.lang.Enum<IconPosition>
com.grapecity.documents.excel.IconPosition
All Implemented Interfaces:
Serializable, Comparable<IconPosition>, Constable

public enum IconPosition extends Enum<IconPosition>
Specifies the position of an icon relative to a cell.

Use this enum with CellDecorationIcon to control whether a cell decoration icon appears on the left or right side of the cell, on either side of the cell text, or outside the cell boundary. This setting is used when applying decorations through IRange.setDecoration(ICellDecoration).


 worksheet.getRange("A1").setValue("Status");
 ICellDecorationIcon icon = new CellDecorationIcon(
     "data:image/svg+xml;base64,PHN2Zz4=",
     12, 12, IconPosition.LeftOfText);
 CellDecoration decoration = new CellDecoration(Arrays.asList(icon));
 worksheet.getRange("A1").setDecoration(decoration);
 
  • Enum Constant Details

    • Left

      public static final IconPosition Left
      Indicates that the icon is on the left side of the cell.
    • LeftOfText

      public static final IconPosition LeftOfText
      Indicates that the icon is on the left side of the text in the cell.
    • RightOfText

      public static final IconPosition RightOfText
      Indicates that the icon is on the right side of the text in the cell.
    • OutsideLeft

      public static final IconPosition OutsideLeft
      Indicates that the icon is on the left outside of the cell.
    • OutsideRight

      public static final IconPosition OutsideRight
      Indicates that the icon is on the right outside of the cell.
  • Method Details

    • values

      public static IconPosition[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static IconPosition valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
    • forValue

      public static IconPosition forValue(int value)