com.jgoodies.animation.components

Class CircleComponent


public final class CircleComponent
extends JComponent

A Swing component that paints a circle with a given center, radius and color.
Version:
$Revision: 1.1 $
Author:
Karsten Lentzsch

Constructor Summary

CircleComponent()
Constructs a CircleComponent.

Method Summary

void
paintComponent(Graphics g)
Paints the circle with anti-aliasing enabled.
void
setBounds(int x, int y, int w, int h)
Sets the bounds and center point.
void
setCenter(Point p)
void
setColor(Color color)
void
setRadius(int radius)

Constructor Details

CircleComponent

public CircleComponent()
Constructs a CircleComponent.

Method Details

paintComponent

public void paintComponent(Graphics g)
Paints the circle with anti-aliasing enabled.
Parameters:
g - the Graphics object to render on

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
Sets the bounds and center point.
Parameters:
x - the horizontal origin
y - the vertical origin
w - the width, the horizontal extent
h - the height, the vertical extent

setCenter

public void setCenter(Point p)

setColor

public void setColor(Color color)

setRadius

public void setRadius(int radius)

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