LineFormat

Inheritance: java.lang.Object, com.aspose.cells.FillFormat

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

Methods

MethodDescription
equals(Object obj)Determines whether this instance has the same value as another specified LineFormat object.
getBeginArrowheadLength()Gets the begin arrow length type of the line.
getBeginArrowheadStyle()Gets the begin arrow type of the line.
getBeginArrowheadWidth()Gets the begin arrow width type of the line.
getCapType()Specifies the ending caps.
getClass()
getCompoundType()Specifies the line compound type.
getDashStyle()Specifies the line dash type.
getEndArrowheadLength()Gets the end arrow length type of the line.
getEndArrowheadStyle()Gets the end arrow type of the line.
getEndArrowheadWidth()Gets the end arrow width type of the line.
getFillType()Gets fill type
getGradientColor1()Returns the gradient color 1 for the specified fill.
getGradientColor2()Returns the gradient color 2 for the specified fill.
getGradientColorType()Returns the gradient color type for the specified fill.
getGradientDegree()Returns the gradient degree for the specified fill.
getGradientFill()Gets getGradientFill() object.
getGradientStyle()Returns the gradient style for the specified fill.
getGradientVariant()Returns the gradient variant for the specified fill.
getImageData()Gets the picture image data.
getJoinType()Specifies the line join type.
getPattern()Represents an area’s display pattern.
getPatternFill()Gets getPatternFill() object.
getPictureFormatType()Gets the picture format type.
getPresetColor()Returns the gradient preset color for the specified fill.
getScale()Gets the picture format scale.
getSetType()Gets the fill format set type.
getSolidFill()Gets getSolidFill() object.
getTexture()Represents the texture type for the specified fill.
getTextureFill()Gets getTextureFill() object.
getTransparency()Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
getType()Gets the fill type.
getWeight()Gets the weight of the line in unit of points.
hashCode()Gets the hash code.
notify()
notifyAll()
setBeginArrowheadLength(int value)Sets the begin arrow length type of the line.
setBeginArrowheadStyle(int value)Sets the begin arrow type of the line.
setBeginArrowheadWidth(int value)Sets the begin arrow width type of the line.
setCapType(int value)Specifies the ending caps.
setCompoundType(int value)Specifies the line compound type.
setDashStyle(int value)Specifies the line dash type.
setEndArrowheadLength(int value)Sets the end arrow length type of the line.
setEndArrowheadStyle(int value)Sets the end arrow type of the line.
setEndArrowheadWidth(int value)Sets the end arrow width type of the line.
setFillType(int value)Sets fill type
setImageData(byte[] value)Sets the picture image data.
setJoinType(int value)Specifies the line join type.
setOneColorGradient(Color color, double degree, int style, int variant)Sets the specified fill to a one-color gradient.
setPattern(int value)Represents an area’s display pattern.
setPictureFormatType(int value)Sets the picture format type.
setPresetColorGradient(int presetColor, int style, int variant)Sets the specified fill to a preset-color gradient.
setScale(double value)Sets the picture format scale.
setSetType(int value)Gets the fill format set type.
setTexture(int value)Represents the texture type for the specified fill.
setTransparency(double value)Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
setTwoColorGradient(Color color1, Color color2, int style, int variant)Sets the specified fill to a two-color gradient.
setTwoColorGradient(Color color1, double transparency1, Color color2, double transparency2, int style, int variant)Sets the specified fill to a two-color gradient.
setType(int value)Sets the fill type.
setWeight(double value)Sets the weight of the line in unit of points.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object obj)

public boolean equals(Object obj)

Determines whether this instance has the same value as another specified LineFormat object.

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
         }

Parameters:

ParameterTypeDescription
objjava.lang.ObjectThe LineFormat object to compare with this instance.

Returns: boolean - 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.

getBeginArrowheadLength()

public int getBeginArrowheadLength()

Gets the begin arrow length type of the line.

See MsoArrowheadLength.

Example

         lineFmt.setBeginArrowheadLength(MsoArrowheadLength.LONG);

Returns: int

getBeginArrowheadStyle()

public int getBeginArrowheadStyle()

Gets the begin arrow type of the line.

See MsoArrowheadStyle.

Example

         lineFmt.setBeginArrowheadStyle(MsoArrowheadStyle.ARROW_OPEN);

Returns: int

getBeginArrowheadWidth()

public int getBeginArrowheadWidth()

Gets the begin arrow width type of the line.

See MsoArrowheadWidth.

Example

         lineFmt.setBeginArrowheadWidth(MsoArrowheadWidth.MEDIUM);

Returns: int

getCapType()

public int getCapType()

Specifies the ending caps.

See LineCapType.

Example

         lineFmt.setCapType(LineCapType.FLAT);

