@Beta public abstract class XSLFShape extends java.lang.Object implements Shape<XSLFShape,XSLFTextParagraph>
Modifier and Type | Class and Description |
---|---|
static interface |
XSLFShape.ReparseFactory<T extends org.apache.xmlbeans.XmlObject> |
Modifier | Constructor and Description |
---|---|
protected |
XSLFShape(org.apache.xmlbeans.XmlObject shape, XSLFSheet sheet) |
Modifier and Type | Method and Description |
---|---|
void |
draw(java.awt.Graphics2D graphics, java.awt.geom.Rectangle2D bounds)
Convenience method to draw a single shape
(绘制单个形状的便捷方法)
|
boolean |
fetchShapeProperty(PropertyFetcher<?> visitor)
Walk up the inheritance tree and fetch shape properties.
(走上继承树并获取形状属性。)
|
protected org.openxmlformats.schemas.presentationml.x2006.main.CTBackgroundProperties |
getBgPr() |
protected org.openxmlformats.schemas.drawingml.x2006.main.CTStyleMatrixReference |
getBgRef() |
protected <T extends org.apache.xmlbeans.XmlObject> |
getChild(java.lang.Class<T> childClass, java.lang.String namespace, java.lang.String nodename)
Return direct child objects of this shape
(返回此形状的直接子对象)
|
protected org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps |
getCNvPr() |
protected PaintStyle |
getFillPaint() |
protected org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapeProperties |
getGrpSpPr() |
XSLFShapeContainer |
getParent() |
Placeholder |
getPlaceholder() |
XSLFPlaceholderDetails |
getPlaceholderDetails() |
int |
getShapeId()
Returns a unique identifier for this shape within the current slide.
(返回当前幻灯片中此形状的唯一标识符。)
|
java.lang.String |
getShapeName() |
protected org.apache.xmlbeans.XmlObject |
getShapeProperties()
Return the shape specific (visual) properties
(返回特定于形状的(视觉)属性)
|
XSLFSheet |
getSheet() |
protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeStyle |
getSpStyle() |
org.apache.xmlbeans.XmlObject |
getXmlObject() |
boolean |
isPlaceholder() |
protected PaintStyle |
selectPaint(org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties blipFill, PackagePart parentPart, org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr, XSLFTheme theme) |
protected PaintStyle |
selectPaint(org.openxmlformats.schemas.drawingml.x2006.main.CTGradientFillProperties gradFill, org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr, XSLFTheme theme) |
protected PaintStyle |
selectPaint(org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr, XSLFTheme theme) |
protected PaintStyle |
selectPaint(org.openxmlformats.schemas.drawingml.x2006.main.CTSolidColorFillProperties solidFill, org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr, XSLFTheme theme) |
protected PaintStyle |
selectPaint(org.openxmlformats.schemas.drawingml.x2006.main.CTStyleMatrixReference fillRef, XSLFTheme theme, boolean isLineStyle, boolean hasPlaceholder) |
protected PaintStyle |
selectPaint(XSLFPropertiesDelegate.XSLFFillProperties fp, org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr, PackagePart parentPart, XSLFTheme theme, boolean hasPlaceholder)
Convert shape fill into java.awt.Paint.
(将形状填充转换为 java.awt.Paint。)
|
protected <T extends org.apache.xmlbeans.XmlObject> |
selectProperty(java.lang.Class<T> resultClass, java.lang.String xquery)
As there's no xmlbeans hierarchy, but XSLF works with subclassing, not all child classes work with a
CTShape object, but often contain the same properties.
(由于没有 xmlbeans 层次结构,但 XSLF 使用子类化,并非所有子类都使用 CTShape 对象,但通常包含相同的属性。)
|
void |
setParent(XSLFShapeContainer parent) |
void |
setPlaceholder(Placeholder placeholder) |
protected XSLFShape(org.apache.xmlbeans.XmlObject shape, XSLFSheet sheet)
public final org.apache.xmlbeans.XmlObject getXmlObject()
public XSLFSheet getSheet()
getSheet
in interface
Shape<XSLFShape,XSLFTextParagraph>
(接口 Shape 中的 getSheet
public java.lang.String getShapeName()
getShapeName
in interface
Shape<XSLFShape,XSLFTextParagraph>
(接口 Shape 中的 getShapeName
public int getShapeId()
Shape
If multiple objects within the same slide share the same id attribute value, then the document shall be considered non-conformant.
(返回当前幻灯片中此形状的唯一标识符。此 ID 可用于帮助唯一标识此对象,以便文档的其他部分可以引用它。如果同一张幻灯片中的多个对象共享相同的 id 属性值,则该文档应被视为不合格。)getShapeId
in interface
Shape<XSLFShape,XSLFTextParagraph>
(接口 Shape 中的 getShapeId
public void setParent(XSLFShapeContainer parent)
public XSLFShapeContainer getParent()
getParent
in interface
Shape<XSLFShape,XSLFTextParagraph>
(接口 Shape 中的 getParent
protected PaintStyle getFillPaint()
protected org.openxmlformats.schemas.presentationml.x2006.main.CTBackgroundProperties getBgPr()
protected org.openxmlformats.schemas.drawingml.x2006.main.CTStyleMatrixReference getBgRef()
protected org.openxmlformats.schemas.drawingml.x2006.main.CTGroupShapeProperties getGrpSpPr()
protected org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps getCNvPr()
protected org.openxmlformats.schemas.drawingml.x2006.main.CTShapeStyle getSpStyle()
protected <T extends org.apache.xmlbeans.XmlObject> T getChild(java.lang.Class<T> childClass, java.lang.String namespace, java.lang.String nodename)
childClass
- the class to cast the properties to
(childClass - 将属性转换为的类)
namespace
- the namespace - usually it is
"http://schemas.openxmlformats.org/presentationml/2006/main"
(命名空间 - 命名空间 - 通常是“http://schemas.openxmlformats.org/presentationml/2006/main”)
nodename
- the node name, without prefix
(nodename - 节点名称,不带前缀)
public boolean isPlaceholder()
public Placeholder getPlaceholder()
PlaceholderDetails.getPlaceholder()
public void setPlaceholder(Placeholder placeholder)
public XSLFPlaceholderDetails getPlaceholderDetails()
SimpleShape.getPlaceholderDetails()
protected <T extends org.apache.xmlbeans.XmlObject> T selectProperty(java.lang.Class<T> resultClass, java.lang.String xquery)
CTShape
object, but often contain the same properties. This method is the generalized form of selecting and casting those properties.
(由于没有 xmlbeans 层次结构,但 XSLF 使用子类化,并非所有子类都使用 CTShape 对象,但通常包含相同的属性。此方法是选择和转换这些属性的通用形式。)
resultClass
- the requested result class
(resultClass - 请求的结果类)
xquery
- the simple (xmlbean) xpath expression to the property
(xquery - 属性的简单 (xmlbean) xpath 表达式)
@Internal public boolean fetchShapeProperty(PropertyFetcher<?> visitor)
The following order of inheritance is assumed:
visitor
- the object that collects the desired property
(访问者 - 收集所需属性的对象)
protected PaintStyle selectPaint(XSLFPropertiesDelegate.XSLFFillProperties fp, org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr, PackagePart parentPart, XSLFTheme theme, boolean hasPlaceholder)
fp
- a properties handler specific to the underlying shape properties
(fp - 特定于底层形状属性的属性处理程序)
phClr
- context color
(phClr - 上下文颜色)
parentPart
- the parent package part. Any external references (images, etc.) are resolved relative to it.
(parentPart - 父包部件。任何外部参考(图像等)都相对于它进行解析。)
theme
- the theme for the shape/sheet
(主题 - 形状/表格的主题)
protected PaintStyle selectPaint(org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr, XSLFTheme theme)
protected PaintStyle selectPaint(org.openxmlformats.schemas.drawingml.x2006.main.CTSolidColorFillProperties solidFill, org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr, XSLFTheme theme)
protected PaintStyle selectPaint(org.openxmlformats.schemas.drawingml.x2006.main.CTBlipFillProperties blipFill, PackagePart parentPart, org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr, XSLFTheme theme)
protected PaintStyle selectPaint(org.openxmlformats.schemas.drawingml.x2006.main.CTGradientFillProperties gradFill, org.openxmlformats.schemas.drawingml.x2006.main.CTSchemeColor phClr, XSLFTheme theme)
protected PaintStyle selectPaint(org.openxmlformats.schemas.drawingml.x2006.main.CTStyleMatrixReference fillRef, XSLFTheme theme, boolean isLineStyle, boolean hasPlaceholder)
public void draw(java.awt.Graphics2D graphics, java.awt.geom.Rectangle2D bounds)
Shape
draw
in interface
Shape<XSLFShape,XSLFTextParagraph>
(在界面Shape中绘制
graphics
- the graphics context
(graphics - 图形上下文)
bounds
- the rectangle to fit the shape to. if null, the bounds of the shape are used.
(bounds - 适合形状的矩形。如果为 null,则使用形状的边界。)
protected org.apache.xmlbeans.XmlObject getShapeProperties()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.