aspose.pdf
Class Graph

java.lang.Object
  extended by aspose.pdf.Paragraph
      extended by aspose.pdf.Graph

public class Graph
extends Paragraph

Represents a graph Paragraph.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); Graph graph1 = new Graph(sec1,100,400); sec1.getParagraphs().add(graph1); float[] posArr = new float[]{0,0,200,80,300,40,350,90}; Curve curve1 = new Curve(graph1,posArr); graph1.getShapes().add(curve1); pdf1.save(...); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <Graph Height="100" Width="400"> <Curve Position="0 0 200 80 300 40 350 90" /> </Graph> </Section> </Pdf>


Nested Class Summary
 
Nested classes/interfaces inherited from class aspose.pdf.Paragraph
Paragraph.VerticalPositionInfo
 
Field Summary
 
Fields inherited from class aspose.pdf.Paragraph
INNER_INDENT, isNeedAddToPage, isPositionProcessed, RealPageNumber, VerticalPosInfo
 
Constructor Summary
Graph()
          Constructor - initializes a new instance of the Graph class.
Graph(float width, float height)
          Constructor - initializes a new instance of the Graph class.
Graph(HeaderFooter hf)
          Constructor - initializes a new instance of the Graph class.
Graph(HeaderFooter hf, float width, float height)
          Constructor - initializes a new instance of the Graph class.
Graph(Section section)
          Constructor - initializes a new instance of the Graph class.
Graph(Section section, float width, float height)
          Constructor - initializes a new instance of the Graph class.
 
Method Summary
 java.lang.Object completeClone()
          Clones a new Graph object.
 AlignmentType getAlignment()
          Gets a AlignmentType that indicates the paragraph alignment type.
 ClosedShape getClippingPath()
          Returns a contour clipping an area of graph that will be visible.
 float getGraphHeight()
          Gets a float value that indicates the graph height.
 GraphInfo getGraphInfo()
          Gets a GraphInfo object that indicates the graph info.
 GraphNotes getGraphNotes()
          Gets a GraphNotes collection that indicates all notes in the graph.
 float getGraphWidth()
          Gets a float value that indicates the graph width.
 Hyperlink getHyperlink()
          Gets a Hyperlink object that indicates the hyper link info of the graph.
 float getRotatingAngle()
          Gets or a float value that indicates the rotation angle of the coordinate system when transforming a coordinate system.
 Shapes getShapes()
          Gets a Shapes collection that indicates all shapes in the graph.
 TextInfo getTextInfo()
          Gets a TextInfo object that indicates the text info of the graph title.
 java.lang.String getTitle()
          Gets a String value that indicates the title of the graph.
 int getZIndex()
          Gets an int value that indicates the Z-order of the graph.
 boolean isFootLine()
          Gets a boolean value that indicates whether or not the current graph is a foot line for footnote.
 boolean isNeedRepeating()
          Gets a boolean value that indicates whether the paragraph need to be repeated on next page.
 void setAlignment(AlignmentType paraAlignment)
          Sets a AlignmentType that indicates the paragraph alignment type.
 void setClippingPath(ClosedShape clippingPath)
          Sets a contour clipping an area of graph that will be visible.
 void setGraphHeight(float height)
          Gets a float value that indicates the graph height.
 void setGraphInfo(GraphInfo graphInfo)
          Sets a GraphInfo object that indicates the graph info.
 void setGraphNotes(GraphNotes notes)
          Sets a GraphNotes collection that indicates all notes in the graph.
 void setGraphWidth(float width)
          Sets a float value that indicates the graph width.
 void setHyperlink(Hyperlink hyperlinkInfo)
          Sets a Hyperlink object that indicates the hyper link info of the graph.
 void setIsFootLine(boolean isFootLine)
          Sets a boolean value that indicates whether or not the current graph is a foot line for footnote.
 void setIsNeedRepeating(boolean isNeedRepeating)
          Sets a boolean value that indicates whether the paragraph need to be repeated on next page.
 void setRotatingAngle(float rotatingAngle)
          Sets or sets a float value that indicates the rotation angle of the coordinate system when transforming a coordinate system.
 void setShapes(Shapes shapesInGraph)
          Sets a Shapes collection that indicates all shapes in the graph.
 void setTextInfo(TextInfo graphTitleInfo)
          Sets a TextInfo object that indicates the text info of the graph title.
 void setTitle(java.lang.String graphTitle)
          Sets a String value that indicates the title of the graph.
 void setZIndex(int z_index)
          Sets an int value that indicates the Z-order of the graph.
 
