Browse Source

CHART-20374 && REPORT-57978

【主题切换】细节定制-模板背景-设置图片适应,左上角有奇怪的显示;【11.0】仪表盘标签、轴标签颜色自动控件截断显示
fix-lag
kerry 3 years ago
parent
commit
3fba575220
  1. 9
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemePreviewPane.java
  2. 8
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/FormThemePreviewPane.java
  3. 8
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java
  4. 4
      designer-base/src/main/java/com/fr/design/style/color/ColorControlWindowWithAuto.java

9
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemePreviewPane.java

@ -8,6 +8,7 @@ import com.fr.log.FineLoggerFactory;
import javax.swing.JPanel;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
@ -81,4 +82,12 @@ public abstract class TemplateThemePreviewPane<T extends TemplateTheme> extends
return null;
}
@Override
public void paintComponent(Graphics g) {
g.clearRect(0, 0, 517, 532);
paintBackground((Graphics2D) g);
}
protected abstract void paintBackground(Graphics2D g);
}

8
designer-base/src/main/java/com/fr/design/mainframe/theme/preview/FormThemePreviewPane.java

@ -30,7 +30,6 @@ import java.awt.Graphics2D;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.geom.Rectangle2D;
/**
@ -97,12 +96,7 @@ public class FormThemePreviewPane extends TemplateThemePreviewPane<FormTheme> {
}
@Override
public void paintComponent(Graphics g) {
paintBackground((Graphics2D) g);
}
private void paintBackground(Graphics2D g2d) {
protected void paintBackground(Graphics2D g2d) {
if (background == null) {
background = ColorBackground.getInstance(Color.WHITE);
}

8
designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java

@ -23,7 +23,6 @@ import com.fr.plugin.chart.vanchart.VanChart;
import java.awt.Graphics2D;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.geom.Rectangle2D;
/**
@ -55,12 +54,9 @@ public class ReportThemePreviewPane extends TemplateThemePreviewPane<ReportTheme
chartPreviewPane.refresh(theme);
repaint();
}
@Override
public void paintComponent(Graphics g) {
paintBackground((Graphics2D) g);
}
private void paintBackground(Graphics2D g2d) {
protected void paintBackground(Graphics2D g2d) {
if (background == null) {
background = ColorBackground.getInstance(Color.WHITE);
}

4
designer-base/src/main/java/com/fr/design/style/color/ColorControlWindowWithAuto.java

@ -114,8 +114,10 @@ public abstract class ColorControlWindowWithAuto extends ColorControlWindow {
}
}
@Override
public Dimension getPreferredSize() {
return super.getPreferredSize();
Dimension dimension = super.getPreferredSize();
return new Dimension(dimension.width, dimension.height + BUTTON_HEIGHT);
}
}

Loading…
Cancel
Save