|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.wordpress.tipsforjava.swing.RotatedIcon
public class RotatedIcon extends Object
The RotatedIcon allows you to change the orientation of an Icon by rotating the Icon before it is painted. This class supports the following orientations:
| Nested Class Summary | |
|---|---|
enum |
RotatedIcon.Rotate
|
| Field Summary | |
|---|---|
private double |
angle
|
private Icon |
icon
The RotatedIcon allows you to change the orientation of an Icon by rotating the Icon before it is painted. |
private RotatedIcon.Rotate |
rotate
|
| Constructor Summary | |
RotatedIcon(Icon icon)
Convenience constructor to create a RotatedIcon that is rotated DOWN. |
|
RotatedIcon(Icon icon, RotatedIcon.Rotate rotate)
Create a RotatedIcon |
|
RotatedIcon(Icon icon, double angle)
Create a RotatedIcon. |
|
| Method Summary | |
|---|---|
double
|
getAngle()
Gets the angle of rotation. |
Icon
|
getIcon()
Gets the Icon to be rotated |
int
|
getIconHeight()
Gets the height of this icon. |
int
|
getIconWidth()
Gets the width of this icon. |
RotatedIcon.Rotate
|
getRotate()
Gets the Rotate enum which indicates the direction of rotation |
void
|
paintIcon(Component c, Graphics g, int x, int y)
Paint the icons of this compound icon at the specified location |
RotatedIcon
|
valueOf(String name)
Returns the enum constant of this type with the specified name. |
RotatedIcon[]
|
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
private double angle
private Icon icon
private RotatedIcon.Rotate rotate
| Constructor Detail |
|---|
public RotatedIcon(Icon icon)
icon - the Icon to rotate
public RotatedIcon(Icon icon, RotatedIcon.Rotate rotate)
icon - the Icon to rotaterotate - the direction of rotation
public RotatedIcon(Icon icon, double angle)
icon - the Icon to rotateangle - the angle of rotation
| Method Detail |
|---|
public double getAngle()
public Icon getIcon()
de public int getIconHeight()
de public int getIconWidth()
public RotatedIcon.Rotate getRotate()
de public void paintIcon(Component c, Graphics g, int x, int y)
c - The component on which the icon is paintedg - the graphics contextx - the X coordinate of the icon's top-left cornery - the Y coordinate of the icon's top-left corner
RotatedIcon valueOf(String name)
RotatedIcon[] values()
Groovy Documentation