Graph

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph

public final class Graph extends BaseParagraph

Represents graph - graphics generator paragraph.

Constructors

ConstructorDescription
Graph()For Internal usage only
Graph(double width, double height)Initializes a new instance of the Graph class.
Graph(float width, float height)Initializes a new instance of the Graph class.

Methods

MethodDescription
getGraphInfo()Gets a GraphInfo object that indicates the graph info,such as color, line width,etc.
setGraphInfo(GraphInfo value)Gets or sets a GraphInfo object that indicates the graph info,such as color, line width,etc.
getBorder()Gets the border.
setBorder(BorderInfo value)Sets the border.
isChangePosition()Gets change current position after process paragraph.(default true)
setChangePosition(boolean value)Sets change current position after process paragraph.(default true)
getLeft()Gets table left coordinate.
setLeft(double value)Sets table left coordinate.
getTop()Gets the table top coordinate.
setTop(double value)Sets the table top coordinate.
getShapes()Gets a Shapes collection that indicates all shapes in the graph.
setShapes(List value)Sets a Shapes collection that indicates all shapes in the graph.
getTitle()Gets string value that indicates the title of the graph.
setTitle(TextFragment value)Sets string value that indicates the title of the graph.
getWidth()Gets float value that indicates the graph width.
setWidth(double value)Sets float value that indicates the graph width.
getHeight()Gets float value that indicates the graph height.
setHeight(double value)Sets float value that indicates the graph height.
deepClone()Clone the graph.

Graph()

public Graph()

For Internal usage only

Graph(double width, double height)

public Graph(double width, double height)

Initializes a new instance of the Graph class.

Parameters:

ParameterTypeDescription
widthdoubleThe width of the graph.
heightdoubleThe height of the graph.

Graph(float width, float height)

public Graph(float width, float height)

Initializes a new instance of the Graph class.

Parameters:

ParameterTypeDescription
widthfloatThe width of the graph.
heightfloatThe height of the graph.

getGraphInfo()

public GraphInfo getGraphInfo()

Gets a GraphInfo object that indicates the graph info,such as color, line width,etc.

Returns: GraphInfo - GraphInfo object

setGraphInfo(GraphInfo value)

public void setGraphInfo(GraphInfo value)

Gets or sets a GraphInfo object that indicates the graph info,such as color, line width,etc.

Parameters:

ParameterTypeDescription
valueGraphInfoGraphInfo object

getBorder()

public BorderInfo getBorder()

Gets the border.

Returns: BorderInfo - BorderInfo element

setBorder(BorderInfo value)

public void setBorder(BorderInfo value)

Sets the border.

Parameters:

ParameterTypeDescription
valueBorderInfoBorderInfo element

isChangePosition()

public boolean isChangePosition()

Gets change current position after process paragraph.(default true)

Returns: boolean - boolean value

setChangePosition(boolean value)

public void setChangePosition(boolean value)

Sets change current position after process paragraph.(default true)

Parameters:

ParameterTypeDescription
valuebooleanboolean value

getLeft()

public double getLeft()

Gets table left coordinate.

Returns: double - table left coordinate.

setLeft(double value)

public void setLeft(double value)

Sets table left coordinate.

Parameters:

ParameterTypeDescription
valuedoubletable left coordinate.

getTop()

public double getTop()

Gets the table top coordinate.

Returns: double - the table top coordinate.

setTop(double value)

public void setTop(double value)

Sets the table top coordinate.

Parameters:

ParameterTypeDescription
valuedoublethe table top coordinate.

getShapes()

public List<Shape> getShapes()

Gets a Shapes collection that indicates all shapes in the graph.

Returns: java.util.List<com.aspose.pdf.drawing.Shape> - List of Shape elements

setShapes(List value)

public void setShapes(List<Shape> value)

Sets a Shapes collection that indicates all shapes in the graph.

Parameters:

ParameterTypeDescription
valuejava.util.List<com.aspose.pdf.drawing.Shape>List of Shape elements

getTitle()

public TextFragment getTitle()

Gets string value that indicates the title of the graph.

Returns: TextFragment - title of the graph.

setTitle(TextFragment value)

public void setTitle(TextFragment value)

Sets string value that indicates the title of the graph.

Parameters:

ParameterTypeDescription
valueTextFragmenttitle of the graph.

getWidth()

public double getWidth()

Gets 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: double - float value that indicates the graph width.

setWidth(double value)

public void setWidth(double value)

Sets 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”.

Parameters:

ParameterTypeDescription
valuedoublefloat value that indicates the graph width.

getHeight()

public double getHeight()

Gets 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: double - value that indicates the graph height.

setHeight(double value)

public void setHeight(double value)

Sets 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:

ParameterTypeDescription
valuedoublethat indicates the graph height.

deepClone()

public Object deepClone()

Clone the graph.

Returns: java.lang.Object - The cloned object