|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcckit.renderer.GraphicsRenderer
Renderer who draws the GraphicalElements
into a java.awt.Graphics context.
The default color for lines and texts is determined by the current color of the Graphics context when a new instance of GraphicsRenderer is created.
The default font is SansSerif-12.
Constructor Summary | |
GraphicsRenderer()
|
Method Summary | |
void |
finishRendering(GraphicalComposite composite)
Finishes rendering of the specified composite. |
GraphicsRenderer |
init(java.awt.Graphics graphics,
java.awt.Component component,
Transformation transformation)
Initializes this instance. |
void |
render(Oval oval)
Paints the specified oval into the current Graphics context. |
void |
render(Polygon polygon)
Paints the specified polygon into the current Graphics context. |
void |
render(Rectangle rectangle)
Paints the specified rectangle into the current Graphics context. |
void |
render(Text text)
Paints the specified text into the current Graphics context. |
void |
startRendering(GraphicalComposite composite)
Starts rendering of the specified composite. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GraphicsRenderer()
Method Detail |
public GraphicsRenderer init(java.awt.Graphics graphics, java.awt.Component component, Transformation transformation)
graphics
- Graphics context into which the
BaiscGraphicalElements
are painted.component
- A component needed for creating off-screen images of
rotated texts.transformation
- Transformation from the device-independent
coordinates into pixel-based Java coordinates.
public void startRendering(GraphicalComposite composite)
ClippingShape
. In this case the
current Graphics context will be pushed onto a stack.
The new Graphics context is a clone of the current one
where the clipping rectangle is determined by the bounding box
of ClippingShape.
startRendering
in interface GraphicalCompositeRenderer
public void finishRendering(GraphicalComposite composite)
ClippingShape
. In this case the
Graphics context will be poped from the stack and will replace
the current one.
finishRendering
in interface GraphicalCompositeRenderer
public void render(Polygon polygon)
render
in interface PolygonRenderer
public void render(Rectangle rectangle)
render
in interface RectangleRenderer
public void render(Oval oval)
render
in interface OvalRenderer
public void render(Text text)
If the font size is zero the default font size will be used.
If the orientation angle is unequal zero the text will first be painted into an off-screen image and rotated. Finally, it will be drawn into the current Graphics context. Note, that only integer multiples of 90 degree rotation are performed. Other orientation angles will be adjusted to the nearest integer multiple of 90 degree.
render
in interface TextRenderer
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |