com.aspose.words
Class Border

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

public class Border 
extends InternableComplexAttr

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()
           Gets or sets the border color.
doublegetDistanceFromText()
voidsetDistanceFromText(double value)
           Gets or sets distance of the border from text or from the page edge in points.
booleanisVisible()
           Returns true if the LineStyle is not LineStyle.None.
intgetLineStyle()
voidsetLineStyle(int 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.
aspose.obfuscated.typedeepCloneComplexAttr()
          Reserved for internal use.
booleanequals(java.lang.Object obj)
           Determines whether the specified object is equal in value to the current object.
inthashCode()
           Serves as a hash function for this type.
booleanisInheritedComplexAttr()
          Reserved for internal use.
 

Property Getters/Setters Detail

getColor

public java.awt.Color getColor()
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 or from the page edge in points. Has no effect and will be automatically reset to zero for borders of table cells.
See Also:
PageSetup.BorderDistanceFrom

isVisible

public boolean isVisible()
Returns true if the LineStyle is not LineStyle.None.

getLineStyle/setLineStyle

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

If you set line style to none, then line width is automatically changed to zero.


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 when line style is none, the line style is automatically changed to single line.


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.

deepCloneComplexAttr

public aspose.obfuscated.type deepCloneComplexAttr()
Reserved for internal use.

equals

public boolean equals(java.lang.Object obj)
Determines whether the specified object is equal in value to the current object.

hashCode

public int hashCode()
Serves as a hash function for this type.

isInheritedComplexAttr

public boolean isInheritedComplexAttr()
Reserved for internal use.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.