|
|
@ -251,7 +251,10 @@ public class CreateComponentAction extends UpdateAction { |
|
|
|
|
|
|
|
|
|
|
|
private Image componentToImage(Component comp, Rectangle rect) { |
|
|
|
private Image componentToImage(Component comp, Rectangle rect) { |
|
|
|
|
|
|
|
|
|
|
|
BufferedImage im = new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_RGB); |
|
|
|
BufferedImage im = new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_ARGB); |
|
|
|
|
|
|
|
Graphics2D g2d = (Graphics2D)im.getGraphics(); |
|
|
|
|
|
|
|
g2d.setColor(Color.WHITE); |
|
|
|
|
|
|
|
g2d.fillRect(0, 0 , rect.width, rect.height); |
|
|
|
comp.paint(im.getGraphics()); |
|
|
|
comp.paint(im.getGraphics()); |
|
|
|
return im; |
|
|
|
return im; |
|
|
|
} |
|
|
|
} |
|
|
@ -260,7 +263,7 @@ public class CreateComponentAction extends UpdateAction { |
|
|
|
private Image moduleToImage(Form form, ElementCaseEditor editor, Map<String, Object> parameterMap, Rectangle rect) { |
|
|
|
private Image moduleToImage(Form form, ElementCaseEditor editor, Map<String, Object> parameterMap, Rectangle rect) { |
|
|
|
|
|
|
|
|
|
|
|
if (editor == null) { |
|
|
|
if (editor == null) { |
|
|
|
return new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_RGB); |
|
|
|
return new BufferedImage((int) rect.getWidth(), (int) rect.getHeight(), BufferedImage.TYPE_INT_ARGB); |
|
|
|
} |
|
|
|
} |
|
|
|
FormElementCaseProvider provider = editor.getElementCase(); |
|
|
|
FormElementCaseProvider provider = editor.getElementCase(); |
|
|
|
provider.setName(editor.getWidgetName()); |
|
|
|
provider.setName(editor.getWidgetName()); |
|
|
|