public class BorderInfo extends Object implements com.aspose.ms.System.ICloneable
Encapsulates the border info for the Table
, Row
and Cell
.
[C#] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.Sections.Add(); Aspose.Pdf.Generator.Table table1 = new Aspose.Pdf.Generator.Table(); sec1.Paragraphs.Add(table1); table1.ColumnWidths = "70 2cm"; Row row1 = table1.Rows.Add(); Cell cell1Row1 = row1.Cells.Add("ColumnsSpan = 2"); cell1Row1.ColumnsSpan = 2; cell1Row1.Border = new BorderInfo((int)BorderSide.All,0.5F); Row row2 = table1.Rows.Add(); Cell cell1Row2 = row2.Cells.Add("cell1"); cell1Row2.Border = new BorderInfo((int)BorderSide.All,0.5F); Cell cell2Row2 = row2.Cells.Add("cell2"); cell2Row2.Border = new BorderInfo((int)BorderSide.All,0.5F,new Aspose.Pdf.Generator.Color("Red")); pdf1.Save(...); [Visual Basic] Dim pdf1 As Pdf = New Pdf() Dim sec1 As Section = pdf1.Sections.Add() Dim table1 As Aspose.Pdf.Generator.Table = New Aspose.Pdf.Generator.Table() sec1.Paragraphs.Add(table1) table1.ColumnWidths = "70 2cm" Dim row1 As Row = table1.Rows.Add() Dim cell1Row1 As Cell = row1.Cells.Add("ColumnsSpan = 2") cell1Row1.ColumnsSpan = 2 cell1Row1.Border = New BorderInfo(CType(BorderSide.All, Integer), 0.5) Dim row2 As Row = table1.Rows.Add() Dim cell1Row2 As Cell = row2.Cells.Add("cell1") cell1Row2.Border = New BorderInfo(CType(BorderSide.All, Integer), 0.5) Dim cell2Row2 As Cell = row2.Cells.Add("cell2") cell2Row2.Border = New BorderInfo(CType(BorderSide.All, Integer), 0.5, New Aspose.Pdf.Generator.Color("Red")) pdf1.Save(...) [XML] <Pdf xmlns="Aspose.Pdf"> <Section> <Table ColumnWidths="70 2cm"> <Row> <Cell ColumnsSpan="2"> <Border> <All LineWidth="0.5"></All> </Border> <Text> <Segment>ColumnsSpan = 2</Segment> </Text> </Cell> </Row> <Row> <Cell> <Border> <All LineWidth="0.5"></All> </Border> <Text> <Segment>cell1</Segment> </Text> </Cell> <Cell> <Border> <All LineWidth="0.5" Color="Red"></All> </Border> <Text> <Segment>cell2</Segment> </Text> </Cell> </Row> </Table> </Section> </Pdf>
Constructor and Description |
---|
BorderInfo()
Initializes a new instance of the
BorderInfo class. |
BorderInfo(int borderSide)
Initializes a new instance of the
BorderInfo class. |
BorderInfo(int borderSide,
Color borderColor)
Initializes a new instance of the
BorderInfo class. |
BorderInfo(int borderSide,
float borderWidth)
Initializes a new instance of the
BorderInfo class. |
BorderInfo(int borderSide,
float borderWidth,
Color borderColor)
Initializes a new instance of the
BorderInfo class. |
BorderInfo(int borderSide,
GraphInfo borderFormat)
Initializes a new instance of the
BorderInfo class. |
Modifier and Type | Method and Description |
---|---|
Object |
deepClone()
Clones a new BorderInfo object.
|
GraphInfo |
getBottom()
Gets or sets a
GraphInfo object that indicates bottom of the border. |
int |
getCombineStyle() |
GraphInfo |
getLeft()
Gets or sets a
GraphInfo object that indicates left of the border. |
GraphInfo |
getRight()
Gets or sets a
GraphInfo object that indicates right of the border. |
GraphInfo |
getRound()
Gets or sets a
GraphInfo object that indicates the round border. |
GraphInfo |
getTop()
Gets or sets a
GraphInfo object that indicates the top border. |
BorderInfo |
makeClone() |
void |
setBorderStyle(int borderSide,
int style)
Sets the style of borders.
|
void |
setBottom(GraphInfo value) |
void |
setLeft(GraphInfo value) |
void |
setRight(GraphInfo value) |
void |
setRound(GraphInfo value) |
void |
setTop(GraphInfo value) |
public BorderInfo()
Initializes a new instance of the BorderInfo
class.
public BorderInfo(int borderSide)
Initializes a new instance of the BorderInfo
class.
borderSide
- Indicates the border sides info. For example: (int)(BorderSide.Left | BorderSide.Top).public BorderInfo(int borderSide, float borderWidth)
Initializes a new instance of the BorderInfo
class.
borderSide
- Indicates the border sides info. For example: (int)(BorderSide.Left | BorderSide.Top).borderWidth
- The width of the border.public BorderInfo(int borderSide, float borderWidth, Color borderColor)
Initializes a new instance of the BorderInfo
class.
borderSide
- Indicates the border sides info. For example: (int)(BorderSide.Left | BorderSide.Top).borderWidth
- The width of the border.borderColor
- The border color.public BorderInfo(int borderSide, GraphInfo borderFormat)
Initializes a new instance of the BorderInfo
class.
borderSide
- Indicates the border sides info. For example: (int)(BorderSide.Left | BorderSide.Top).borderFormat
- The border format info.public BorderInfo(int borderSide, Color borderColor)
Initializes a new instance of the BorderInfo
class.
borderSide
- Indicates the border sides info. For example: (int)(BorderSide.Left | BorderSide.Top).borderColor
- The border color.public GraphInfo getLeft()
Gets or sets a GraphInfo
object that indicates left of the border.
public void setLeft(GraphInfo value)
public GraphInfo getRight()
Gets or sets a GraphInfo
object that indicates right of the border.
public void setRight(GraphInfo value)
public GraphInfo getTop()
Gets or sets a GraphInfo
object that indicates the top border.
public void setTop(GraphInfo value)
public GraphInfo getRound()
Gets or sets a GraphInfo
object that indicates the round border.
public void setRound(GraphInfo value)
public GraphInfo getBottom()
Gets or sets a GraphInfo
object that indicates bottom of the border.
public void setBottom(GraphInfo value)
public Object deepClone()
Clones a new BorderInfo object.
deepClone
in interface com.aspose.ms.System.ICloneable
public BorderInfo makeClone()
public void setBorderStyle(int borderSide, int style)
Sets the style of borders.
[XML] <Text> <TextBorder> <All LineWidth="0.5" BorderStyle="Double" /> </TextBorder> <Segment>hello world</Segment> </Text> [C#] Text t = new Text("hello world"); t.TextInfo.TextBorder = new BorderInfo((int)BorderSide.All,0.5F); t.TextInfo.TextBorder.SetBorderStyle((int)BorderSide.All,BorderStyle.Double); [VB.NET] Dim t As Text = New Text("hello world") t.TextInfo.TextBorder = New BorderInfo(CType(BorderSide.All, Integer),0.5F) t.TextInfo.TextBorder.SetBorderStyle(CType(BorderSide.All, Integer),BorderStyle.Double)
borderSide
- The border sides to be set. For example,
(int)(BorderSide.Top | BorderSide.Right).style
- The style of the borders.public int getCombineStyle()
Copyright © 2016 Aspose. All Rights Reserved.