com.sencha.gxt.chart.client.draw
Class Gradient

java.lang.Object
  extended by com.sencha.gxt.chart.client.draw.Color
      extended by com.sencha.gxt.chart.client.draw.Gradient

public class Gradient
extends Color

A color representing a linear gradient.


Field Summary
 
Fields inherited from class com.sencha.gxt.chart.client.draw.Color
NONE
 
Constructor Summary
Gradient(String id, double angle)
          Creates a gradient using the given id and angle.
 
Method Summary
 void addStop(int offset, Color color)
          Adds a stop to the gradient using the given offset and color.
 void addStop(Stop stop)
          Adds the given stop to the gradient.
 void clearStops()
          Removes all stops from the gradient.
 double getAngle()
          Returns the angle of the gradient.
 String getId()
          Returns the id of the gradient.
 List<Stop> getStops()
          Returns the stops of the gradient.
 void setAngle(double angle)
          Sets the angle of the gradient.
 void setId(String id)
          Sets the id of the gradient.
 
Methods inherited from class com.sencha.gxt.chart.client.draw.Color
getColor, setColor, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Gradient

public Gradient(String id,
                double angle)
Creates a gradient using the given id and angle.

Parameters:
id - the gradient id
angle - the angle of the gradient
Method Detail

addStop

public void addStop(int offset,
                    Color color)
Adds a stop to the gradient using the given offset and color.

Parameters:
offset - the offset of the stop
color - the color of the stop

addStop

public void addStop(Stop stop)
Adds the given stop to the gradient.

Parameters:
stop - the stop to be added

clearStops

public void clearStops()
Removes all stops from the gradient.


getAngle

public double getAngle()
Returns the angle of the gradient.

Returns:
the angle of the gradient

getId

public String getId()
Returns the id of the gradient.

Returns:
the id of the gradient

getStops

public List<Stop> getStops()
Returns the stops of the gradient.

Returns:
the stops of the gradient

setAngle

public void setAngle(double angle)
Sets the angle of the gradient.

Parameters:
angle - the new angle of the gradient

setId

public void setId(String id)
Sets the id of the gradient. Updates the color string with the new id.

Parameters:
id - the new id of the gradient


Copyright © 2011. All Rights Reserved.