|
|
|
@ -12,6 +12,7 @@ import java.awt.Composite;
|
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.Graphics; |
|
|
|
|
import java.awt.Graphics2D; |
|
|
|
|
import java.awt.RenderingHints; |
|
|
|
|
import java.awt.image.BufferedImage; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -44,10 +45,14 @@ public class CellStylePreviewPane extends JPanel {
|
|
|
|
|
public void paint(Graphics g) { |
|
|
|
|
Graphics2D g2d = (Graphics2D) g; |
|
|
|
|
g.clearRect(0, 0, getWidth(), getHeight()); |
|
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
|
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); |
|
|
|
|
|
|
|
|
|
paintTransparentBackground(g2d, style); |
|
|
|
|
|
|
|
|
|
paintCellStyle(g2d, style); |
|
|
|
|
|
|
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); |
|
|
|
|
g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_OFF); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void paintTransparentBackground(Graphics2D g2d, Style style) { |
|
|
|
|