Returns: int

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCompoundType()

public int getCompoundType()

Specifies the line compound type.

See MsoLineStyle.

Example

         lineFmt.setCompoundType(MsoLineStyle.SINGLE);

Returns: int

getDashStyle()

public int getDashStyle()

Specifies the line dash type.

See MsoLineDashStyle.

Example

         lineFmt.setDashStyle(MsoLineDashStyle.SOLID);

Returns: int

getEndArrowheadLength()

public int getEndArrowheadLength()

Gets the end arrow length type of the line.

See MsoArrowheadLength.

Example

         lineFmt.setEndArrowheadLength(MsoArrowheadLength.LONG);

Returns: int

getEndArrowheadStyle()

public int getEndArrowheadStyle()

Gets the end arrow type of the line.

See MsoArrowheadStyle.

Example

         lineFmt.setEndArrowheadStyle(MsoArrowheadStyle.ARROW_OPEN);

Returns: int

getEndArrowheadWidth()

public int getEndArrowheadWidth()

Gets the end arrow width type of the line.

See MsoArrowheadWidth.

Example

         lineFmt.setEndArrowheadWidth(MsoArrowheadWidth.MEDIUM);

Returns: int

getFillType()

public int getFillType()

Gets fill type

See FillType.

Returns: int

getGradientColor1()

public Color getGradientColor1()

Returns the gradient color 1 for the specified fill.

Returns: Color

getGradientColor2()

public Color getGradientColor2()

Returns the gradient color 2 for the specified fill.

Remarks

Only when the gradient color type is GradientColorType.TwoColors, this property is meaningful.

Returns: Color

getGradientColorType()

public int getGradientColorType()

Returns the gradient color type for the specified fill.

See GradientColorType.

Returns: int

getGradientDegree()

public double getGradientDegree()

Returns the gradient degree for the specified fill. Only applies for Excel 2007.

Remarks

Can only be a value from 0.0 (dark) through 1.0 (light).

Returns: double

getGradientFill()

public GradientFill getGradientFill()

Gets getGradientFill() object.

Returns: GradientFill

getGradientStyle()

public int getGradientStyle()

Returns the gradient style for the specified fill.

See GradientStyleType.

Returns: int

getGradientVariant()

public int getGradientVariant()

Returns the gradient variant for the specified fill. Only applies for Excel 2007.

Remarks

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.

Returns: int

getImageData()

public byte[] getImageData()

Gets the picture image data.

Remarks

If the fill format is not custom texture format, returns null.

Returns: byte[]

getJoinType()

public int getJoinType()

Specifies the line join type.

See LineJoinType.

Example

         lineFmt.setJoinType(LineJoinType.ROUND);

Returns: int

getPattern()

public int getPattern()

Represents an area’s display pattern.

See FillPattern.

Returns: int

getPatternFill()

public PatternFill getPatternFill()

Gets getPatternFill() object.

Returns: PatternFill

getPictureFormatType()

public int getPictureFormatType()

Gets the picture format type.

See FillPictureType.

Returns: int

getPresetColor()

public int getPresetColor()

Returns the gradient preset color for the specified fill.

See GradientPresetType.

Returns: int

getScale()

public double getScale()

Gets the picture format scale.

Returns: double

getSetType()

public int getSetType()

Gets the fill format set type.

See FormatSetType.

Remarks

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.

Returns: int

getSolidFill()

public SolidFill getSolidFill()

Gets getSolidFill() object.

Returns: SolidFill

getTexture()

public int getTexture()

Represents the texture type for the specified fill.

See TextureType.

Returns: int

getTextureFill()

public TextureFill getTextureFill()

Gets getTextureFill() object.

Returns: TextureFill

getTransparency()

public double getTransparency()

Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).

Returns: double

getType()

public int getType()

Gets the fill type.

See FillType.

Remarks

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.

Returns: int

getWeight()

public double getWeight()

Gets the weight of the line in unit of points.

Example

         lineFmt.setWeight(2.0d);

Returns: double

hashCode()

public int hashCode()

Gets the hash code.

Example

         int hashCode = lineFmt.hashCode();

Returns: int -

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setBeginArrowheadLength(int value)

public void setBeginArrowheadLength(int value)

Sets the begin arrow length type of the line.

See MsoArrowheadLength.

Parameters:

ParameterTypeDescription
valueint

setBeginArrowheadStyle(int value)

public void setBeginArrowheadStyle(int value)

Sets the begin arrow type of the line.

See MsoArrowheadStyle.

Parameters:

ParameterTypeDescription
valueint

setBeginArrowheadWidth(int value)

public void setBeginArrowheadWidth(int value)

Sets the begin arrow width type of the line.

See MsoArrowheadWidth.

Parameters:

