com.aspose.cells
Class LineFormat

java.lang.Object
  extended by FillFormat
      extended by com.aspose.cells.LineFormat

public class LineFormat 
extends FillFormat

Represents all setting of the line.

Example:

//Instantiating a Workbook object
Workbook workbook = new Workbook();
ShapeCollection shapes = workbook.getWorksheets().get(0).getShapes();
Shape shape = shapes.addRectangle(1, 0, 1, 0, 50, 100);
LineFormat lineFmt = shape.getLine();

//do your business


Property Getters/Setters Summary
intgetBeginArrowheadLength()
voidsetBeginArrowheadLength(int)
           Gets and sets the begin arrow length type of the line. The value of the property is MsoArrowheadLength integer constant.
intgetBeginArrowheadStyle()
voidsetBeginArrowheadStyle(int)
           Gets and sets the begin arrow type of the line. The value of the property is MsoArrowheadStyle integer constant.
intgetBeginArrowheadWidth()
voidsetBeginArrowheadWidth(int)
           Gets and sets the begin arrow width type of the line. The value of the property is MsoArrowheadWidth integer constant.
intgetCapType()
voidsetCapType(int)
           Specifies the ending caps. The value of the property is LineCapType integer constant.
intgetCompoundType()
voidsetCompoundType(int)
           Specifies the line compound type. The value of the property is MsoLineStyle integer constant.
intgetDashStyle()
voidsetDashStyle(int)
           Specifies the line dash type. The value of the property is MsoLineDashStyle integer constant.
intgetEndArrowheadLength()
voidsetEndArrowheadLength(int)
           Gets and sets the end arrow length type of the line. The value of the property is MsoArrowheadLength integer constant.
intgetEndArrowheadStyle()
voidsetEndArrowheadStyle(int)
           Gets and sets the end arrow type of the line. The value of the property is MsoArrowheadStyle integer constant.
intgetEndArrowheadWidth()
voidsetEndArrowheadWidth(int)
           Gets and sets the end arrow width type of the line. The value of the property is MsoArrowheadWidth integer constant.
intgetFillType()→ inherited from FillFormat
voidsetFillType(int)
           Gets and sets fill type The value of the property is FillType integer constant.
com.aspose.cells.ColorgetGradientColor1()→ inherited from FillFormat
           Returns the gradient color 1 for the specified fill.
com.aspose.cells.ColorgetGradientColor2()→ inherited from FillFormat
           Returns the gradient color 2 for the specified fill.
intgetGradientColorType()→ inherited from FillFormat
           Returns the gradient color type for the specified fill. The value of the property is GradientColorType integer constant.
doublegetGradientDegree()→ inherited from FillFormat
           Returns the gradient degree for the specified fill. Only applies for Excel 2007.
GradientFillgetGradientFill()→ inherited from FillFormat
           Gets GradientFill object.
intgetGradientStyle()→ inherited from FillFormat
           Returns the gradient style for the specified fill. The value of the property is GradientStyleType integer constant.
intgetGradientVariant()→ inherited from FillFormat
           Returns the gradient variant for the specified fill. Only applies for Excel 2007.
byte[]getImageData()→ inherited from FillFormat
voidsetImageData(byte[])
           Gets and sets the picture image data.
intgetJoinType()
voidsetJoinType(int)
           Specifies the line join type. The value of the property is LineJoinType integer constant.
intgetPattern()→ inherited from FillFormat
voidsetPattern(int)
           Represents an area's display pattern. The value of the property is FillPattern integer constant.
PatternFillgetPatternFill()→ inherited from FillFormat
           Gets PatternFill object.
intgetPictureFormatType()→ inherited from FillFormat
voidsetPictureFormatType(int)
           Gets and sets the picture format type. The value of the property is FillPictureType integer constant.
intgetPresetColor()→ inherited from FillFormat
           Returns the gradient preset color for the specified fill. The value of the property is GradientPresetType integer constant.
doublegetScale()→ inherited from FillFormat
voidsetScale(double)
           Gets and sets the picture format scale.
intgetSetType()→ inherited from FillFormat
voidsetSetType(int)
           Gets the fill format set type. The value of the property is FormatSetType integer constant.
SolidFillgetSolidFill()→ inherited from FillFormat
           Gets SolidFill object.
intgetTexture()→ inherited from FillFormat
voidsetTexture(int)
           Represents the texture type for the specified fill. The value of the property is TextureType integer constant.
TextureFillgetTextureFill()→ inherited from FillFormat
           Gets TextureFill object.
doublegetTransparency()→ inherited from FillFormat
voidsetTransparency(double)
           Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
intgetType()→ inherited from FillFormat
voidsetType(int)
           Gets and sets the fill type. The value of the property is FillType integer constant.
