KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > poi > hssf > usermodel > HSSFSimpleShape


1 /* ====================================================================
2    Copyright 2004 Apache Software Foundation
3
4    Licensed under the Apache License, Version 2.0 (the "License");
5    you may not use this file except in compliance with the License.
6    You may obtain a copy of the License at
7
8        http://www.apache.org/licenses/LICENSE-2.0
9
10    Unless required by applicable law or agreed to in writing, software
11    distributed under the License is distributed on an "AS IS" BASIS,
12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    See the License for the specific language governing permissions and
14    limitations under the License.
15 ==================================================================== */

16
17 package org.apache.poi.hssf.usermodel;
18
19 /**
20  * Represents a simple shape such as a line, rectangle or oval.
21  *
22  * @author Glen Stampoultzis (glens at apache.org)
23  */

24 public class HSSFSimpleShape
25     extends HSSFShape
26 {
27     // The commented out ones haven't been tested yet or aren't supported
28
// by HSSFSimpleShape.
29

30     public final static short OBJECT_TYPE_LINE = 1;
31     public final static short OBJECT_TYPE_RECTANGLE = 2;
32     public final static short OBJECT_TYPE_OVAL = 3;
33 // public final static short OBJECT_TYPE_ARC = 4;
34
// public final static short OBJECT_TYPE_CHART = 5;
35
// public final static short OBJECT_TYPE_TEXT = 6;
36
// public final static short OBJECT_TYPE_BUTTON = 7;
37
// public final static short OBJECT_TYPE_PICTURE = 8;
38
// public final static short OBJECT_TYPE_POLYGON = 9;
39
// public final static short OBJECT_TYPE_CHECKBOX = 11;
40
// public final static short OBJECT_TYPE_OPTION_BUTTON = 12;
41
// public final static short OBJECT_TYPE_EDIT_BOX = 13;
42
// public final static short OBJECT_TYPE_LABEL = 14;
43
// public final static short OBJECT_TYPE_DIALOG_BOX = 15;
44
// public final static short OBJECT_TYPE_SPINNER = 16;
45
// public final static short OBJECT_TYPE_SCROLL_BAR = 17;
46
// public final static short OBJECT_TYPE_LIST_BOX = 18;
47
// public final static short OBJECT_TYPE_GROUP_BOX = 19;
48
// public final static short OBJECT_TYPE_COMBO_BOX = 20;
49
// public final static short OBJECT_TYPE_COMMENT = 25;
50
// public final static short OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING = 30;
51

52     int shapeType = OBJECT_TYPE_LINE;
53
54     HSSFSimpleShape( HSSFShape parent, HSSFAnchor anchor )
55     {
56         super( parent, anchor );
57     }
58
59     /**
60      * Gets the shape type.
61      * @return One of the OBJECT_TYPE_* constants.
62      *
63      * @see #OBJECT_TYPE_LINE
64      * @see #OBJECT_TYPE_OVAL
65      * @see #OBJECT_TYPE_RECTANGLE
66      */

67     public int getShapeType() { return shapeType; }
68
69     /**
70      * Sets the shape types.
71      *
72      * @param shapeType One of the OBJECT_TYPE_* constants.
73      *
74      * @see #OBJECT_TYPE_LINE
75      * @see #OBJECT_TYPE_OVAL
76      * @see #OBJECT_TYPE_RECTANGLE
77      */

78     public void setShapeType( int shapeType ){ this.shapeType = shapeType; }
79
80 }
81
Popular Tags