Package org.apache.poi.sl.usermodel
Interface SimpleShape<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
- All Superinterfaces:
IAdjustableShape
,PlaceableShape<S,
,P> Shape<S,
P>
- All Known Subinterfaces:
AutoShape<S,
,P> ConnectorShape<S,
,P> FreeformShape<S,
,P> Line<S,
,P> PictureShape<S,
,P> TableCell<S,
,P> TextBox<S,
,P> TextShape<S,
P>
- All Known Implementing Classes:
ActiveXShape
,HSLFAutoShape
,HSLFConnectorShape
,HSLFFreeformShape
,HSLFLine
,HSLFObjectShape
,HSLFPictureShape
,HSLFPlaceholder
,HSLFSimpleShape
,HSLFTableCell
,HSLFTextBox
,HSLFTextShape
,MovieShape
,Polygon
,XSLFAutoShape
,XSLFBackground
,XSLFConnectorShape
,XSLFFreeformShape
,XSLFPictureShape
,XSLFSimpleShape
,XSLFTableCell
,XSLFTextBox
,XSLFTextShape
public interface SimpleShape<S extends Shape<S,P>,P extends TextParagraph<S,P,? extends TextRun>>
extends Shape<S,P>, IAdjustableShape, PlaceableShape<S,P>
-
Method Summary
Modifier and TypeMethodDescriptionCreates a hyperlink and asigns it to this shape.Returns the solid color fill.Returns the hyperlink assigned to this shapeboolean
Checks if the shape is a placeholder.void
setFillColor
(Color color) Specifies a solid color fill.void
setPlaceholder
(Placeholder placeholder) Specifies that the corresponding shape should be represented by the generating application as a placeholder.void
setShapeType
(ShapeType type) void
setStrokeStyle
(Object... styles) Sets the line attributes.Methods inherited from interface org.apache.poi.sl.draw.geom.IAdjustableShape
getAdjustValue
Methods inherited from interface org.apache.poi.sl.usermodel.PlaceableShape
getAnchor, getFlipHorizontal, getFlipVertical, getParent, getRotation, getSheet, setAnchor, setFlipHorizontal, setFlipVertical, setRotation
Methods inherited from interface org.apache.poi.sl.usermodel.Shape
draw, getAnchor, getParent, getShapeId, getShapeName, getSheet
-
Method Details
-
getFillStyle
FillStyle getFillStyle() -
getLineDecoration
LineDecoration getLineDecoration() -
getStrokeStyle
StrokeStyle getStrokeStyle() -
setStrokeStyle
Sets the line attributes. Possible attributes are Double (width), LineCap, LineDash, LineCompound, Color (implementations of PaintStyle aren't yet supported ...) If no styles are given, the line will be hidden- Parameters:
styles
- the line attributes
-
getGeometry
CustomGeometry getGeometry() -
getShapeType
ShapeType getShapeType() -
setShapeType
-
getPlaceholder
Placeholder getPlaceholder()- Returns:
- the placeholder or null if none is assigned
- See Also:
-
setPlaceholder
Specifies that the corresponding shape should be represented by the generating application as a placeholder. When a shape is considered a placeholder by the generating application it can have special properties to alert the user that they may enter content into the shape.- Parameters:
placeholder
- the placeholder or null to remove the reference to the placeholder
-
getPlaceholderDetails
PlaceholderDetails getPlaceholderDetails()- Returns:
- an accessor for placeholder details
- Since:
- POI 4.0.0
-
isPlaceholder
boolean isPlaceholder()Checks if the shape is a placeholder. (placeholders aren't normal shapes, they are visible only in the Edit Master mode)- Returns:
true
if the shape is a placeholder- Since:
- POI 4.0.0
-
getShadow
-
getFillColor
Color getFillColor()Returns the solid color fill.- Returns:
- solid fill color of null if not set or fill color is not solid (pattern or gradient)
-
setFillColor
Specifies a solid color fill. The shape is filled entirely with the specified color.- Parameters:
color
- the solid color fill. The value ofnull
unsets the solid fill attribute from the underlying implementation
-
getHyperlink
Returns the hyperlink assigned to this shape- Returns:
- the hyperlink assigned to this shape
or
null
if not found. - Since:
- POI 3.14-Beta1
-
createHyperlink
Creates a hyperlink and asigns it to this shape. If the shape has already a hyperlink assigned, return it instead- Returns:
- the hyperlink assigned to this shape
- Since:
- POI 3.14-Beta1
-