示例#1
0
        /**
         * Constructs a cell comment.
         *
         * @param anchor    the client anchor describes how this comment is attached
         *                  to the sheet.
         * @return      the newly created comment.
         */

        public HSSFComment CreateComment(HSSFAnchor anchor)
        {
            HSSFComment shape = new HSSFComment(null, anchor);

            AddShape(shape);
            OnCreate(shape);
            return(shape);
        }
示例#2
0
        /**
         * YK: used to create autofilters
         *
         * @see org.apache.poi.hssf.usermodel.HSSFSheet#setAutoFilter(int, int, int, int)
         */

        public HSSFSimpleShape CreateComboBox(HSSFAnchor anchor)
        {
            HSSFCombobox shape = new HSSFCombobox(null, anchor);

            AddShape(shape);
            OnCreate(shape);
            return(shape);
        }
示例#3
0
        /// <summary>
        /// Constructs a picture object.
        /// </summary>
        /// <param name="parent">The parent.</param>
        /// <param name="anchor">The anchor.</param>
        public HSSFPicture(HSSFShape parent, HSSFAnchor anchor)
            : base(parent, anchor)
        {
            base.ShapeType = (OBJECT_TYPE_PICTURE);
            CommonObjectDataSubRecord cod = (CommonObjectDataSubRecord)GetObjRecord().SubRecords[0];

            cod.ObjectType = CommonObjectType.Picture;
        }
示例#4
0
 /// <summary>
 /// Create a new shape with the specified parent and anchor.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="anchor">The anchor.</param>
 public HSSFShape(HSSFShape parent, HSSFAnchor anchor)
 {
     this.parent           = parent;
     this.anchor           = anchor;
     this._escherContainer = CreateSpContainer();
     _optRecord            = (EscherOptRecord)_escherContainer.GetChildById(EscherOptRecord.RECORD_ID);
     _objRecord            = CreateObjRecord();
 }
示例#5
0
        public HSSFCombobox(HSSFShape parent, HSSFAnchor anchor)
            : base(parent, anchor)
        {
            base.ShapeType = (OBJECT_TYPE_COMBO_BOX);
            CommonObjectDataSubRecord cod = (CommonObjectDataSubRecord)GetObjRecord().SubRecords[0];

            cod.ObjectType = CommonObjectType.ComboBox;
        }
示例#6
0
        /// <summary>
        /// Construct a new comment with the given parent and anchor.
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="anchor">defines position of this anchor in the sheet</param>
        public HSSFComment(HSSFShape parent, HSSFAnchor anchor)
            : base(parent, anchor)
        {
            _note = CreateNoteRecord();

            //default color for comments
            FillColor = 0x08000050;

            //by default comments are hidden
            Visible = false;

            Author = "";
            CommonObjectDataSubRecord cod = (CommonObjectDataSubRecord)GetObjRecord().SubRecords[0];

            cod.ObjectType = CommonObjectType.Comment;
        }
示例#7
0
 public HSSFPolygon(HSSFShape parent, HSSFAnchor anchor)
     : base(parent, anchor)
 {
 }
示例#8
0
 public HSSFShapeGroup(HSSFShape parent, HSSFAnchor anchor)
     : base(parent, anchor)
 {
     _spgrRecord = (EscherSpgrRecord)((EscherContainerRecord)GetEscherContainer().GetChild(0)).GetChildById(EscherSpgrRecord.RECORD_ID);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HSSFSimpleShape"/> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="anchor">The anchor.</param>
 public HSSFSimpleShape(HSSFShape parent, HSSFAnchor anchor)
     : base(parent, anchor)
 {
     _textObjectRecord = CreateTextObjRecord();
 }