return paint;\r
}\r
\r
+ @SuppressWarnings("unchecked")\r
private Paint createLinearGradientPaint(\r
Graphics2D graphics,\r
CTGradientFillProperties gradFill, Rectangle2D anchor,\r
// Trick to return GradientPaint on JDK 1.5 and LinearGradientPaint on JDK 1.6+\r
Paint paint;\r
try {\r
- Class clz = Class.forName("java.awt.LinearGradientPaint");\r
- Class clzCycleMethod = Class.forName("java.awt.MultipleGradientPaint$CycleMethod");\r
- Class clzColorSpaceType = Class.forName("java.awt.MultipleGradientPaint$ColorSpaceType");\r
- Constructor c =\r
+ Class<?> clz = Class.forName("java.awt.LinearGradientPaint");\r
+ @SuppressWarnings("rawtypes")\r
+ Class clzCycleMethod = Class.forName("java.awt.MultipleGradientPaint$CycleMethod");\r
+ @SuppressWarnings("rawtypes")\r
+ Class clzColorSpaceType = Class.forName("java.awt.MultipleGradientPaint$ColorSpaceType");\r
+ Constructor<?> c =\r
clz.getConstructor(Point2D.class, Point2D.class, float[].class, Color[].class,\r
clzCycleMethod, clzColorSpaceType, AffineTransform.class);\r
paint = (Paint) c.newInstance(p1, p2, fractions, colors,\r
// Trick to return GradientPaint on JDK 1.5 and RadialGradientPaint on JDK 1.6+\r
Paint paint;\r
try {\r
- Class clz = Class.forName("java.awt.RadialGradientPaint");\r
- Constructor c =\r
+ Class<?> clz = Class.forName("java.awt.RadialGradientPaint");\r
+ Constructor<?> c =\r
clz.getConstructor(Point2D.class, float.class,\r
float[].class, Color[].class);\r
paint = (Paint) c.newInstance(pCenter, radius, fractions, colors);\r