org.apache.poi.hssf.usermodel
Class HSSFShape

java.lang.Object
  extended by org.apache.poi.hssf.usermodel.HSSFShape
Direct Known Subclasses:
HSSFPolygon, HSSFShapeGroup, HSSFSimpleShape

public abstract class HSSFShape
extends java.lang.Object

An abstract shape.

Author:
Glen Stampoultzis (glens at apache.org)

Field Summary
static int LINESTYLE_DASHDOTDOTSYS
           
static int LINESTYLE_DASHDOTGEL
           
static int LINESTYLE_DASHDOTSYS
           
static int LINESTYLE_DASHGEL
           
static int LINESTYLE_DASHSYS
           
static int LINESTYLE_DOTGEL
           
static int LINESTYLE_DOTSYS
           
static int LINESTYLE_LONGDASHDOTDOTGEL
           
static int LINESTYLE_LONGDASHDOTGEL
           
static int LINESTYLE_LONGDASHGEL
           
static int LINESTYLE_NONE
           
static int LINESTYLE_SOLID
           
static int LINEWIDTH_DEFAULT
           
static int LINEWIDTH_ONE_PT
           
 
Method Summary
 int countOfAllChildren()
          Count of all children and their children's children.
 HSSFAnchor getAnchor()
           
 int getFillColor()
          The color used to fill this shape.
 int getLineStyle()
           
 int getLineStyleColor()
          The color applied to the lines of this shape.
 int getLineWidth()
           
 HSSFShape getParent()
          Gets the parent shape.
 boolean isNoFill()
           
 void setAnchor(HSSFAnchor anchor)
          Sets a particular anchor.
 void setFillColor(int fillColor)
          The color used to fill this shape.
 void setFillColor(int red, int green, int blue)
          The color used to fill this shape.
 void setLineStyle(int lineStyle)
          Sets the line style.
 void setLineStyleColor(int lineStyleColor)
          The color applied to the lines of this shape.
 void setLineStyleColor(int red, int green, int blue)
          The color applied to the lines of this shape.
 void setLineWidth(int lineWidth)
          Sets the width of the line.
 void setNoFill(boolean noFill)
          Sets whether this shape is filled or transparent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINEWIDTH_ONE_PT

public static final int LINEWIDTH_ONE_PT
See Also:
Constant Field Values

LINEWIDTH_DEFAULT

public static final int LINEWIDTH_DEFAULT
See Also:
Constant Field Values

LINESTYLE_SOLID

public static final int LINESTYLE_SOLID
See Also:
Constant Field Values

LINESTYLE_DASHSYS

public static final int LINESTYLE_DASHSYS
See Also:
Constant Field Values

LINESTYLE_DOTSYS

public static final int LINESTYLE_DOTSYS
See Also:
Constant Field Values

LINESTYLE_DASHDOTSYS

public static final int LINESTYLE_DASHDOTSYS
See Also:
Constant Field Values

LINESTYLE_DASHDOTDOTSYS

public static final int LINESTYLE_DASHDOTDOTSYS
See Also:
Constant Field Values

LINESTYLE_DOTGEL

public static final int LINESTYLE_DOTGEL
See Also:
Constant Field Values

LINESTYLE_DASHGEL

public static final int LINESTYLE_DASHGEL
See Also:
Constant Field Values

LINESTYLE_LONGDASHGEL

public static final int LINESTYLE_LONGDASHGEL
See Also:
Constant Field Values

LINESTYLE_DASHDOTGEL

public static final int LINESTYLE_DASHDOTGEL
See Also:
Constant Field Values

LINESTYLE_LONGDASHDOTGEL

public static final int LINESTYLE_LONGDASHDOTGEL
See Also:
Constant Field Values

LINESTYLE_LONGDASHDOTDOTGEL

public static final int LINESTYLE_LONGDASHDOTDOTGEL
See Also:
Constant Field Values

LINESTYLE_NONE

public static final int LINESTYLE_NONE
See Also:
Constant Field Values
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)
Sets whether this shape is filled or transparent.


countOfAllChildren

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



Copyright 2012 The Apache Software Foundation or its licensors, as applicable.