doublegetWeight()
voidsetWeight(double)
           Gets or sets the weight of the line in unit of points.
 
Method Summary
booleanequals(java.lang.Object obj)
           Determines whether this instance has the same value as another specified LineFormat object.
inthashCode()
           Gets the hash code.
voidsetOneColorGradient(com.aspose.cells.Color color, double degree, int style, int variant)→ inherited from FillFormat
           Sets the specified fill to a one-color gradient. Only applies for Excel 2007.
voidsetPresetColorGradient(int presetColor, int style, int variant)→ inherited from FillFormat
           Sets the specified fill to a preset-color gradient. Only applies for Excel 2007.
voidsetTwoColorGradient(com.aspose.cells.Color color1, com.aspose.cells.Color color2, int style, int variant)→ inherited from FillFormat
           Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
voidsetTwoColorGradient(com.aspose.cells.Color color1, double transparency1, com.aspose.cells.Color color2, double transparency2, int style, int variant)→ inherited from FillFormat
           Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
 

Property Getters/Setters Detail

getCompoundType/setCompoundType

public int getCompoundType() / public void setCompoundType(int value)
Specifies the line compound type. The value of the property is MsoLineStyle integer constant.

Example:

lineFmt.setCompoundType(MsoLineStyle.SINGLE);

setCompoundType

public void setCompoundType(int value)
Specifies the line compound type. The value of the property is MsoLineStyle integer constant.

Example:

lineFmt.setCompoundType(MsoLineStyle.SINGLE);

getDashStyle/setDashStyle

public int getDashStyle() / public void setDashStyle(int value)
Specifies the line dash type. The value of the property is MsoLineDashStyle integer constant.

Example:

lineFmt.setDashStyle(MsoLineDashStyle.SOLID);

setDashStyle

public void setDashStyle(int value)
Specifies the line dash type. The value of the property is MsoLineDashStyle integer constant.

Example:

lineFmt.setDashStyle(MsoLineDashStyle.SOLID);

getCapType/setCapType

public int getCapType() / public void setCapType(int value)
Specifies the ending caps. The value of the property is LineCapType integer constant.

Example:

lineFmt.setCapType(LineCapType.FLAT);

setCapType

public void setCapType(int value)
Specifies the ending caps. The value of the property is LineCapType integer constant.

Example:

lineFmt.setCapType(LineCapType.FLAT);

getJoinType/setJoinType

public int getJoinType() / public void setJoinType(int value)
Specifies the line join type. The value of the property is LineJoinType integer constant.

Example:

lineFmt.setJoinType(LineJoinType.ROUND);

setJoinType

public void setJoinType(int value)
Specifies the line join type. The value of the property is LineJoinType integer constant.

Example:

lineFmt.setJoinType(LineJoinType.ROUND);

getBeginArrowheadStyle/setBeginArrowheadStyle

public int getBeginArrowheadStyle() / public void setBeginArrowheadStyle(int value)
Gets and sets the begin arrow type of the line. The value of the property is MsoArrowheadStyle integer constant.

Example:

lineFmt.setBeginArrowheadStyle(MsoArrowheadStyle.ARROW_OPEN);

setBeginArrowheadStyle

public void setBeginArrowheadStyle(int value)
Gets and sets the begin arrow type of the line. The value of the property is MsoArrowheadStyle integer constant.

Example:

lineFmt.setBeginArrowheadStyle(MsoArrowheadStyle.ARROW_OPEN);

getBeginArrowheadWidth/setBeginArrowheadWidth

public int getBeginArrowheadWidth() / public void setBeginArrowheadWidth(int value)
Gets and sets the begin arrow width type of the line. The value of the property is MsoArrowheadWidth integer constant.

Example:

lineFmt.setBeginArrowheadWidth(MsoArrowheadWidth.MEDIUM);

setBeginArrowheadWidth

public void setBeginArrowheadWidth(int value)
Gets and sets the begin arrow width type of the line. The value of the property is MsoArrowheadWidth integer constant.

Example:

lineFmt.setBeginArrowheadWidth(MsoArrowheadWidth.MEDIUM);

getBeginArrowheadLength/setBeginArrowheadLength

public int getBeginArrowheadLength() / public void setBeginArrowheadLength(int value)
Gets and sets the begin arrow length type of the line. The value of the property is MsoArrowheadLength integer constant.

Example:

lineFmt.setBeginArrowheadLength(MsoArrowheadLength.LONG);

setBeginArrowheadLength

public void setBeginArrowheadLength(int value)
Gets and sets the begin arrow length type of the line. The value of the property is MsoArrowheadLength integer constant.

Example:

lineFmt.setBeginArrowheadLength(MsoArrowheadLength.LONG);

