|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IconPart
An IconPart is an object that makes up a piece of what's rendered on an Icon. It has a java.awt.Shape object that specifies what gets rendered, and it has a clipping shape that specifies how much of the shape gets rendered. The rendering attributes specify how the shape is colored, drawn, etc. The coordinates of the Shape objects used for the clip area and geometry are in relative coordinates, and should be thought of as percentage coordinates, on a scale from 1 to 100. The size of the Graphics object provided in the render method will dictate how large the part will actually be on the screen. If coordinates of the IconPart are greater than 100 or less than zero, that part will not appear on the icon. That may help with defining certain shapes to appear on the icon, however.
Method Summary | |
---|---|
java.lang.Object |
clone()
|
java.awt.Shape |
getClip()
Get a clip area for the IconPart. |
java.awt.Shape |
getGeometry()
Get the geometry for this IconPart. |
DrawingAttributes |
getRenderingAttributes()
Get the rendering attributes for this IconPart. |
void |
render(java.awt.Graphics g,
int width,
int height)
Have the IconPart render itself into the Graphic object for a given height and width. |
void |
render(java.awt.Graphics g,
int width,
int height,
DrawingAttributes appDA)
Have the IconPart render itself into the Graphic object for a given height and width. |
void |
setClip(java.awt.Shape clipArea)
Set a clip area for the IconPart to draw only certain parts of the geometry. |
void |
setGeometry(java.awt.Shape shape)
Set the geometry for this IconPart. |
void |
setRenderingAttributes(DrawingAttributes da)
Set the rendering attributes for this IconPart. |
Method Detail |
---|
void render(java.awt.Graphics g, int width, int height)
void render(java.awt.Graphics g, int width, int height, DrawingAttributes appDA)
void setClip(java.awt.Shape clipArea)
java.awt.Shape getClip()
void setGeometry(java.awt.Shape shape)
java.awt.Shape getGeometry()
void setRenderingAttributes(DrawingAttributes da)
DrawingAttributes getRenderingAttributes()
java.lang.Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |