diff --git a/designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java b/designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java index d566bbf98..af4bc8a9b 100644 --- a/designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java +++ b/designer-base/src/main/java/com/fr/design/cell/CellStylePreviewPane.java @@ -3,11 +3,7 @@ package com.fr.design.cell; import com.fr.base.NameStyle; import com.fr.base.ScreenResolution; import com.fr.base.Style; -import com.fr.design.mainframe.theme.TemplateThemeBlock; -import com.fr.general.IOUtils; -import javax.swing.Icon; -import javax.swing.JComponent; import javax.swing.JPanel; import java.awt.Dimension; import java.awt.Graphics; @@ -25,14 +21,12 @@ public class CellStylePreviewPane extends JPanel { private static final Image transparentBackgroundImage = Toolkit.getDefaultToolkit().createImage(CellStylePreviewPane.class.getResource("/com/fr/design/images/transparent_background.png")); private final float transparentBackgroundWidth; private final float transparentBackgroundHeight; - private final float transparentBackgroundAspect; private String paintText = "Report"; private Style style = Style.DEFAULT_STYLE; public CellStylePreviewPane() { transparentBackgroundWidth = transparentBackgroundImage.getWidth(null); transparentBackgroundHeight = transparentBackgroundImage.getHeight(null); - transparentBackgroundAspect = 1.0F * transparentBackgroundImage.getWidth(null) / transparentBackgroundImage.getHeight(null); } public void setStyle(Style style) { @@ -72,7 +66,7 @@ public class CellStylePreviewPane extends JPanel { Style.paintContent(g2d, paintText, style, width, height, resolution); - Style.paintBorder(g2d, style, getWidth() - 3, getHeight() - 3); + Style.paintBorder(g2d, style, width, height); } @Override