getEndArrowheadStyle/setEndArrowheadStyle

public int getEndArrowheadStyle() / public void setEndArrowheadStyle(int value)
Gets and sets the end arrow type of the line. The value of the property is MsoArrowheadStyle integer constant.

Example:

lineFmt.setEndArrowheadStyle(MsoArrowheadStyle.ARROW_OPEN);

setEndArrowheadStyle

public void setEndArrowheadStyle(int value)
Gets and sets the end arrow type of the line. The value of the property is MsoArrowheadStyle integer constant.

Example:

lineFmt.setEndArrowheadStyle(MsoArrowheadStyle.ARROW_OPEN);

getEndArrowheadWidth/setEndArrowheadWidth

public int getEndArrowheadWidth() / public void setEndArrowheadWidth(int value)
Gets and sets the end arrow width type of the line. The value of the property is MsoArrowheadWidth integer constant.

Example:

lineFmt.setEndArrowheadWidth(MsoArrowheadWidth.MEDIUM);

setEndArrowheadWidth

public void setEndArrowheadWidth(int value)
Gets and sets the end arrow width type of the line. The value of the property is MsoArrowheadWidth integer constant.

Example:

lineFmt.setEndArrowheadWidth(MsoArrowheadWidth.MEDIUM);

getEndArrowheadLength/setEndArrowheadLength

public int getEndArrowheadLength() / public void setEndArrowheadLength(int value)
Gets and sets the end arrow length type of the line. The value of the property is MsoArrowheadLength integer constant.

Example:

lineFmt.setEndArrowheadLength(MsoArrowheadLength.LONG);

setEndArrowheadLength

public void setEndArrowheadLength(int value)
Gets and sets the end arrow length type of the line. The value of the property is MsoArrowheadLength integer constant.

Example:

lineFmt.setEndArrowheadLength(MsoArrowheadLength.LONG);

getWeight/setWeight

public double getWeight() / public void setWeight(double value)
Gets or sets the weight of the line in unit of points.

Example:

lineFmt.setWeight(2.0d);

setWeight

public void setWeight(double value)
Gets or sets the weight of the line in unit of points.

Example:

lineFmt.setWeight(2.0d);

getType/setType

→ inherited from FillFormat
public int getType() / public void setType(int value)
Gets and sets the fill type. The value of the property is FillType integer constant. NOTE: This member is now obsolete. Instead, please use FillFormat.FillType property instead. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.

setType

→ inherited from FillFormat
public void setType(int value)
Gets and sets the fill type. The value of the property is FillType integer constant. NOTE: This member is now obsolete. Instead, please use FillFormat.FillType property instead. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.

getFillType/setFillType

→ inherited from FillFormat
public int getFillType() / public void setFillType(int value)
Gets and sets fill type The value of the property is FillType integer constant.

setFillType

→ inherited from FillFormat
public void setFillType(int value)
Gets and sets fill type The value of the property is FillType integer constant.

getTransparency/setTransparency

→ inherited from FillFormat
public double getTransparency() / public void setTransparency(double value)
Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).

setTransparency

→ inherited from FillFormat
public void setTransparency(double value)
Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).

getSetType/setSetType

→ inherited from FillFormat
public int getSetType() / public void setSetType(int value)
Gets the fill format set type. The value of the property is FormatSetType integer constant. NOTE: This member is now obsolete. Instead, please use FillFormat.FillType property instead. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.

setSetType

→ inherited from FillFormat
public void setSetType(int value)
Gets the fill format set type. The value of the property is FormatSetType integer constant. NOTE: This member is now obsolete. Instead, please use FillFormat.FillType property instead. This property will be removed 12 months later since July 2016. Aspose apologizes for any inconvenience you may have experienced.

getGradientFill

→ inherited from FillFormat
public GradientFill getGradientFill()
Gets GradientFill object.

getTextureFill

→ inherited from FillFormat
public TextureFill getTextureFill()
Gets TextureFill object.

getSolidFill

→ inherited from FillFormat
public SolidFill getSolidFill()
Gets SolidFill object.

getPatternFill

→ inherited from FillFormat
public PatternFill getPatternFill()
Gets PatternFill object.

getGradientColorType

→ inherited from FillFormat
public int getGradientColorType()
Returns the gradient color type for the specified fill. The value of the property is GradientColorType integer constant.

getGradientStyle

→ inherited from FillFormat
public int getGradientStyle()
Returns the gradient style for the specified fill. The value of the property is GradientStyleType integer constant.

getGradientColor1

→ inherited from FillFormat
public com.aspose.cells.Color getGradientColor1()
Returns the gradient color 1 for the specified fill.

getGradientColor2

