com.jgoodies.animation.renderer
Class FanRenderer

java.lang.Object
  extended by com.jgoodies.animation.renderer.FanRenderer
All Implemented Interfaces:
AnimationRenderer

public final class FanRenderer
extends java.lang.Object
implements AnimationRenderer

Paints two colored and often translucent fans that can be rotated.

Version:
$Revision: 1.1 $
Author:
Karsten Lentzsch
See Also:
FanAnimation, FanComponent

Constructor Summary
FanRenderer(com.jgoodies.animation.renderer.FanRenderer.Triangle[] triangles)
           
FanRenderer(int triangleCount, java.awt.Color baseColor)
           
 
Method Summary
static com.jgoodies.animation.renderer.FanRenderer.Triangle[] createSectors(int count, java.awt.Color baseColor)
           
 java.awt.geom.Point2D getOrigin()
           
 double getRotation()
           
 void render(java.awt.Graphics2D g2, int width, int height)
          Renders the animation on the specified graphics object using the given width and height.
 void setOrigin(java.awt.geom.Point2D origin)
           
 void setRotation(double rotation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FanRenderer

public FanRenderer(com.jgoodies.animation.renderer.FanRenderer.Triangle[] triangles)

FanRenderer

public FanRenderer(int triangleCount,
                   java.awt.Color baseColor)
Method Detail

createSectors

public static com.jgoodies.animation.renderer.FanRenderer.Triangle[] createSectors(int count,
                                                                                   java.awt.Color baseColor)

getOrigin

public java.awt.geom.Point2D getOrigin()

setOrigin

public void setOrigin(java.awt.geom.Point2D origin)

getRotation

public double getRotation()

setRotation

public void setRotation(double rotation)

render

public void render(java.awt.Graphics2D g2,
                   int width,
                   int height)
Description copied from interface: AnimationRenderer
Renders the animation on the specified graphics object using the given width and height.

Specified by:
render in interface AnimationRenderer
Parameters:
g2 - the graphics to render on
width - the used width of the render surface
height - the used height of the render surface


Copyright © 2001-2006 JGoodies Karsten Lentzsch. All Rights Reserved.