Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.eltima.chart
Class GradientModel

    java.lang.Object
      com.eltima.chart.GradientModel

All Implemented Interfaces:
  java.io.Serializable

    public class GradientModel

extends java.lang.Object
implements java.io.Serializable

The GradientModel class.

Copyright: Copyright (c) 2000-2007

Company: Eltima Software

Version:
  5.1
Author:
  [SoftInfinity Dpt.]
See Also:
  Serialized Form

Field Summary
`static int` | `DOWN` Down gradient direction.
`static int` | `LEFT_TO_RIGHT` Left to right gradient direction.
`static int` | `TOP_LEFT_TO_BOTTOM_RIGHT` Top left to bottom right gradient direction.
`static int` | `TOP_RIGHT_TO_BOTTOM_LEFT` Top right to bottom left gradient direction.

Constructor Summary
`GradientModel()` Creates new instance of GradientModel.
`GradientModel(java.awt.Color color1, java.awt.Color color2, int direction, int numberOfCycles)` Creates new instance of GradientModel with specified colors, direction and number of cycles.

Method Summary
`java.awt.Color` | `getColor1()` Returns first gradient color.
`java.awt.Color` | `getColor2()` Returns second gradient color.
`int` | `getDirection()` Returns gradient direction.
`java.awt.GradientPaint` | `getGradientPaint(int x, int y, int w, int h)` Returns GradientPaint for specified rectangle coordinaties.
`int` | `getNumberOfCycles()` Returns gradient number of cycles.
`void` | `setColor1(java.awt.Color color1)` Sets first gradient color.
`void` | `setColor2(java.awt.Color color2)` Sets second gradient color.
`void` | `setDirection(int direction)` Sets gradient direction.
`void` | `setGradientPaint(java.awt.Graphics2D g2, int x, int y, int w, int h)` Sets GradientPaint for specified rectangle coordinaties.
`void` | `setGradientPaint(java.awt.Graphics2D g2, java.awt.Rectangle r)` Sets GradientPaint for specified rectangle.
`void` | `setNumberOfCycles(int numberOfCycles)` Sets gradient number of cycles.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DOWN

    public static final int DOWN

  Down gradient direction.

  See Also:
    Constant Field Values

### LEFT_TO_RIGHT

    public static final int LEFT_TO_RIGHT

  Left to right gradient direction.

  See Also:
    Constant Field Values

### TOP_LEFT_TO_BOTTOM_RIGHT

    public static final int TOP_LEFT_TO_BOTTOM_RIGHT

  Top left to bottom right gradient direction.

  See Also:
    Constant Field Values

### TOP_RIGHT_TO_BOTTOM_LEFT

    public static final int TOP_RIGHT_TO_BOTTOM_LEFT

  Top right to bottom left gradient direction.

  See Also:
    Constant Field Values

Constructor Detail

### GradientModel

    public GradientModel()

  Creates new instance of GradientModel.

### GradientModel

    public GradientModel(java.awt.Color color1,
                         java.awt.Color color2,
                         int direction,
                         int numberOfCycles)

  Creates new instance of GradientModel with specified colors, direction and number of cycles.

  Parameters:
    `color1` - Color
    `color2` - Color
    `direction` - int
    `numberOfCycles` - int

Method Detail

### getGradientPaint

    public java.awt.GradientPaint getGradientPaint(int x,
                                                   int y,
                                                   int w,
                                                   int h)

  Returns GradientPaint for specified rectangle coordinaties.

  Parameters:
    `x` - int
    `y` - int
    `w` - int
    `h` - int
  Returns:
    GradientPaint

### setGradientPaint

    public void setGradientPaint(java.awt.Graphics2D g2,
                                 int x,
                                 int y,
                                 int w,
                                 int h)

  Sets GradientPaint for specified rectangle coordinaties.

  Parameters:
    `g2` - Graphics2D
    `x` - int
    `y` - int
    `w` - int
    `h` - int

### setGradientPaint

    public void setGradientPaint(java.awt.Graphics2D g2,
                                 java.awt.Rectangle r)

  Sets GradientPaint for specified rectangle.

  Parameters:
    `g2` - Graphics2D
    `r` - Rectangle

### getColor1

    public java.awt.Color getColor1()

  Returns first gradient color.

  Returns:
    Color

### getColor2

    public java.awt.Color getColor2()

  Returns second gradient color.

  Returns:
    Color

### getDirection

    public int getDirection()

  Returns gradient direction.

  Returns:
    int

### getNumberOfCycles

    public int getNumberOfCycles()

  Returns gradient number of cycles.

  Returns:
    int

### setColor1

    public void setColor1(java.awt.Color color1)

  Sets first gradient color.

  Parameters:
    `color1` - Color

### setColor2

    public void setColor2(java.awt.Color color2)

  Sets second gradient color.

  Parameters:
    `color2` - Color

### setDirection

    public void setDirection(int direction)

  Sets gradient direction.

  Parameters:
    `direction` - DOWN, LEFT_TO_RIGHT, TOP_LEFT_TO_BOTTOM_RIGHT or TOP_RIGHT_TO_BOTTOM_LEFT.

### setNumberOfCycles

    public void setNumberOfCycles(int numberOfCycles)

  Sets gradient number of cycles.

  Parameters:
    `numberOfCycles` - int

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2007 Eltima Software. All Rights Reserved.