Methods inherited from class aspose.pdf.Paragraph
copyTo, getHeight, getID, getIsNeedAddToPage, getIsPositionGot, getIsPositionProcessed, getLeft, getMargin, getMayNeedReprocess, getNeedReprocess, getNextParagraphInHeading, getPageNumber, getParentCell, getPositioningType, getPosX, getPosY, getRealPageNumber, getReferenceParagraphID, getRefPara, getSection, getTop, getVerticalPosInfo, getWidth, isDisabled, isEndNote, isFirstParagraph, isFirstParagraphInColumn, isFootNote, isFootNoteProcessed, isInHeaderFooter, isInList, isKeptTogether, isKeptWithNext, isOnOddPage, setEndNote, setFootNoteProcessed, setHeight, setID, setIsDisabled, setIsFirstParagraph, setIsFirstParagraphInColumn, setIsFootNote, setIsInHeaderFooter, setIsInList, setIsKeptTogether, setIsKeptWithNext, setIsNeedAddToPage, setIsOnOddPage, setIsPositionGot, setIsPositionProcessed, setLeft, setMargin, setMayNeedReprocess, setNeedReprocess, setNextParagraphInHeading, setPageNumber, setParentCell, setParentIsTable, setPositioningType, setPosX, setPosY, setRealPageNumber, setReferenceParagraphID, setRefPara, setSection, setTop, setVerticalPosInfo, setWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Graph

public Graph()
Constructor - initializes a new instance of the Graph class.


Graph

public Graph(float width,
             float height)
Constructor - initializes a new instance of the Graph class.

Parameters:
width - The width of the graph.
height - The height of the graph.

Graph

public Graph(Section section)
Constructor - initializes a new instance of the Graph class.

Parameters:
section - The specified Section object.

Graph

public Graph(Section section,
             float width,
             float height)
Constructor - initializes a new instance of the Graph class.

Parameters:
section - The specified Section object.
width - The width of the graph.
height - The height of the graph.

Graph

public Graph(HeaderFooter hf)
Constructor - initializes a new instance of the Graph class.

Parameters:
hf - The specified HeaderFooter object.

Graph

public Graph(HeaderFooter hf,
             float width,
             float height)
Constructor - initializes a new instance of the Graph class.

Parameters:
hf - The specified HeaderFooter object.
width - The width of the graph.
height - The height of the graph.
Method Detail

getGraphInfo

public GraphInfo getGraphInfo()
Gets a GraphInfo object that indicates the graph info.

Returns:
A GraphInfo object.

setGraphInfo

public void setGraphInfo(GraphInfo graphInfo)
Sets a GraphInfo object that indicates the graph info.

Parameters:
graphInfo - A GraphInfo object.

isNeedRepeating

public boolean isNeedRepeating()
Gets a boolean value that indicates whether the paragraph need to be repeated on next page. Default value is false.The attribute is only valid when the paragraph itself and the object its ReferenceParagraphID referred to both are included in RepeatingRows.

Returns:
A boolean value.

setIsNeedRepeating

public void setIsNeedRepeating(boolean isNeedRepeating)
Sets a boolean value that indicates whether the paragraph need to be repeated on next page.

Parameters:
isNeedRepeating - A boolean value.

getHyperlink

public Hyperlink getHyperlink()
Gets a Hyperlink object that indicates the hyper link info of the graph.

Returns:
A Hyperlink object.

setHyperlink

public void setHyperlink(Hyperlink hyperlinkInfo)
Sets a Hyperlink object that indicates the hyper link info of the graph.

Parameters:
hyperlinkInfo - A Hyperlink object.

getShapes

