|
|
|
@ -3,13 +3,13 @@ package com.fr.design.cell;
|
|
|
|
|
import com.fr.base.NameStyle; |
|
|
|
|
import com.fr.base.ScreenResolution; |
|
|
|
|
import com.fr.base.Style; |
|
|
|
|
import com.fr.general.IOUtils; |
|
|
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
import java.awt.Image; |
|
|
|
|
import java.awt.Toolkit; |
|
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @author Starryi |
|
|
|
@ -18,7 +18,7 @@ import java.awt.Toolkit;
|
|
|
|
|
*/ |
|
|
|
|
public class CellStylePreviewPane extends JPanel { |
|
|
|
|
|
|
|
|
|
private static final Image transparentBackgroundImage = Toolkit.getDefaultToolkit().createImage(CellStylePreviewPane.class.getResource("/com/fr/design/images/transparent_background.png")); |
|
|
|
|
private static final BufferedImage transparentBackgroundImage = IOUtils.readImage("/com/fr/design/images/transparent_background.png"); |
|
|
|
|
private final float transparentBackgroundWidth; |
|
|
|
|
private final float transparentBackgroundHeight; |
|
|
|
|
private String paintText = "Report"; |
|
|
|
@ -38,7 +38,7 @@ public class CellStylePreviewPane extends JPanel {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void paintComponent(Graphics g) { |
|
|
|
|
public void paint(Graphics g) { |
|
|
|
|
Graphics2D g2d = (Graphics2D) g; |
|
|
|
|
int resolution = ScreenResolution.getScreenResolution(); |
|
|
|
|
|
|
|
|
|