→ inherited from FillFormat
public com.aspose.cells.Color getGradientColor2()
Returns the gradient color 2 for the specified fill. Only when the gradient color type is GradientColorType.TwoColors, this property is meaningful.

getGradientDegree

→ inherited from FillFormat
public double getGradientDegree()
Returns the gradient degree for the specified fill. Only applies for Excel 2007. Can only be a value from 0.0 (dark) through 1.0 (light).

getGradientVariant

→ inherited from FillFormat
public int getGradientVariant()
Returns the gradient variant for the specified fill. Only applies for Excel 2007. Can only be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.

getPresetColor

→ inherited from FillFormat
public int getPresetColor()
Returns the gradient preset color for the specified fill. The value of the property is GradientPresetType integer constant.

getTexture/setTexture

→ inherited from FillFormat
public int getTexture() / public void setTexture(int value)
Represents the texture type for the specified fill. The value of the property is TextureType integer constant.

setTexture

→ inherited from FillFormat
public void setTexture(int value)
Represents the texture type for the specified fill. The value of the property is TextureType integer constant.

getPattern/setPattern

→ inherited from FillFormat
public int getPattern() / public void setPattern(int value)
Represents an area's display pattern. The value of the property is FillPattern integer constant.

setPattern

→ inherited from FillFormat
public void setPattern(int value)
Represents an area's display pattern. The value of the property is FillPattern integer constant.

getPictureFormatType/setPictureFormatType

→ inherited from FillFormat
public int getPictureFormatType() / public void setPictureFormatType(int value)
Gets and sets the picture format type. The value of the property is FillPictureType integer constant.

setPictureFormatType

→ inherited from FillFormat
public void setPictureFormatType(int value)
Gets and sets the picture format type. The value of the property is FillPictureType integer constant.

getScale/setScale

→ inherited from FillFormat
public double getScale() / public void setScale(double value)
Gets and sets the picture format scale.

setScale

→ inherited from FillFormat
public void setScale(double value)
Gets and sets the picture format scale.

getImageData/setImageData

→ inherited from FillFormat
public byte[] getImageData() / public void setImageData(byte[] value)
Gets and sets the picture image data. If the fill format is not custom texture format, returns null.

setImageData

→ inherited from FillFormat
public void setImageData(byte[] value)
Gets and sets the picture image data. If the fill format is not custom texture format, returns null.

Method Detail

hashCode

public int hashCode()
Gets the hash code.
Returns:

Example:

int hashCode = lineFmt.hashCode();

equals

public boolean equals(java.lang.Object obj)
Determines whether this instance has the same value as another specified LineFormat object.
Parameters:
obj - The LineFormat object to compare with this instance.
Returns:
true if the value of the obj parameter is the same as the value of this instance; otherwise, false. If obj is null, this method returns false.

Example:

//You have to make sure that the index value in this line of code exists
LineFormat obj = workbook.getWorksheets().get(0).getShapes().get(0).getLine();
if (lineFmt.equals(obj))
{
    //do what you want
}

setOneColorGradient

→ inherited from FillFormat
public void setOneColorGradient(com.aspose.cells.Color color, double degree, int style, int variant)
Sets the specified fill to a one-color gradient. Only applies for Excel 2007.
Parameters:
color - One gradient color.
degree - The gradient degree. Can be a value from 0.0 (dark) through 1.0 (light).
style - A GradientStyleType value. Gradient shading style.
variant - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.

setTwoColorGradient

→ inherited from FillFormat
public void setTwoColorGradient(com.aspose.cells.Color color1, com.aspose.cells.Color color2, int style, int variant)
Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
Parameters:
color1 - One gradient color.
color2 - Two gradient color.
style - A GradientStyleType value. Gradient shading style.
variant - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.

setTwoColorGradient

→ inherited from FillFormat
public void setTwoColorGradient(com.aspose.cells.Color color1, double transparency1, com.aspose.cells.Color color2, double transparency2, int style, int variant)
Sets the specified fill to a two-color gradient. Only applies for Excel 2007.
Parameters:
color1 - One gradient color.
transparency1 - The degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear).
color2 - Two gradient color.
transparency2 - The degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear).
style - A GradientStyleType value. Gradient shading style.
variant - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.

setPresetColorGradient

→ inherited from FillFormat
public void setPresetColorGradient(int presetColor, int style, int variant)
Sets the specified fill to a preset-color gradient. Only applies for Excel 2007.
Parameters:
presetColor - A GradientPresetType value. Preset color type
style - A GradientStyleType value. Gradient shading style.
variant - The gradient variant. Can be a value from 1 through 4, corresponding to one of the four variants on the Gradient tab in the Fill Effects dialog box. If style is GradientStyle.FromCenter, the Variant argument can only be 1 or 2.

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