1074 |
Component p = parent; |
Component p = parent; |
1075 |
if (p != null) |
if (p != null) |
1076 |
return p.getFont(); |
return p.getFont(); |
1077 |
|
if (peer != null) |
1078 |
|
return peer.getGraphics().getFont(); |
1079 |
return null; |
return null; |
1080 |
} |
} |
1081 |
|
|
1736 |
if (peer != null) |
if (peer != null) |
1737 |
{ |
{ |
1738 |
Graphics gfx = peer.getGraphics(); |
Graphics gfx = peer.getGraphics(); |
1739 |
if (gfx != null) |
// Create peer for lightweights. |
1740 |
return gfx; |
if (gfx == null && parent != null) |
|
// create graphics for lightweight: |
|
|
Container parent = getParent(); |
|
|
if (parent != null) |
|
1741 |
{ |
{ |
1742 |
gfx = parent.getGraphics(); |
gfx = parent.getGraphics(); |
1743 |
Rectangle bounds = getBounds(); |
Rectangle bounds = getBounds(); |
1745 |
gfx.translate(bounds.x, bounds.y); |
gfx.translate(bounds.x, bounds.y); |
1746 |
return gfx; |
return gfx; |
1747 |
} |
} |
1748 |
|
gfx.setFont(font); |
1749 |
|
return gfx; |
1750 |
} |
} |
1751 |
return null; |
return null; |
1752 |
} |
} |