com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class MathDelimiter

  • All Implemented Interfaces:
    IMathDelimiter, IMathElement


    public final class MathDelimiter
    extends MathElementBase
    implements IMathDelimiter

    Specifies the delimiter object, consisting of opening and closing characters (such as parentheses, braces, brackets, and vertical bars), and one or more mathematical elements inside, separated by a specified character. Examples: (𝑥2); [𝑥2|𝑦2]


    Example:
     
     IMathElement element = new MathematicalText("x");
     MathDelimiter delimiter = new MathDelimiter(element);
     
    • Constructor Detail

      • MathDelimiter

        public MathDelimiter(IMathElement element)

        Initializes MathDelimiter with the specified element as single base argument


        Example:
         
         IMathElement element = new MathematicalText("x");
         MathDelimiter delimiter = new MathDelimiter(element);
         
        Parameters:
        element - The base element to which the delimiter is applied. Can be null.
        Throws:
        com.aspose.ms.System.InvalidOperationException - Throws then element is a container for another elements, such as MathBlock. In this case, you need to call a different constructor with IEnumerable argument.
    • Method Detail

      • getArguments

        public final IMathElementCollection getArguments()

        One or more mathematical elements separated by delimiter characters


        Example:
         
         IMathDelimiter delimiter = new MathematicalText("x").Jjin("y").enclose();
         IMathElementCollection arguments = delimiter.getArguments();
         
        Specified by:
        getArguments in interface IMathDelimiter
      • getBeginningCharacter

        public final char getBeginningCharacter()

        Delimiter Beginning Character specifies the beginning, or opening, delimiter character. Mathematical delimiters are enclosing characters such as parentheses, brackets, and braces. The default: '('.


        Example:
         
         IMathDelimiter delimiter = new MathematicalText("x").join("y").enclose();
         delimiter.setBeginningCharacter('[');
         
        Specified by:
        getBeginningCharacter in interface IMathDelimiter
      • setBeginningCharacter

        public final void setBeginningCharacter(char value)

        Delimiter Beginning Character specifies the beginning, or opening, delimiter character. Mathematical delimiters are enclosing characters such as parentheses, brackets, and braces. The default: '('.


        Example:
         
         IMathDelimiter delimiter = new MathematicalText("x").join("y").enclose();
         delimiter.setBeginningCharacter('[');
         
        Specified by:
        setBeginningCharacter in interface IMathDelimiter
      • getSeparatorCharacter

        public final char getSeparatorCharacter()

        Delimiter Separator Character specifies the character that separates arguments in the delimiter object. The default: '|'.


        Example:
         
         IMathDelimiter delimiter = new MathematicalText("x").join("y").enclose();
         delimiter.setSeparatorCharacter('$');
         
        Specified by:
        getSeparatorCharacter in interface IMathDelimiter
      • setSeparatorCharacter

        public final void setSeparatorCharacter(char value)

        Delimiter Separator Character specifies the character that separates arguments in the delimiter object. The default: '|'.


        Example:
         
         IMathDelimiter delimiter = new MathematicalText("x").join("y").enclose();
         delimiter.setSeparatorCharacter('$');
         
        Specified by:
        setSeparatorCharacter in interface IMathDelimiter
      • getEndingCharacter

        public final char getEndingCharacter()

        Delimiter Ending Character specifies the ending, or closing, delimiter character. Mathematical delimiters are enclosing characters such as parentheses, brackets, and braces. The default: ')'.


        Example:
         
         IMathDelimiter delimiter = new MathematicalText("x").join("y").enclose();
         delimiter.setEndingCharacter(']');
         
        Specified by:
        getEndingCharacter in interface IMathDelimiter
      • setEndingCharacter

        public final void setEndingCharacter(char value)

        Delimiter Ending Character specifies the ending, or closing, delimiter character. Mathematical delimiters are enclosing characters such as parentheses, brackets, and braces. The default: ')'.


        Example:
         
         IMathDelimiter delimiter = new MathematicalText("x").join("y").enclose();
         delimiter.setEndingCharacter(']');
         
        Specified by:
        setEndingCharacter in interface IMathDelimiter
      • getGrowToMatchOperandHeight

        public final boolean getGrowToMatchOperandHeight()

        Specifies the growth of BeginningCharacter, SeparatorCharacter, EndingCharacter When true, the delimiters grows vertically to match its operand height. The default value is true


        Example:
         
         IMathDelimiter delimiter = new MathematicalText("x").divide("y").enclose();
         delimiter.setGrowToMatchOperandHeight(false);
         
        Specified by:
        getGrowToMatchOperandHeight in interface IMathDelimiter
      • setGrowToMatchOperandHeight

        public final void setGrowToMatchOperandHeight(boolean value)

        Specifies the growth of BeginningCharacter, SeparatorCharacter, EndingCharacter When true, the delimiters grows vertically to match its operand height. The default value is true


        Example:
         
         IMathDelimiter delimiter = new MathematicalText("x").divide("y").enclose();
         delimiter.setGrowToMatchOperandHeight(false);
         
        Specified by:
        setGrowToMatchOperandHeight in interface IMathDelimiter
      • getDelimiterShape

        public final int getDelimiterShape()

        Specifies the shape of delimiters in the delimiter object. When is MathDelimiterShape.Сentered, delimiters are centered around the math axis of the mathematical text and still be made to fit the entire height of their contents. When is MathDelimiterShape.Match, their height and shape are altered to exactly match their contents.


        Example:
         
         IMathDelimiter delimiter = new MathematicalText("x").divide("y").enclose();
         delimiter.setDelimiterShape(MathDelimiterShape.Match);
         
        Specified by:
        getDelimiterShape in interface IMathDelimiter
      • setDelimiterShape

        public final void setDelimiterShape(int value)

        Specifies the shape of delimiters in the delimiter object. When is MathDelimiterShape.Сentered, delimiters are centered around the math axis of the mathematical text and still be made to fit the entire height of their contents. When is MathDelimiterShape.Match, their height and shape are altered to exactly match their contents.


        Example:
         
         IMathDelimiter delimiter = new MathematicalText("x").divide("y").enclose();
         delimiter.setDelimiterShape(MathDelimiterShape.Match);
         
        Specified by:
        setDelimiterShape in interface IMathDelimiter
      • delimit

        public final IMathDelimiter delimit(char separatorCharacter)

        Delimits arguments using the specified delimiter character

        Specified by:
        delimit in interface IMathDelimiter
        Parameters:
        separatorCharacter - delimiter character
        Returns:
        This object after applying the delimiter character
      • enclose

        public IMathDelimiter enclose(char beginningCharacter,
                                      char endingCharacter)

        Encloses a math element in specified characters such as parenthesis or another characters as framing


        Example:
         
         IMathDelimiter innerDelimiter = new MathematicalText("x").join(",y").enclose('{', '}');
         IMathDelimiter outerDelimiter = innerDelimiter.enclose('[', ']');
         
        Specified by:
        enclose in interface IMathElement
        Overrides:
        enclose in class MathElementBase
        Parameters:
        beginningCharacter - Beginning character (usually left bracket)
        endingCharacter - Ending character (usually right bracket)
        Returns:
        If beginningCharacter and endingCharacter are null, corresponding properties are assigned values only and no new object is created (returns this instance). Otherwise, returns new math element of type Delimiter which includes specified characters as framing and this instance of MathDelimiter framed inside.