|
|||||||||
prev class next class | frames no frames | ||||||||
summary: nested | field | constr | method | detail: field | constr | method |
java.lang.objectcom.spire.doc.ownerholder
com.spire.doc.documents.xml.documentserializable
com.spire.doc.documentobject
com.spire.doc.documentbase
com.spire.doc.fields.paragraphbase
com.spire.doc.fields.shape.shapebase
public abstract class shapebase
base class for objects in the psawing layer, such as an autoshape, freeform, ole object, activex control, or picture.
this is an abstract class. the two derived classes that you can instantiate are shape and groupshape.
a shape is a node in the document tree.
if the shape is a child of a paragraph
object, then the shape is said to be "top-level".
top-level shapes are measured and positioned in points.
a shape can also occur as a child of a groupshape object when several shapes are grouped. child shapes of a group shape are positioned in the coordinate space and units defined by the coordsize and coordorigin properties of the parent group shape.
a shape can be positioned inline with text or floating. the positioning method is controlled using the wraptype property.
when a shape is floating, it is positioned relative to something (e.g the current paragraph,
the margin or the page). the relative positioning of the shape is specified using the
relativehorizontalposition
and relativeverticalposition
properties.
a floating shape be positioned explicitly using the left and top
properties or aligned relative to some other object using the horizontalalignment
and verticalalignment
properties.
shape groupshape
method summary | |
---|---|
boolean |
getallowoverlap()
gets a value that specifies whether thisshape can overlap other shapes. |
boolean |
getbehindtext()
specifies whether the shape is below or above text. |
double |
getbottom()
gets the position of the bottom edge of the containing block of the shape. |
documentobjectcollection |
getchildobjects()
gets the child objects of the entity. |
double |
getdistancebottom()
gets the distance (in points) between the document text and the bottom edge of the shape. |
double |
getdistanceleft()
gets the distance (in points) between the document text and the left edge of the shape. |
double |
getdistanceright()
gets the distance (in points) between the document text and the right edge of the shape. |
double |
getdistancetop()
gets the distance (in points) between the document text and the top edge of the shape. |
documentobjecttype |
getdocumentobjecttype()
gets the type of the document object. |
float |
getheight()
gets the height of the containing block of the shape. |
shapehorizontalalignment |
gethorizontalalignment()
gets how the shape is positioned horizontally. |
horizontalorigin |
gethorizontalorigin()
|
float |
gethorizontalposition()
|
paragraph |
getparentparagraph()
returns the immediate parent paragraph. |
double |
getright()
gets the position of the right edge of the containing block of the shape. |
double |
getrotation()
gets the angle (in degrees) that a shape is rotated. |
shapetype |
getshapetype()
gets the shape type. |
textwrappingstyle |
gettextwrappingstyle()
gets whether the shape is inline or floating. |
textwrappingtype |
gettextwrappingtype()
gets how the text is wrapped around the shape. |
shapeverticalalignment |
getverticalalignment()
specifies how the shape is positioned vertically. |
verticalorigin |
getverticalorigin()
|
float |
getverticalposition()
|
float |
getwidth()
gets the width of the containing block of the shape. |
long |
getzorder()
gets the display order of overlapping shapes. |
boolean |
haskey(int key)
|
boolean |
isimage()
returns true if this shape is an image shape. |
java.awt.geom.point2d |
localtoparent(java.awt.geom.point2d value)
converts a value from the local coordinate space into the coordinate space of the parent shape. |
void |
removeshapeattribute(int key)
reserved for system use. |
void |
setallowoverlap(boolean value)
sets a value that specifies whether thisshape can overlap other shapes. |
void |
setbehindtext(boolean value)
sets whether the shape is below or above text. |
void |
setdistancebottom(double value)
sets the distance (in points) between the document text and the bottom edge of the shape. |
void |
setdistanceleft(double value)
sets the distance (in points) between the document text and the left edge of the shape. |
void |
setdistanceright(double value)
sets the distance (in points) between the document text and the right edge of the shape. |
void |
setdistancetop(double value)
sets the distance (in points) between the document text and the top edge of the shape. |
void |
setheight(float value)
sets the height of the containing block of the shape. |
void |
sethorizontalalignment(shapehorizontalalignment value)
sets how the shape is positioned horizontally. |
void |
sethorizontalorigin(horizontalorigin value)
|
void |
sethorizontalposition(float value)
|
void |
setrotation(double value)
sets the angle (in degrees) that a shape is rotated. |
void |
setshapeattr(int key,
java.lang.object value)
reserved for system use. |
void |
setshapeattribute(int key,
java.lang.object value)
reserved for system use. |
void |
setshapetype(shapetype shapetype)
sets the shape type. |
void |
settextwrappingstyle(textwrappingstyle value)
sets whether the shape is inline or floating. |
void |
settextwrappingtype(textwrappingtype value)
sets how the text is wrapped around the shape. |
void |
setverticalalignment(shapeverticalalignment value)
sets how the shape is positioned vertically. |
void |
setverticalorigin(verticalorigin value)
|
void |
setverticalposition(float value)
|
void |
setwidth(float value)
sets the width of the containing block of the shape. |
void |
setzorder(long value)
sets the display order of overlapping shapes. |
methods inherited from class com.spire.doc.fields.paragraphbase |
---|
applycharacterformat, applystyle, getancestor, getcharacterformat, getownerparagraph, getstylename, isdeleterevision, isinsertrevision |
methods inherited from class com.spire.doc.documentobject |
---|
deepclone, getfirstchild, getlastchild, getnextsibling, getowner, getprevioussibling, iscomposite, tostring |
methods inherited from class com.spire.doc.ownerholder |
---|
getdocument |
methods inherited from interface com.spire.doc.interfaces.idocumentobject |
---|
deepclone, getdocument, getnextsibling, getowner, getprevioussibling, iscomposite |
methods inherited from interface com.spire.doc.documents.irunattrsource |
---|
clearrunattrs, fetchinheritedrunattr, getdirectrunattr, getdirectrunattrbyindex, getdirectrunattrscount, setrunattr |
method detail |
---|
public documentobjecttype getdocumentobjecttype()
documentobject
getdocumentobjecttype
in interface idocumentobject
getdocumentobjecttype
in class documentobject
public void setshapetype(shapetype shapetype)
shapetype
- public void setshapeattribute(int key, java.lang.object value)
key
- keyvalue
- valuepublic void setshapeattr(int key, java.lang.object value)
key
- keyvalue
- valuepublic void removeshapeattribute(int key)
key
- keypublic boolean haskey(int key)
public java.awt.geom.point2d localtoparent(java.awt.geom.point2d value)
value
- point2d value
public shapetype getshapetype()
public boolean isimage()
public float gethorizontalposition()
public void sethorizontalposition(float value)
public float getverticalposition()
public void setverticalposition(float value)
public double getright()
public double getbottom()
public float getwidth()
public void setwidth(float value)
value
- width valuepublic float getheight()
public void setheight(float value)
value
- heightpublic horizontalorigin gethorizontalorigin()
public void sethorizontalorigin(horizontalorigin value)
public verticalorigin getverticalorigin()
public void setverticalorigin(verticalorigin value)
public shapehorizontalalignment gethorizontalalignment()
has effect only for top level floating shapes
public void sethorizontalalignment(shapehorizontalalignment value)
value
- shapehorizontalalignmentpublic shapeverticalalignment getverticalalignment()
has effect only for top level floating shapes.
public void setverticalalignment(shapeverticalalignment value)
value
- shapeverticalalignmentpublic textwrappingstyle gettextwrappingstyle()
has effect only for top level shapes
public void settextwrappingstyle(textwrappingstyle value)
value
- textwrappingstylepublic textwrappingtype gettextwrappingtype()
has effect only for top level shapes.
public void settextwrappingtype(textwrappingtype value)
value
- textwrappingtypepublic boolean getallowoverlap()
this property affects behavior of the shape in microsoft word.
this property is applicable only to top level shapes.
the default value is true
public void setallowoverlap(boolean value)
value
- booleanpublic boolean getbehindtext()
has effect only for top level shapes.
the default value is false.
public void setbehindtext(boolean value)
value
- booleanpublic double getdistancetop()
the default value is 0.
has effect only for top level shapes.
public void setdistancetop(double value)
value
- doublepublic double getdistancebottom()
the default value is 0.
has effect only for top level shapes.
public void setdistancebottom(double value)
value
- doublepublic double getdistanceleft()
the default value is 1/8 inch.
has effect only for top level shapes.
public void setdistanceleft(double value)
value
- doublepublic double getdistanceright()
the default value is 1/8 inch.
has effect only for top level shapes.
public void setdistanceright(double value)
value
- doublepublic long getzorder()
has effect only for top level shapes.
the default value is 0.
the number represents the stacking precedence. a shape with a higher number will be displayed as if it were overlapping (in "front" of) a shape with a lower number.
the order of overlapping shapes is independent for shapes in the header and in the main text of the document.
the display order of child shapes in a group shape is determined by their order inside the group shape.
public void setzorder(long value)
value
- longpublic double getrotation()
the default value is 0.
public void setrotation(double value)
value
- doublepublic paragraph getparentparagraph()
for child shapes of a group shape always returns null.
public documentobjectcollection getchildobjects()
paragraphbase
getchildobjects
in interface icompositeobject
getchildobjects
in class paragraphbase
|
|||||||||
prev class next class | frames no frames | ||||||||
summary: nested | field | constr | method | detail: field | constr | method |