接口 IStyle


public interface IStyle
Represents a style description for a range.
  • 方法概要

    修饰符和类型
    方法
    说明
    boolean
    Deletes the object.
    void
    Generates the named style from the json string.
    boolean
    Gets whether text is automatically indented when the text alignment in a cell is set to equal distribution either horizontally or vertically.
    Returns the IBorders collection that represents the borders of astyle.
    boolean
    Gets whether the style is a built-in style.
    Returns the IFont object that represents the font of the specifiedobject.
    boolean
    Sets whether the formula is hidden when the worksheet is protected.
    Gets the horizontal alignment for the specified object.
    boolean
    Gets whether style includes the AddIndent, HorizontalAlignment, VerticalAlignment, WrapText, and Orientation properties.
    boolean
    Gets whether the style includes the Color, ColorIndex, LineStyle, and Weight border properties.
    boolean
    Gets whether the style includes the Bold, Color, ColorIndex, FontStyle, Italic, Name, OutlineFont, Shadow, Size, Strikethrough, Subscript, Superscript, and Underline font properties.
    boolean
    Gets whether the style includes the NumberFormat property.
    boolean
    Gets whether the style includes the Color, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties.
    boolean
    Gets whether the style includes the FormulaHidden and Locked properties.
    int
    Gets the indent level for the style.
    Returns an IInterior object that represents the interior of thespecified object.
    boolean
    Gets whether the object is locked; False if the object can be modified when the sheet is protected.
    Returns the name of the object.
    Gets the format code for the object as a string in the language of the user.
    int
    Gets the text orientation.
    boolean
    Gets whether the text automatically shrinks to fit in the available column width.
    Gets the vertical alignment of the specified object.
    boolean
    Gets whether to wrap the text.
    void
    setAddIndent(boolean value)
    Sets whether text is automatically indented when the text alignment in a cell is set to equal distribution either horizontally or vertically.
    void
    setFormulaHidden(boolean value)
    Gets whether the formula is hidden when the worksheet is protected.
    void
    Sets the horizontal alignment for the specified object.
    void
    setIncludeAlignment(boolean value)
    Sets whether style includes the AddIndent, HorizontalAlignment, VerticalAlignment, WrapText, and Orientation properties.
    void
    setIncludeBorder(boolean value)
    Sets whether the style includes the Color, ColorIndex, LineStyle, and Weight border properties.
    void
    setIncludeFont(boolean value)
    Sets whether the style includes the Bold, Color,ColorIndex, FontStyle,Italic, Name,OutlineFont, Shadow,Size, Strikethrough,Subscript, Superscript, and Underline font properties.
    void
    setIncludeNumber(boolean value)
    Sets whether the style includes the NumberFormat property.
    void
    setIncludePatterns(boolean value)
    Sets whether the style includes the Color, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties.
    void
    setIncludeProtection(boolean value)
    Sets whether the style includes the FormulaHidden and Locked properties.
    void
    setIndentLevel(int value)
    Sets the indent level for the style.
    void
    setLocked(boolean value)
    Sets whether the object is locked; False if the object can be modified when the sheet is protected.
    void
    Sets the format code for the object as a string in the language of the user.
    void
    setOrientation(int value)
    Sets the text orientation.
    void
    setShrinkToFit(boolean value)
    Sets whether the text automatically shrinks to fit in the available column width.
    void
    Sets the vertical alignment of the specified object.
    void
    setWrapText(boolean value)
    Sets whether to wrap the text.
    Generates a json string from the named style.
  • 方法详细资料

    • getAddIndent

      boolean getAddIndent()
      Gets whether text is automatically indented when the text alignment in a cell is set to equal distribution either horizontally or vertically.
    • setAddIndent

      void setAddIndent(boolean value)
      Sets whether text is automatically indented when the text alignment in a cell is set to equal distribution either horizontally or vertically.
    • getBorders

      IBorders getBorders()
      Returns the IBorders collection that represents the borders of astyle.
    • getBuiltIn

      boolean getBuiltIn()
      Gets whether the style is a built-in style.
    • getFont

      IFont getFont()
      Returns the IFont object that represents the font of the specifiedobject.
    • getFormulaHidden

      boolean getFormulaHidden()
      Sets whether the formula is hidden when the worksheet is protected.
    • setFormulaHidden

      void setFormulaHidden(boolean value)
      Gets whether the formula is hidden when the worksheet is protected.
    • getHorizontalAlignment

      HorizontalAlignment getHorizontalAlignment()
      Gets the horizontal alignment for the specified object.
    • setHorizontalAlignment

      void setHorizontalAlignment(HorizontalAlignment value)
      Sets the horizontal alignment for the specified object.
    • getIncludeAlignment

      boolean getIncludeAlignment()
      Gets whether style includes the AddIndent, HorizontalAlignment, VerticalAlignment, WrapText, and Orientation properties.
    • setIncludeAlignment

      void setIncludeAlignment(boolean value)
      Sets whether style includes the AddIndent, HorizontalAlignment, VerticalAlignment, WrapText, and Orientation properties.
    • getIncludeBorder

      boolean getIncludeBorder()
      Gets whether the style includes the Color, ColorIndex, LineStyle, and Weight border properties.
    • setIncludeBorder

      void setIncludeBorder(boolean value)
      Sets whether the style includes the Color, ColorIndex, LineStyle, and Weight border properties.
    • getIncludeFont

      boolean getIncludeFont()
      Gets whether the style includes the Bold, Color, ColorIndex, FontStyle, Italic, Name, OutlineFont, Shadow, Size, Strikethrough, Subscript, Superscript, and Underline font properties.
    • setIncludeFont

      void setIncludeFont(boolean value)
      Sets whether the style includes the Bold, Color,ColorIndex, FontStyle,Italic, Name,OutlineFont, Shadow,Size, Strikethrough,Subscript, Superscript, and Underline font properties.
    • getIncludeNumber

      boolean getIncludeNumber()
      Gets whether the style includes the NumberFormat property.
    • setIncludeNumber

      void setIncludeNumber(boolean value)
      Sets whether the style includes the NumberFormat property.
    • getIncludePatterns

      boolean getIncludePatterns()
      Gets whether the style includes the Color, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties.
    • setIncludePatterns

      void setIncludePatterns(boolean value)
      Sets whether the style includes the Color, InvertIfNegative, Pattern, PatternColor, and PatternColorIndex interior properties.
    • getIncludeProtection

      boolean getIncludeProtection()
      Gets whether the style includes the FormulaHidden and Locked properties.
    • setIncludeProtection

      void setIncludeProtection(boolean value)
      Sets whether the style includes the FormulaHidden and Locked properties.
    • getIndentLevel

      int getIndentLevel()
      Gets the indent level for the style.
    • setIndentLevel

      void setIndentLevel(int value)
      Sets the indent level for the style.
    • getInterior

      IInterior getInterior()
      Returns an IInterior object that represents the interior of thespecified object.
    • getLocked

      boolean getLocked()
      Gets whether the object is locked; False if the object can be modified when the sheet is protected.
    • setLocked

      void setLocked(boolean value)
      Sets whether the object is locked; False if the object can be modified when the sheet is protected.
    • getName

      String getName()
      Returns the name of the object.
    • getNumberFormat

      String getNumberFormat()
      Gets the format code for the object as a string in the language of the user.
    • setNumberFormat

      void setNumberFormat(String value)
      Sets the format code for the object as a string in the language of the user.
    • getOrientation

      int getOrientation()
      Gets the text orientation. Can be an integer value from –90 to 90 degrees.
    • setOrientation

      void setOrientation(int value)
      Sets the text orientation. Can be an integer value from –90 to 90 degrees.
    • getShrinkToFit

      boolean getShrinkToFit()
      Gets whether the text automatically shrinks to fit in the available column width.
    • setShrinkToFit

      void setShrinkToFit(boolean value)
      Sets whether the text automatically shrinks to fit in the available column width.
    • getVerticalAlignment

      VerticalAlignment getVerticalAlignment()
      Gets the vertical alignment of the specified object.
    • setVerticalAlignment

      void setVerticalAlignment(VerticalAlignment value)
      Sets the vertical alignment of the specified object.
    • getWrapText

      boolean getWrapText()
      Gets whether to wrap the text.
    • setWrapText

      void setWrapText(boolean value)
      Sets whether to wrap the text.
    • delete

      boolean delete()
      Deletes the object.
      返回:
      whether successfully deleted.
    • fromJson

      void fromJson(String json)
      Generates the named style from the json string.
      参数:
      json - the json string
    • toJson

      String toJson()
      Generates a json string from the named style.
      返回:
      the json string contains a named style