ASPOSE home

com.aspose.words
Class Border

java.lang.Object
    extended by com.aspose.words.Border
All Implemented Interfaces:
java.lang.Cloneable

public class Border
extends java.lang.Object

Represents a border of an object.

Borders can be applied to various document elements including paragraph, run of text inside a paragraph or a table cell.


Property Getters/Setters Summary
java.awt.ColorgetColor()
voidsetColor(java.awt.Color value)
           Gets or sets the border color.
doublegetDistanceFromText()
voidsetDistanceFromText(double value)
           Gets or sets distance of the border from text in points.
booleanisVisible()
           Returns true if the LineStyle is not LineStyle.None and LineWidth is greater than zero.
bytegetLineStyle()
voidsetLineStyle(byte value)
           Gets or sets the border style. The value of the property is LineStyle integer constant.
doublegetLineWidth()
voidsetLineWidth(double value)
           Gets or sets the border width in points.
booleangetShadow()
voidsetShadow(boolean value)
           Gets or sets a value indicating whether the border has a shadow.
 
Method Summary
voidclearFormatting()
           Resets border properties to default values.
BorderdeepClone()
          Reserved for internal use.
booleanisInherited()
          Reserved for internal use.
 

Property Getters/Setters Detail

getLineStyle/setLineStyle

public byte getLineStyle()

public void setLineStyle(byte value)
Gets or sets the border style. The value of the property is LineStyle integer constant.

getLineWidth/setLineWidth

public double getLineWidth()

public void setLineWidth(double value)
Gets or sets the border width in points.

If you set line width greater than zero while line style is none, the line style is changed to single line.


isVisible

public boolean isVisible()
Returns true if the LineStyle is not LineStyle.None and LineWidth is greater than zero.

getColor/setColor

public java.awt.Color getColor()

public void setColor(java.awt.Color value)
Gets or sets the border color.

getDistanceFromText/setDistanceFromText

public double getDistanceFromText()

public void setDistanceFromText(double value)
Gets or sets distance of the border from text in points. Has no effect and will be automatically reset to zero for borders of table cells.

getShadow/setShadow

public boolean getShadow()

public void setShadow(boolean value)
Gets or sets a value indicating whether the border has a shadow.

In Microsoft Word, for a border to have a shadow, the borders on all four sides (left, top, right and bottom) should be of the same type, width, color and all should have the Shadow property set to true.


Method Detail

clearFormatting

public void clearFormatting()
Resets border properties to default values. When border properties are reset to default values, the border is invisible.

deepClone

public Border deepClone()
                throws com.aspose.words.PleaseReportException, java.lang.CloneNotSupportedException
Reserved for internal use.

isInherited

public boolean isInherited()
Reserved for internal use.

See Also:
          Wiki - the home page for the Aspose.Words Product Documentation that includes Programmer's Guide, Knowledge Base and other articles.
          Aspose.Words Support Forum - our preferred method of support.
          Aspose.Words Team - contact Aspose.Words Team.


ASPOSE home