com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class TextFrameFormat

    • Constructor Detail

      • TextFrameFormat

        public TextFrameFormat()

        Initializes a new instance of TextFrameFormat class.

    • Method Detail

      • getColumnCount

        public final int getColumnCount()

        Returns or sets number of columns in the text area. This value must be a positive number. Otherwise, the value will be set to zero. Value 0 means undefined value. Read/write int.

        Specified by:
        getColumnCount in interface ITextFrameFormat
      • setColumnCount

        public final void setColumnCount(int value)

        Returns or sets number of columns in the text area. This value must be a positive number. Otherwise, the value will be set to zero. Value 0 means undefined value. Read/write int.

        Specified by:
        setColumnCount in interface ITextFrameFormat
      • getColumnSpacing

        public final double getColumnSpacing()

        Returns or sets the space between text columns in the text area (in points). This should only apply when there is more than 1 column present. This value must be a positive number. Otherwise, the value will be set to zero. Read/write double.

        Specified by:
        getColumnSpacing in interface ITextFrameFormat
      • setColumnSpacing

        public final void setColumnSpacing(double value)

        Returns or sets the space between text columns in the text area (in points). This should only apply when there is more than 1 column present. This value must be a positive number. Otherwise, the value will be set to zero. Read/write double.

        Specified by:
        setColumnSpacing in interface ITextFrameFormat
      • getRotationAngle

        public final float getRotationAngle()

        Specifies custom the rotation that is being applied to the text within the bounding box. If it not specified, the rotation of the accompanying shape is used. If it is specified, then this is applied independently from the shape. That is the shape can have a rotation applied in addition to the text itself having a rotation applied to it. The resulted value of visual text rotation summarized from this property and predefined vertical type in property TextVerticalType. Read/write float.


         Consider the case where a shape has a rotation of 90 degrees clockwise applied to it. 
         In addition to this, the text body itself has a rotation of -90 degrees 
         counter-clockwise applied to it. Then the resulting shape would appear to
         be rotated but the text within it would appear as though it had not been rotated at all.
         
        Specified by:
        getRotationAngle in interface IChartTextBlockFormat
        Specified by:
        getRotationAngle in interface ITextFrameFormat
      • setRotationAngle

        public final void setRotationAngle(float value)

        Specifies custom the rotation that is being applied to the text within the bounding box. If it not specified, the rotation of the accompanying shape is used. If it is specified, then this is applied independently from the shape. That is the shape can have a rotation applied in addition to the text itself having a rotation applied to it. The resulted value of visual text rotation summarized from this property and predefined vertical type in property TextVerticalType. Read/write float.


         Consider the case where a shape has a rotation of 90 degrees clockwise applied to it. 
         In addition to this, the text body itself has a rotation of -90 degrees 
         counter-clockwise applied to it. Then the resulting shape would appear to
         be rotated but the text within it would appear as though it had not been rotated at all.
         
        Specified by:
        setRotationAngle in interface IChartTextBlockFormat
        Specified by:
        setRotationAngle in interface ITextFrameFormat
      • getEffective

        public final ITextFrameFormatEffectiveData getEffective()

        Gets effective text frame formatting data with the inheritance applied.


         This example demonstrates getting some of effective text frame formatting properties.
         
         Presentation pres = new Presentation("MyPresentation.pptx");
         try
         {
             IAutoShape shape = (IAutoShape)pres.getSlides().get_Item(0).getShapes().get_Item(0);
             ITextFrameFormatEffectiveData effectiveTextFrameFormat = shape.getTextFrame().getTextFrameFormat().getEffective();
            
             System.out.println("Anchoring type: " + effectiveTextFrameFormat.getAnchoringType());
             System.out.println("Autofit type: " + effectiveTextFrameFormat.getAutofitType());
             System.out.println("Text vertical type: " + effectiveTextFrameFormat.getTextVerticalType());
             System.out.println("Margins");
             System.out.println("   Left: " + effectiveTextFrameFormat.getMarginLeft());
             System.out.println("   Top: " + effectiveTextFrameFormat.getMarginTop());
             System.out.println("   Right: " + effectiveTextFrameFormat.getMarginRight());
             System.out.println("   Bottom: " + effectiveTextFrameFormat.getMarginBottom());
         } finally {
             if (pres != null) pres.dispose();
         }
         
        Specified by:
        getEffective in interface ITextFrameFormat
        Returns:
        A ITextFrameFormatEffectiveData.