public Shapes getShapes()
Gets a Shapes collection that indicates all shapes in the graph.

Returns:
A Shapes collection.

setShapes

public void setShapes(Shapes shapesInGraph)
Sets a Shapes collection that indicates all shapes in the graph.

Parameters:
shapesInGraph - A Shapes collection.

getAlignment

public AlignmentType getAlignment()
Gets a AlignmentType that indicates the paragraph alignment type.

Returns:
An AlignmentType object.

setAlignment

public void setAlignment(AlignmentType paraAlignment)
Sets a AlignmentType that indicates the paragraph alignment type.

Parameters:
paraAlignment - An AlignmentType object.

getTitle

public java.lang.String getTitle()
Gets a String value that indicates the title of the graph.

Returns:
Title name.

setTitle

public void setTitle(java.lang.String graphTitle)
Sets a String value that indicates the title of the graph.

Parameters:
graphTitle - Title name.

getTextInfo

public TextInfo getTextInfo()
Gets a TextInfo object that indicates the text info of the graph title.

Returns:
A TextInfo object.

setTextInfo

public void setTextInfo(TextInfo graphTitleInfo)
Sets a TextInfo object that indicates the text info of the graph title.

Parameters:
graphTitleInfo - A TextInfo object.

getGraphNotes

public GraphNotes getGraphNotes()
Gets a GraphNotes collection that indicates all notes in the graph.

Returns:
A @link GraphNotes} object.

setGraphNotes

public void setGraphNotes(GraphNotes notes)
Sets a GraphNotes collection that indicates all notes in the graph.

Parameters:
notes - A @link GraphNotes} object.

getGraphWidth

public float getGraphWidth()
Gets a float value that indicates the graph width. The unit is point. In XML,the default unit is point, but cm and inch are also supported. For example, GraphWidth="10cm" or GraphWidth="5inch".

Returns:
A float value.

setGraphWidth

public void setGraphWidth(float width)
Sets a float value that indicates the graph width.

Parameters:
width - A float value.

getGraphHeight

public float getGraphHeight()
Gets a float value that indicates the graph height. The unit is point. In XML,the default unit is point, but cm and inch are also supported. For example, GraphHeight="10cm" or GraphHeight="5inch".

Returns:
A float value.

setGraphHeight

public void setGraphHeight(float height)
Gets a float value that indicates the graph height. The unit is point. In XML,the default unit is point, but cm and inch are also supported. For example, GraphHeight="10cm" or GraphHeight="5inch".

Parameters:
height - A float value.

isFootLine

public boolean isFootLine()
Gets a boolean value that indicates whether or not the current graph is a foot line for footnote.

Returns:
A boolean value.

setIsFootLine

public void setIsFootLine(boolean isFootLine)
Sets a boolean value that indicates whether or not the current graph is a foot line for footnote.

Parameters:
isFootLine - A boolean value.

getZIndex

public int getZIndex()
Gets an int value that indicates the Z-order of the graph. A graph with larger ZIndex will be placed over the graph with smaller ZIndex. ZIndex can be negative. Graph with negative ZIndex will be placed behind the text in the page.

Returns:
An int value.

setZIndex

public void setZIndex(int z_index)
Sets an int value that indicates the Z-order of the graph.

Parameters:
z_index - An int value.

completeClone

public java.lang.Object completeClone()
Clones a new Graph object. Both format and shapes are cloned.

Specified by:
completeClone in class Paragraph
Returns:
The new Cloned Graph object.

getRotatingAngle

public float getRotatingAngle()
Gets or a float value that indicates the rotation angle of the coordinate system when transforming a coordinate system.

Returns:
A float value.

setRotatingAngle

public void setRotatingAngle(float rotatingAngle)
Sets or sets a float value that indicates the rotation angle of the coordinate system when transforming a coordinate system.

Parameters:
rotatingAngle - A float value.

getClippingPath

public ClosedShape getClippingPath()
Returns a contour clipping an area of graph that will be visible.


setClippingPath

public void setClippingPath(ClosedShape clippingPath)
Sets a contour clipping an area of graph that will be visible.