aspose.pdf
Class BorderInfo

java.lang.Object
  extended by aspose.pdf.BorderInfo
All Implemented Interfaces:
java.lang.Cloneable

public class BorderInfo
extends java.lang.Object
implements java.lang.Cloneable

Encapsulates the border info for the Table, Row and Cell.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); aspose.pdf.Table table1 = new aspose.pdf.Table(); sec1.getParagraphs().add(table1); table1.setColumnWidths("70 2cm"); Row row1 = table1.getRows().add(); Cell cell1Row1 = row1.getCells().add("ColumnsSpan = 2"); cell1Row1.setColumnsSpan(2); cell1Row1.setBorder(new BorderInfo(BorderSide.All.getValue(), 0.5F)); Row row2 = table1.getRows().add(); Cell cell1Row2 = row2.getCells().add("cell1"); cell1Row2.setBorder(new BorderInfo(BorderSide.All.getValue(), 0.5F)); Cell cell2Row2 = row2.getCells().add("cell2"); cell2Row2.setBorder(new BorderInfo(BorderSide.All.getValue(), 0.5F, new aspose.pdf.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>


Field Summary
static CombinationStyle CombSty
           
 
Constructor Summary
BorderInfo()
          Constructor - initializes a new instance of the BorderInfo class.
BorderInfo(int borderSide)
          Constructor - initializes a new instance of the BorderInfo class.
BorderInfo(int borderSide, Color borderColor)
          Constructor - initializes a new instance of the BorderInfo class.
BorderInfo(int borderSide, float borderWidth)
          Constructor - initializes a new instance of the BorderInfo class.
BorderInfo(int borderSide, float borderWidth, Color borderColor)
          Constructor - initializes a new instance of the BorderInfo class.
BorderInfo(int borderSide, GraphInfo borderFormat)
          Constructor - initializes a new instance of the BorderInfo class.
 
Method Summary
 java.lang.Object clone()
          Clones a new BorderInfo object.
 GraphInfo getBottom()
          Gets a GraphInfo object that indicates bottom of the border.
static int getCombineStyle()
          Gets value for CombinationStyle property.
 GraphInfo getLeft()
          Gets a GraphInfo object that indicates left of the border.
 GraphInfo getRight()
          Gets a GraphInfo object that indicates right of the border.
 GraphInfo getTop()
          Gets a GraphInfo object that indicates top of the border.
 void setBorderStyle(int borderSide, BorderStyle style)
          Sets the style of borders.
 void setBottom(GraphInfo value)
          Sets a GraphInfo object that indicates bottom of the border.
 void setCombineStyle(CombinationStyle value)
          Sets value for CombinationStyle property.
 void setLeft(GraphInfo value)
          Sets a GraphInfo object that indicates left of the border.
 void setRight(GraphInfo value)
          Sets a GraphInfo object that indicates right of the border.
 void setTop(GraphInfo value)
          Sets a GraphInfo object that indicates top of the border.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CombSty

public static CombinationStyle CombSty
Constructor Detail

BorderInfo

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


BorderInfo

public BorderInfo(int borderSide)
Constructor - initializes a new instance of the BorderInfo class.

Parameters:
borderSide - Indicates the border sides info. For example: BorderSide.Left.getValue() | BorderSide.Top.getValue().

BorderInfo

public BorderInfo(int borderSide,
                  float borderWidth)
Constructor - initializes a new instance of the BorderInfo class.

Parameters:
borderSide - Indicates the border sides info. For example: BorderSide.Left.getValue() | BorderSide.TopgetValue().
borderWidth - The width of the border.

BorderInfo

public BorderInfo(int borderSide,
                  float borderWidth,
                  Color borderColor)
Constructor - initializes a new instance of the BorderInfo class.

Parameters:
borderSide - Indicates the border sides info. For example: BorderSide.Left.getValue() | BorderSide.Top.getValue().
borderWidth - The width of the border.
borderColor - The border color.

BorderInfo

public BorderInfo(int borderSide,
                  GraphInfo borderFormat)
Constructor - initializes a new instance of the BorderInfo class.

Parameters:
borderSide - Indicates the border sides info. For example: BorderSide.Left.getValue() | BorderSide.Top.getValue().
borderFormat - The border format info.

BorderInfo

public BorderInfo(int borderSide,
                  Color borderColor)
Constructor - initializes a new instance of the BorderInfo class.

Parameters:
borderSide - Indicates the border sides info. For example: BorderSide.Left.getValue() | BorderSide.Top.getValue().
borderColor - The border color.
Method Detail

getLeft

public GraphInfo getLeft()
Gets a GraphInfo object that indicates left of the border.

Returns:
A GraphInfo object.

setLeft

public void setLeft(GraphInfo value)
Sets a GraphInfo object that indicates left of the border.

Parameters:
value - A GraphInfo object.

getRight

public GraphInfo getRight()
Gets a GraphInfo object that indicates right of the border.

Returns:
A GraphInfo object.

setRight

public void setRight(GraphInfo value)
Sets a GraphInfo object that indicates right of the border.

Parameters:
value - A GraphInfo object.

getTop

public GraphInfo getTop()
Gets a GraphInfo object that indicates top of the border.

Returns:
A GraphInfo object.

setTop

public void setTop(GraphInfo value)
Sets a GraphInfo object that indicates top of the border.

Parameters:
value - A GraphInfo object.

getBottom

public GraphInfo getBottom()
Gets a GraphInfo object that indicates bottom of the border.

Returns:
A GraphInfo object.

setBottom

public void setBottom(GraphInfo value)
Sets a GraphInfo object that indicates bottom of the border.

Parameters:
value - GraphInfo object.

clone

public java.lang.Object clone()
Clones a new BorderInfo object.

Overrides:
clone in class java.lang.Object
Returns:
The new BorderInfo object.

setBorderStyle

public void setBorderStyle(int borderSide,
                           BorderStyle style)
Sets the style of borders.

Parameters:
borderSide - The border sides to be set. For example, BorderSide.Top.getValue() | BorderSide.RightgetValue().
style - The style of the borders.

Typical usages are the following:

[C#] Text t = new Text("hello world"); t.getTextInfo().getTextBorder(new BorderInfo(BorderSide.All.getValue(), 0.5F)); t.getTextInfo().getTextBorder().setBorderStyle(BorderSide.All.getValue(), BorderStyle.Double); [XML] <Text> <TextBorder> <All LineWidth="0.5" BorderStyle="Double" /> </TextBorder> <Segment>hello world</Segment> </Text>

getCombineStyle

public static int getCombineStyle()
Gets value for CombinationStyle property.

Returns:
An int value.

setCombineStyle

public void setCombineStyle(CombinationStyle value)
Sets value for CombinationStyle property.

Parameters:
value - A CombinationStyle object.