src/share/classes/javax/swing/plaf/nimbus/SynthPainterImpl.java
Print this page
@@ -47,11 +47,11 @@
/**
* Paint the provided painter using the provided transform at the specified
* position and size. Handles if g is a non 2D Graphics by painting via a
* BufferedImage.
*/
- private void paint(Painter p, SynthContext ctx, Graphics g, int x, int y,
+ private void paint(Painter<Object> p, SynthContext ctx, Graphics g, int x, int y,
int w, int h, AffineTransform transform) {
if (p != null) {
if (g instanceof Graphics2D){
Graphics2D gfx = (Graphics2D)g;
if (transform!=null){
@@ -94,28 +94,29 @@
// for there being no way of turning off Nimbus background painting as
// basic components are all non-opaque by default.
Component c = ctx.getComponent();
Color bg = (c != null) ? c.getBackground() : null;
if (bg == null || bg.getAlpha() > 0){
- Painter backgroundPainter = style.getBackgroundPainter(ctx);
+
+ Painter<Object> backgroundPainter = style.getBackgroundPainter(ctx);
if (backgroundPainter != null) {
paint(backgroundPainter, ctx, g, x, y, w, h,transform);
}
}
}
private void paintForeground(SynthContext ctx, Graphics g, int x, int y,
int w, int h, AffineTransform transform) {
- Painter foregroundPainter = style.getForegroundPainter(ctx);
+ Painter<Object> foregroundPainter = style.getForegroundPainter(ctx);
if (foregroundPainter != null) {
paint(foregroundPainter, ctx, g, x, y, w, h,transform);
}
}
private void paintBorder(SynthContext ctx, Graphics g, int x, int y, int w,
int h, AffineTransform transform) {
- Painter borderPainter = style.getBorderPainter(ctx);
+ Painter<Object> borderPainter = style.getBorderPainter(ctx);
if (borderPainter != null) {
paint(borderPainter, ctx, g, x, y, w, h,transform);
}
}