com.steema.teechart.drawing
Class Gradient

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.drawing.Gradient
All Implemented Interfaces:
java.io.Serializable

public class Gradient
extends TeeBase

Title: Gradient class

Description: Used to configure a gradient filling.

Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL

See Also:
Serialized Form

Field Summary
protected  boolean visible
           
 
Fields inherited from class com.steema.teechart.TeeBase
chart
 
Constructor Summary
Gradient()
           
Gradient(IBaseChart c)
           
 
Method Summary
 void assign(Gradient value)
          Copies the Gradient parameter properties into the Canvas.Gradient object.
 Color correctColor(Color value)
           
 void draw(IGraphics3D g, int left, int top, int right, int bottom)
          Obsolete.
 void draw(IGraphics3D g, Point[] p)
          Obsolete.
 void draw(IGraphics3D g, Rectangle rect)
          Obsolete.
 double getAngle()
          Enables fine-tuning of displayed Colors.
 Point[] getCustomTargetPolygon()
           
 GradientDirection getDirection()
          The direction the gradient fill to be applied.
 Color getEndColor()
          One of the three Colors used to create the gradient fill.
 Color getMiddleColor()
          One of the three Colors used to create the gradient fill.
 int getRadialX()
           
 int getRadialY()
           
 Color getStartColor()
          One of the three Colors used to create the gradient fill.
 int getTransparency()
          Amount of transparency in percentage.
 boolean getUseMiddle()
          Determines whether MiddleColor is used when creating the gradient fill, or not.
 boolean getVisible()
          Determines whether the gradient fill appears on screen.
 void setAngle(double value)
          Enables fine-tuning of displayed Colors.
 void setCustomTargetPolygon(Point[] value)
           
 void setDirection(GradientDirection value)
          Specifies the direction the gradient fill to be applied.
 void setEndColor(Color value)
          Specifies the end Color used to create the gradient fill.
 void setMiddleColor(Color value)
          Specifies the middle Color used to create the gradient fill.
 void setRadialX(int value)
           
 void setRadialY(int value)
           
 void setStartColor(Color value)
          Specifies the start Color used to create the gradient fill.
 void setTransparency(int value)
          Specifies the amount of transparency as a percentage.
 void setUseMiddle(boolean value)
          A MiddleColor is used when creating the gradient fill when true.
 void setVisible(boolean value)
          Determines whether the gradient fill appears on screen.
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setChart, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

visible

protected boolean visible
Constructor Detail

Gradient

public Gradient(IBaseChart c)

Gradient

public Gradient()
Method Detail

assign

public void assign(Gradient value)
Copies the Gradient parameter properties into the Canvas.Gradient object.

Parameters:
value - Gradient

getTransparency

public int getTransparency()
Amount of transparency in percentage.
Default value: 0

Returns:
int

setTransparency

public void setTransparency(int value)
Specifies the amount of transparency as a percentage.
Default value: 0

Parameters:
value - int

getAngle

public double getAngle()
Enables fine-tuning of displayed Colors.
Angle of gradient filling. When zero, uses Direction property.
Default value: O

Returns:
double

setAngle

public void setAngle(double value)
Enables fine-tuning of displayed Colors.
Default value: O

Parameters:
value - double

getDirection

public GradientDirection getDirection()
The direction the gradient fill to be applied.
Default value: GradientDirection.Vertical

Returns:
GradientDirection

setDirection

public void setDirection(GradientDirection value)
Specifies the direction the gradient fill to be applied.
Default value: GradientDirection.Vertical

Parameters:
value - GradientDirection

getStartColor

public Color getStartColor()
One of the three Colors used to create the gradient fill.
It is one of the three colors used to create the gradient fill. The gradient fill is composed of the three colors: StartColor, MidColor and EndColor.
Default value: GOLD

Returns:
Color

setStartColor

public void setStartColor(Color value)
Specifies the start Color used to create the gradient fill.
Default value: GOLD

Parameters:
value - Color

getUseMiddle

public boolean getUseMiddle()
Determines whether MiddleColor is used when creating the gradient fill, or not.
Default value: false

Returns:
boolean

setUseMiddle

public void setUseMiddle(boolean value)
A MiddleColor is used when creating the gradient fill when true.
Default value: false

Parameters:
value - boolean

getMiddleColor

public Color getMiddleColor()
One of the three Colors used to create the gradient fill.
The gradient fill is composed of the three colors: StartColor, MidColor and EndColor.
Default value: GRAY

Returns:
Color

setMiddleColor

public void setMiddleColor(Color value)
Specifies the middle Color used to create the gradient fill.
Default value: GRAY

Parameters:
value - Color

getEndColor

public Color getEndColor()
One of the three Colors used to create the gradient fill.
The gradient fill is composed of the three colors: StartColor, MidColor and EndColor.
Default value: WHITE

Returns:
Color

setEndColor

public void setEndColor(Color value)
Specifies the end Color used to create the gradient fill.
Default value: WHITE

Parameters:
value - Color

getVisible

public boolean getVisible()
Determines whether the gradient fill appears on screen.
Default value: false

Returns:
boolean

setVisible

public void setVisible(boolean value)
Determines whether the gradient fill appears on screen.
Default value: false

Parameters:
value - boolean

getRadialX

public int getRadialX()
Returns:
int

setRadialX

public void setRadialX(int value)
Parameters:
value - int

getRadialY

public int getRadialY()
Returns:
int

setRadialY

public void setRadialY(int value)
Parameters:
value - int

getCustomTargetPolygon

public Point[] getCustomTargetPolygon()

setCustomTargetPolygon

public void setCustomTargetPolygon(Point[] value)

correctColor

public Color correctColor(Color value)

draw

public void draw(IGraphics3D g,
                 int left,
                 int top,
                 int right,
                 int bottom)
Obsolete. Please use ChartBrush.getGradient() and Graphics3D.Rectangle methods. Fills the Canvas area using the Gradient color and direction properties.

Parameters:
g - IGraphics3D
left - int
top - int
right - int
bottom - int

draw

public void draw(IGraphics3D g,
                 Point[] p)
Obsolete. Please use ChartBrush.getGradient() and Graphics3D.Polygon methods. Fills the Canvas area using the Gradient color and direction properties.

Parameters:
g - IGraphics3D
p - Point[]

draw

public void draw(IGraphics3D g,
                 Rectangle rect)
Obsolete. Please use ChartBrush.getGradient() and Graphics3D.Rectangle methods. Fills the Canvas area using the Gradient color and direction properties.

Parameters:
g - IGraphics3D
rect - Rectangle