Browse Source

REPORT-62424 【模板主题】见附件截图,windows的主题配置中的整体预览图显示有点问题

feature/x
kerry 3 years ago
parent
commit
bb391c1135
  1. 12
      designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java
  2. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/preview/ReportThemePreviewPane.java

12
designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeDialog.java

@ -28,15 +28,14 @@ public abstract class TemplateThemeDialog extends JDialog {
private final JPanel contentContainer;
private final JPanel actionContainer;
private final int dialogContentHeight;
public TemplateThemeDialog(Window parent, String title, int contentWidth, int contentHeight) {
super(parent, ModalityType.APPLICATION_MODAL);
setTitle(title);
setResizable(false);
setLayout(FRGUIPaneFactory.createBorderLayout());
int dialogContentHeight = contentHeight + DIALOG_BOTTOM_ACTION_BAR_HEIGHT;
dialogContentHeight = contentHeight + DIALOG_BOTTOM_ACTION_BAR_HEIGHT;
int dialogWindowHeight = dialogContentHeight + DIALOG_TITLE_HEIGHT;
setSize(new Dimension(contentWidth, dialogWindowHeight));
@ -54,6 +53,12 @@ public abstract class TemplateThemeDialog extends JDialog {
setContentPane(contentContainer);
}
@Override
public void doLayout() {
this.setSize(new Dimension(this.getWidth(), dialogContentHeight + this.getInsets().top));
super.doLayout();
}
protected void setupContentPane() {
contentContainer.add(createContentPane(), BorderLayout.CENTER, 0);
}
@ -65,6 +70,7 @@ public abstract class TemplateThemeDialog extends JDialog {
protected UIButton[] createLeftButtons() {
return new UIButton[]{};
}
protected UIButton[] createRightButtons() {
return new UIButton[]{};
}

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

@ -45,8 +45,9 @@ public class ReportThemePreviewPane extends TemplateThemePreviewPane<ReportTheme
chartPreviewPane.populate(initColumnChart());
chartPreviewPane.setCallbackEvent(this);
reportPreviewPane = new ECReportPreviewPane();
this.add(reportPreviewPane, BorderLayout.CENTER);
this.add(chartPreviewPane, BorderLayout.SOUTH);
reportPreviewPane.setPreferredSize(new Dimension(615, 297));
this.add(reportPreviewPane, BorderLayout.NORTH);
this.add(chartPreviewPane, BorderLayout.CENTER);
}
@Override

Loading…
Cancel
Save