Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hslf.model
Class SimpleShape

    java.lang.Object
      org.apache.poi.hslf.model.Shape
          org.apache.poi.hslf.model.SimpleShape

Direct Known Subclasses:
  Line, Picture, TextShape

    public abstract class SimpleShape

extends Shape

An abstract simple (non-group) shape. This is the parent class for all primitive shapes like Line, Rectangle, etc.

Author:
  Yegor Kozlov

Field Summary
`static double` | `DEFAULT_LINE_WIDTH`

Fields inherited from class org.apache.poi.hslf.model.Shape
`EMU_PER_CENTIMETER, EMU_PER_INCH, EMU_PER_POINT, MASTER_DPI, PIXEL_DPI, POINT_DPI`

Method Summary
`void` | `draw(java.awt.Graphics2D graphics)`
`java.awt.Color` | `getFillColor()` The color used to fill this shape.
`boolean` | `getFlipHorizontal()` Whether the shape is horizontally flipped
`boolean` | `getFlipVertical()` Whether the shape is vertically flipped
`java.awt.Color` | `getLineColor()`
`int` | `getLineDashing()` Gets line dashing.
`int` | `getLineStyle()` Returns line style.
`double` | `getLineWidth()` Returns width of the line in in points
`java.awt.geom.Rectangle2D` | `getLogicalAnchor2D()`
`int` | `getRotation()` Rotation angle in degrees
`void` | `setFillColor(java.awt.Color color)` The color used to fill this shape.
`void` | `setHyperlink(Hyperlink link)`
`void` | `setLineColor(java.awt.Color color)` Sets the color of line
`void` | `setLineDashing(int pen)` Sets line dashing.
`void` | `setLineStyle(int style)` Sets line style.
`void` | `setLineWidth(double width)` Sets the width of line in in points
`void` | `setRotation(int theta)` Rotate this shape

Methods inherited from class org.apache.poi.hslf.model.Shape
`getAnchor, getAnchor2D, getEscherChild, getEscherProperty, getEscherProperty, getEscherProperty, getFill, getHyperlink, getOutline, getParent, getShapeId, getShapeName, getShapeType, getSheet, getSpContainer, moveTo, setAnchor, setEscherProperty, setEscherProperty, setShapeId, setShapeType, setSheet`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_LINE_WIDTH

    public static final double DEFAULT_LINE_WIDTH

See Also:
  Constant Field Values

Method Detail

### getLineWidth

    public double getLineWidth()

  Returns width of the line in in points

### setLineWidth

    public void setLineWidth(double width)

  Sets the width of line in in points

  Parameters:
    `width` - the width of line in in points

### setLineColor

    public void setLineColor(java.awt.Color color)

  Sets the color of line

  Parameters:
    `color` - new color of the line

### getLineColor

    public java.awt.Color getLineColor()

  Returns:
    color of the line. If color is not set returns `java.awt.Color.black`

### getLineDashing

    public int getLineDashing()

  Gets line dashing. One of the PEN_* constants defined in this class.

  Returns:
    dashing of the line.

### setLineDashing

    public void setLineDashing(int pen)

  Sets line dashing. One of the PEN_* constants defined in this class.

  Parameters:
    `pen` - new style of the line.

### setLineStyle

    public void setLineStyle(int style)

  Sets line style. One of the constants defined in this class.

  Parameters:
    `style` - new style of the line.

### getLineStyle

    public int getLineStyle()

  Returns line style. One of the constants defined in this class.

  Returns:
    style of the line.

### getFillColor

    public java.awt.Color getFillColor()

  The color used to fill this shape.

### setFillColor

    public void setFillColor(java.awt.Color color)

  The color used to fill this shape.

  Parameters:
    `color` - the background color

### getFlipHorizontal

    public boolean getFlipHorizontal()

  Whether the shape is horizontally flipped

  Returns:
    whether the shape is horizontally flipped

### getFlipVertical

    public boolean getFlipVertical()

  Whether the shape is vertically flipped

  Returns:
    whether the shape is vertically flipped

### getRotation

    public int getRotation()

  Rotation angle in degrees

  Returns:
    rotation angle in degrees

### setRotation

    public void setRotation(int theta)

  Rotate this shape

  Parameters:
    `theta` - the rotation angle in degrees

### getLogicalAnchor2D

    public java.awt.geom.Rectangle2D getLogicalAnchor2D()

  Overrides:
    `getLogicalAnchor2D` in class `Shape`
  Returns:
    'absolute' anchor of this shape relative to the parent sheet

### draw

    public void draw(java.awt.Graphics2D graphics)

  Overrides:
    `draw` in class `Shape`

### setHyperlink

    public void setHyperlink(Hyperlink link)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD