com.sygem.swing.renderers
Class GradientBackgroundRenderer

java.lang.Object
  extended bycom.sygem.swing.renderers.GradientBackgroundRenderer
All Implemented Interfaces:
BackgroundRenderer

public class GradientBackgroundRenderer
extends java.lang.Object
implements BackgroundRenderer

A simple background renderer - creates a smooth gradient between 2 colours.

Version:
1.0

Constructor Summary
GradientBackgroundRenderer(java.awt.Color color1, java.awt.Color color2)
          Constructor - sets up the two colors used in the gradient
 
Method Summary
 void renderBackground(java.awt.Component c, java.awt.Graphics2D g)
          Renders the smooth gradient to the passed in graphics context.
 void setColor1(java.awt.Color color1)
          Set the first color used in the gradient
 void setColor2(java.awt.Color color2)
          Set the second color used in the gradient
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GradientBackgroundRenderer

public GradientBackgroundRenderer(java.awt.Color color1,
                                  java.awt.Color color2)
Constructor - sets up the two colors used in the gradient

Parameters:
color1 - Color
color2 - Color
Method Detail

renderBackground

public void renderBackground(java.awt.Component c,
                             java.awt.Graphics2D g)
Renders the smooth gradient to the passed in graphics context.

Specified by:
renderBackground in interface BackgroundRenderer
Parameters:
c - The Category that is being rendered
g - The Graphics2D context to draw to

setColor1

public void setColor1(java.awt.Color color1)
Set the first color used in the gradient

Parameters:
color1 - Color

setColor2

public void setColor2(java.awt.Color color2)
Set the second color used in the gradient

Parameters:
color2 - Color


Copyright © 2004 SyGem Software. All Rights Reserved.