|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sk.uniba.euromath.gene.RenderingHints
public class RenderingHints
DRAFT - currently not used by the GENE framework.
When rendering, a renderer may give some hints (like pen style and color) to a child renderer. This object serves for transferring such information.
Child renderer may choose to ignore any (or all) of there parameters, especially when its data source requires it to do so.
The class may be overriden and renderers may use extended version with extra attributes to communicate with each other. Each renderer must be ready to understand this basic implementation though.
This class is immutable and should be kept immutable when creating successor classes.
Field Summary | |
---|---|
RGB |
backgroundColor
The background color. |
Font |
font
Current font. |
RGB |
foregroundColor
Current foreground color. |
boolean |
opaque
States whether the child renderer may draw freely on opaque background, or if it should avoid drawing a background. |
static RenderingHints |
ROOT_RENDERER_HINTS
Hints received by the root renderer. |
Constructor Summary | |
---|---|
RenderingHints(boolean opaque,
RGB backgroundColor,
RGB foregroundColor,
Font font)
Constructor. |
Method Summary |
---|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final boolean opaque
States whether the child renderer may draw freely on opaque background, or if it should avoid drawing a background.
If parent renderer draws its own background and wants the child renderer
to draw transparently it may set this property to false
.
In this case, child renderer should generally avoid for example filling
huge portions of canvas, unless specified by the datasource.
public final RGB backgroundColor
null
then no default color is
provided - child renderer should use its default foreground color.
public final RGB foregroundColor
null
then no default color is provided -
child renderer should use its default foreground color.
public final Font font
public static final RenderingHints ROOT_RENDERER_HINTS
Constructor Detail |
---|
public RenderingHints(boolean opaque, RGB backgroundColor, RGB foregroundColor, Font font)
opaque
- if true
then child should draw its own
background.backgroundColor
- current background color. If
opaque == false
it may be ignored.foregroundColor
- current foreground color.font
- current font.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |