com.jgoodies.animation.renderer

Class FanRenderer

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, Color baseColor)

Method Summary

static com.jgoodies.animation.renderer.FanRenderer.Triangle[]
createSectors(int count, Color baseColor)
Point2D
getOrigin()
double
getRotation()
void
render(Graphics2D g2, int width, int height)
Renders the animation on the specified graphics object using the given width and height.
void
setOrigin(Point2D origin)
void
setRotation(double rotation)

Constructor Details

FanRenderer

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

FanRenderer

public FanRenderer(int triangleCount,
                   Color baseColor)

Method Details

createSectors

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

getOrigin

public Point2D getOrigin()

getRotation

public double getRotation()

render

public void render(Graphics2D g2,
                   int width,
                   int height)
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

setOrigin

public void setOrigin(Point2D origin)

setRotation

public void setRotation(double rotation)

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