public final class NoBackground extends Object implements Background
| Modifier and Type | Field and Description |
|---|---|
static NoBackground |
NO_BACKGROUND
No background singleton to avoid creating several ones.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(GraphicsContext g,
int width,
int height)
Applies the background on a graphics context.
|
boolean |
isTransparent(int width,
int height)
Tells whether or not this background is transparent.
|
public static final NoBackground NO_BACKGROUND
public void apply(GraphicsContext g, int width, int height)
Backgroundapply in interface Backgroundg - the graphics context.width - the width of the background.height - the height of the background.public boolean isTransparent(int width,
int height)
BackgroundA background is considered as transparent if it does not draw every pixel with maximal opacity when it is applied. If a widget has a transparent background, its parent has to be rendered before the widget.
isTransparent in interface Backgroundwidth - the width of the background.height - the height of the background.true if the background is transparent, false otherwise.