com.sygem.swing.renderers
Class VerticalBackgroundRenderer

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

public class VerticalBackgroundRenderer
extends java.lang.Object
implements BackgroundRenderer

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

Version:
1.0

Constructor Summary
VerticalBackgroundRenderer(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

VerticalBackgroundRenderer

public VerticalBackgroundRenderer(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.