Documentation of 'org.apache.poi.hssf.usermodel.HSSFShape' Java class
HSSFShape
org.apache.poi.hssf.usermodel

Class HSSFShape

  • Direct Known Subclasses:
    HSSFShapeGroup, HSSFSimpleShape


    public abstract class HSSFShape
    extends java.lang.Object
    An abstract shape. Note: Microsoft Excel seems to sometimes disallow higher y1 than y2 or higher x1 than x2 in the anchor, you might need to reverse them and draw shapes vertically or horizontally flipped via setFlipVertical() or setFlipHorizontally().
    • Constructor Detail

      • HSSFShape

        public HSSFShape(EscherContainerRecord spContainer,
                         ObjRecord objRecord)
        creates shapes from existing file
        Parameters:
        spContainer -
        objRecord -
      • HSSFShape

        public HSSFShape(HSSFShape parent,
                         HSSFAnchor anchor)
        Create a new shape with the specified parent and anchor.
    • Method Detail

      • getParent

        public HSSFShape getParent()
        Gets the parent shape.
      • getAnchor

        public HSSFAnchor getAnchor()
        Returns:
        the anchor that is used by this shape.
      • setAnchor

        public void setAnchor(HSSFAnchor anchor)
        Sets a particular anchor. A top-level shape must have an anchor of HSSFClientAnchor. A child anchor must have an anchor of HSSFChildAnchor
        Parameters:
        anchor - the anchor to use.
        Throws:
        java.lang.IllegalArgumentException - when the wrong anchor is used for this particular shape.
        See Also:
        HSSFChildAnchor, HSSFClientAnchor
      • getLineStyleColor

        public int getLineStyleColor()
        The color applied to the lines of this shape.
      • setLineStyleColor

        public void setLineStyleColor(int lineStyleColor)
        The color applied to the lines of this shape.
      • setLineStyleColor

        public void setLineStyleColor(int red,
                                      int green,
                                      int blue)
        The color applied to the lines of this shape.
      • getFillColor

        public int getFillColor()
        The color used to fill this shape.
      • setFillColor

        public void setFillColor(int fillColor)
        The color used to fill this shape.
      • setFillColor

        public void setFillColor(int red,
                                 int green,
                                 int blue)
        The color used to fill this shape.
      • getLineWidth

        public int getLineWidth()
        Returns:
        returns with width of the line in EMUs. 12700 = 1 pt.
      • setLineWidth

        public void setLineWidth(int lineWidth)
        Sets the width of the line. 12700 = 1 pt.
        Parameters:
        lineWidth - width in EMU's. 12700EMU's = 1 pt
        See Also:
        LINEWIDTH_ONE_PT
      • getLineStyle

        public int getLineStyle()
        Returns:
        One of the constants in LINESTYLE_*
      • setLineStyle

        public void setLineStyle(int lineStyle)
        Sets the line style.
        Parameters:
        lineStyle - One of the constants in LINESTYLE_*
      • isNoFill

        public boolean isNoFill()
        Returns:
        true if this shape is not filled with a color.
      • setNoFill

        public void setNoFill(boolean noFill)
        Parameters:
        noFill - sets whether this shape is filled or transparent.
      • setFlipVertical

        public void setFlipVertical(boolean value)
        Parameters:
        value - specifies whether this shape is vertically flipped.
      • setFlipHorizontal

        public void setFlipHorizontal(boolean value)
        Parameters:
        value - specifies whether this shape is horizontally flipped.
      • isFlipVertical

        public boolean isFlipVertical()
        Returns:
        whether this shape is vertically flipped.
      • isFlipHorizontal

        public boolean isFlipHorizontal()
        Returns:
        whether this shape is horizontally flipped.
      • getRotationDegree

        public int getRotationDegree()
        Returns:
        the rotation, in degrees, that is applied to a shape.
      • setRotationDegree

        public void setRotationDegree(short value)
        specifies the rotation, in degrees, that is applied to a shape. Positive values specify rotation in the clockwise direction. Negative values specify rotation in the counterclockwise direction. Rotation occurs around the center of the shape. The default value for this property is 0x00000000
        Parameters:
        value -
      • countOfAllChildren

        public int countOfAllChildren()
        Count of all children and their children's children.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.