com.stimulsoft.base.drawing
Class StiGradientBrush

java.lang.Object
  extended by com.stimulsoft.base.drawing.StiBrush
      extended by com.stimulsoft.base.drawing.StiGradientBrush
All Implemented Interfaces:
IStiInvalidator, IStiSerializable, IStiSerializableToString, java.lang.Cloneable

public class StiGradientBrush
extends StiBrush

Class describes a gradient brush.


Field Summary
 double angle
           
 
Constructor Summary
StiGradientBrush()
          Creates a new instance of the StiGradientBrush class.
StiGradientBrush(StiColor startColor, StiColor endColor, double angle)
          Creates a new instance of the StiGradientBrush class.
 
Method Summary
 void deserialize(java.lang.String value)
          Десериализация объекта из строки.
 boolean equals(java.lang.Object obj)
           
 double getAngle()
          Gets or sets the angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
 StiColor getEndColor()
          Gets or sets the ending color for the gradient.
 java.awt.geom.Point2D getEndGradiendPoint()
           
 java.awt.Paint getPaint()
           
 StiRectangle getRectangle()
           
 StiColor getStartColor()
          Gets or sets the starting color for the gradient.
 java.awt.geom.Point2D getStartGradiendPoint()
           
 int hashCode()
           
 void LoadValuesFromJson(JSONObject jObject)
           
 java.lang.String serialize()
          Сериализация объекта в строку.
 void setAngle(double value)
           
 void setEndColor(StiColor value)
           
 void setEndGradiendPoint(java.awt.geom.Point2D endGradiendPoint)
           
 void setRectangle(StiRectangle rectangle)
           
 void setStartColor(StiColor value)
           
 void setStartGradiendPoint(java.awt.geom.Point2D startGradiendPoint)
           
 
Methods inherited from class com.stimulsoft.base.drawing.StiBrush
clone, dispose, getBrush, getInvalidator, getReference, invalidate, LoadFromJson, setInvalidator, setReference, ToColor
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

angle

public double angle
Constructor Detail

StiGradientBrush

public StiGradientBrush()
Creates a new instance of the StiGradientBrush class.


StiGradientBrush

public StiGradientBrush(StiColor startColor,
                        StiColor endColor,
                        double angle)
Creates a new instance of the StiGradientBrush class.

Parameters:
startColor - the starting color for the gradient.
endColor - The ending color for the gradient.
angle - The angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.
Method Detail

getStartColor

public final StiColor getStartColor()
Gets or sets the starting color for the gradient.


serialize

public java.lang.String serialize()
Description copied from interface: IStiSerializableToString
Сериализация объекта в строку.

Returns:
строковое представление объекта

deserialize

public void deserialize(java.lang.String value)
Description copied from interface: IStiSerializableToString
Десериализация объекта из строки. Все свойства объекта устанавливаются за счет распарсивания строки.


setStartColor

public final void setStartColor(StiColor value)

getEndColor

public final StiColor getEndColor()
Gets or sets the ending color for the gradient.


setEndColor

public final void setEndColor(StiColor value)

getAngle

public final double getAngle()
Gets or sets the angle, measured in degrees clockwise from the x-axis, of the gradient's orientation line.


setAngle

public final void setAngle(double value)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getPaint

public java.awt.Paint getPaint()
Returns:
the paint

getRectangle

public StiRectangle getRectangle()
Returns:
the rectangle

setRectangle

public void setRectangle(StiRectangle rectangle)
Parameters:
rectangle - the rectangle to set

getStartGradiendPoint

public java.awt.geom.Point2D getStartGradiendPoint()
Returns:
the startGradiendPoint

setStartGradiendPoint

public void setStartGradiendPoint(java.awt.geom.Point2D startGradiendPoint)
Parameters:
startGradiendPoint - the startGradiendPoint to set

getEndGradiendPoint

public java.awt.geom.Point2D getEndGradiendPoint()
Returns:
the endGradiendPoint

setEndGradiendPoint

public void setEndGradiendPoint(java.awt.geom.Point2D endGradiendPoint)
Parameters:
endGradiendPoint - the endGradiendPoint to set

LoadValuesFromJson

public void LoadValuesFromJson(JSONObject jObject)
                        throws JSONException
Throws:
JSONException