Browse Source

Pull request #5627: CHART-20374 && REPORT-57978 【主题切换】细节定制-模板背景-设置图片适应,左上角有奇怪的显示;【11.0】仪表盘标签、轴标签颜色自动控件截断显示

Merge in DESIGN/design from ~KERRY/design_10.0:release/11.0 to release/11.0

* commit '3fba57522082fb9d75209371325ffe61cf46f0d4':
  CHART-20374 && REPORT-57978 【主题切换】细节定制-模板背景-设置图片适应,左上角有奇怪的显示;【11.0】仪表盘标签、轴标签颜色自动控件截断显示
persist/11.0
kerry 3 years ago
parent
commit
d2891f944e
  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 javax.swing.JPanel;
import java.awt.Color; import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.Image; import java.awt.Image;
import java.awt.RenderingHints; import java.awt.RenderingHints;
@ -81,4 +82,12 @@ public abstract class TemplateThemePreviewPane<T extends TemplateTheme> extends
return null; 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.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
/** /**
@ -97,12 +96,7 @@ public class FormThemePreviewPane extends TemplateThemePreviewPane<FormTheme> {
} }
@Override protected void paintBackground(Graphics2D g2d) {
public void paintComponent(Graphics g) {
paintBackground((Graphics2D) g);
}
private void paintBackground(Graphics2D g2d) {
if (background == null) { if (background == null) {
background = ColorBackground.getInstance(Color.WHITE); 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.Graphics2D;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Graphics;
import java.awt.geom.Rectangle2D; import java.awt.geom.Rectangle2D;
/** /**
@ -55,12 +54,9 @@ public class ReportThemePreviewPane extends TemplateThemePreviewPane<ReportTheme
chartPreviewPane.refresh(theme); chartPreviewPane.refresh(theme);
repaint(); repaint();
} }
@Override
public void paintComponent(Graphics g) {
paintBackground((Graphics2D) g);
}
private void paintBackground(Graphics2D g2d) {
protected void paintBackground(Graphics2D g2d) {
if (background == null) { if (background == null) {
background = ColorBackground.getInstance(Color.WHITE); 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() { public Dimension getPreferredSize() {
return super.getPreferredSize(); Dimension dimension = super.getPreferredSize();
return new Dimension(dimension.width, dimension.height + BUTTON_HEIGHT);
} }
} }

Loading…
Cancel
Save