Fix some Eclipse warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1674965 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
acfc276396
commit
dfe1c74dff
@ -167,6 +167,7 @@ class RenderableShape {
|
|||||||
return paint;
|
return paint;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
private Paint createLinearGradientPaint(
|
private Paint createLinearGradientPaint(
|
||||||
Graphics2D graphics,
|
Graphics2D graphics,
|
||||||
CTGradientFillProperties gradFill, Rectangle2D anchor,
|
CTGradientFillProperties gradFill, Rectangle2D anchor,
|
||||||
@ -224,10 +225,12 @@ class RenderableShape {
|
|||||||
// Trick to return GradientPaint on JDK 1.5 and LinearGradientPaint on JDK 1.6+
|
// Trick to return GradientPaint on JDK 1.5 and LinearGradientPaint on JDK 1.6+
|
||||||
Paint paint;
|
Paint paint;
|
||||||
try {
|
try {
|
||||||
Class clz = Class.forName("java.awt.LinearGradientPaint");
|
Class<?> clz = Class.forName("java.awt.LinearGradientPaint");
|
||||||
Class clzCycleMethod = Class.forName("java.awt.MultipleGradientPaint$CycleMethod");
|
@SuppressWarnings("rawtypes")
|
||||||
Class clzColorSpaceType = Class.forName("java.awt.MultipleGradientPaint$ColorSpaceType");
|
Class clzCycleMethod = Class.forName("java.awt.MultipleGradientPaint$CycleMethod");
|
||||||
Constructor c =
|
@SuppressWarnings("rawtypes")
|
||||||
|
Class clzColorSpaceType = Class.forName("java.awt.MultipleGradientPaint$ColorSpaceType");
|
||||||
|
Constructor<?> c =
|
||||||
clz.getConstructor(Point2D.class, Point2D.class, float[].class, Color[].class,
|
clz.getConstructor(Point2D.class, Point2D.class, float[].class, Color[].class,
|
||||||
clzCycleMethod, clzColorSpaceType, AffineTransform.class);
|
clzCycleMethod, clzColorSpaceType, AffineTransform.class);
|
||||||
paint = (Paint) c.newInstance(p1, p2, fractions, colors,
|
paint = (Paint) c.newInstance(p1, p2, fractions, colors,
|
||||||
@ -298,8 +301,8 @@ class RenderableShape {
|
|||||||
// Trick to return GradientPaint on JDK 1.5 and RadialGradientPaint on JDK 1.6+
|
// Trick to return GradientPaint on JDK 1.5 and RadialGradientPaint on JDK 1.6+
|
||||||
Paint paint;
|
Paint paint;
|
||||||
try {
|
try {
|
||||||
Class clz = Class.forName("java.awt.RadialGradientPaint");
|
Class<?> clz = Class.forName("java.awt.RadialGradientPaint");
|
||||||
Constructor c =
|
Constructor<?> c =
|
||||||
clz.getConstructor(Point2D.class, float.class,
|
clz.getConstructor(Point2D.class, float.class,
|
||||||
float[].class, Color[].class);
|
float[].class, Color[].class);
|
||||||
paint = (Paint) c.newInstance(pCenter, radius, fractions, colors);
|
paint = (Paint) c.newInstance(pCenter, radius, fractions, colors);
|
||||||
|
Loading…
Reference in New Issue
Block a user