ParameterTypeDescription
valueint

setCapType(int value)

public void setCapType(int value)

Specifies the ending caps.

See LineCapType.

Parameters:

ParameterTypeDescription
valueint

setCompoundType(int value)

public void setCompoundType(int value)

Specifies the line compound type.

See MsoLineStyle.

Parameters:

ParameterTypeDescription
valueint

setDashStyle(int value)

public void setDashStyle(int value)

Specifies the line dash type.

See MsoLineDashStyle.

Parameters:

ParameterTypeDescription
valueint

setEndArrowheadLength(int value)

public void setEndArrowheadLength(int value)

Sets the end arrow length type of the line.

See MsoArrowheadLength.

Parameters:

ParameterTypeDescription
valueint

setEndArrowheadStyle(int value)

public void setEndArrowheadStyle(int value)

Sets the end arrow type of the line.

See MsoArrowheadStyle.

Parameters:

ParameterTypeDescription
valueint

setEndArrowheadWidth(int value)

public void setEndArrowheadWidth(int value)

Sets the end arrow width type of the line.

See MsoArrowheadWidth.

Parameters:

ParameterTypeDescription
valueint

setFillType(int value)

public void setFillType(int value)

Sets fill type

See FillType.

Parameters:

ParameterTypeDescription
valueint

setImageData(byte[] value)

public void setImageData(byte[] value)

Sets the picture image data.

Remarks

If the fill format is not custom texture format, returns null.

Parameters:

ParameterTypeDescription
valuebyte[]

setJoinType(int value)

public void setJoinType(int value)

Specifies the line join type.

See LineJoinType.

Parameters:

ParameterTypeDescription
valueint

setOneColorGradient(Color color, double degree, int style, int variant)

public void setOneColorGradient(Color color, double degree, int style, int variant)

Sets the specified fill to a one-color gradient. Only applies for Excel 2007.

Parameters:

ParameterTypeDescription
colorColorOne gradient color.
degreedoubleThe gradient degree. Can be a value from 0.0 (dark) through 1.0 (light).
styleintGradientStyleType. Gradient shading style.
variantintThe 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.

setPattern(int value)

public void setPattern(int value)

Represents an area’s display pattern.

See FillPattern.

Parameters:

ParameterTypeDescription
valueint

setPictureFormatType(int value)

public void setPictureFormatType(int value)

Sets the picture format type.

See FillPictureType.

Parameters:

ParameterTypeDescription
valueint

setPresetColorGradient(int presetColor, int style, int variant)

public void setPresetColorGradient(int presetColor, int style, int variant)

Sets the specified fill to a preset-color gradient. Only applies for Excel 2007.

Parameters:

ParameterTypeDescription
presetColorintGradientPresetType. Preset color type
styleintGradientStyleType. Gradient shading style.
variantintThe 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.

setScale(double value)

public void setScale(double value)

Sets the picture format scale.

Parameters:

ParameterTypeDescription
valuedouble

setSetType(int value)

public void setSetType(int value)

Gets the fill format set type.

See FormatSetType.

Remarks

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.

Parameters:

ParameterTypeDescription
valueint

setTexture(int value)

public void setTexture(int value)

Represents the texture type for the specified fill.

See TextureType.

Parameters:

ParameterTypeDescription
valueint

setTransparency(double value)

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).

Parameters:

ParameterTypeDescription
valuedouble

setTwoColorGradient(Color color1, Color color2, int style, int variant)

public void setTwoColorGradient(Color color1, Color color2, int style, int variant)

Sets the specified fill to a two-color gradient. Only applies for Excel 2007.

Parameters:

ParameterTypeDescription
color1ColorOne gradient color.
color2ColorTwo gradient color.
styleintGradientStyleType. Gradient shading style.
variantintThe 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(Color color1, double transparency1, Color color2, double transparency2, int style, int variant)

public void setTwoColorGradient(Color color1, double transparency1, Color color2, double transparency2, int style, int variant)

Sets the specified fill to a two-color gradient. Only applies for Excel 2007.

Parameters:

ParameterTypeDescription
color1ColorOne gradient color.
transparency1doubleThe degree of transparency of the color1 as a value from 0.0 (opaque) through 1.0 (clear).
color2ColorTwo gradient color.
transparency2doubleThe degree of transparency of the color2 as a value from 0.0 (opaque) through 1.0 (clear).
styleintGradientStyleType. Gradient shading style.
variantintThe 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.

setType(int value)

public void setType(int value)

Sets the fill type.

See FillType.

Remarks

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.

Parameters:

ParameterTypeDescription
valueint

setWeight(double value)

public void setWeight(double value)

Sets the weight of the line in unit of points.

Parameters:

ParameterTypeDescription
valuedouble

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int