Browse Source

Pull request #2785: REPORT-42125 被选中的按钮不显示

Merge in DESIGN/design from ~BJORN/design:release/10.0 to release/10.0

* commit 'be7653fc5c91bd8ee79d135de42bebe46abb93d3':
  REPORT-41858 被选中的按钮不显示
feature/big-screen
Bjorn 4 years ago
parent
commit
0f6519b3ea
  1. 1
      designer-base/src/main/java/com/fr/design/mainframe/predefined/ui/PredefinedStyleBlock.java
  2. 12
      designer-base/src/main/java/com/fr/design/mainframe/predefined/ui/preview/PredefinedStylePreviewPane.java

1
designer-base/src/main/java/com/fr/design/mainframe/predefined/ui/PredefinedStyleBlock.java

@ -96,6 +96,7 @@ public class PredefinedStyleBlock extends JPanel {
private void initPane(boolean supportEdit) { private void initPane(boolean supportEdit) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
PredefinedStylePreviewPane content = new PredefinedStylePreviewPane(0.387, 0.384); PredefinedStylePreviewPane content = new PredefinedStylePreviewPane(0.387, 0.384);
content.setParent(this);
content.setPreferredSize(new Dimension(200, 180)); content.setPreferredSize(new Dimension(200, 180));
UILabel label = new UILabel(previewObject.getStyleName()); UILabel label = new UILabel(previewObject.getStyleName());
label.setToolTipText(previewObject.getStyleName()); label.setToolTipText(previewObject.getStyleName());

12
designer-base/src/main/java/com/fr/design/mainframe/predefined/ui/preview/PredefinedStylePreviewPane.java

@ -39,6 +39,8 @@ public class PredefinedStylePreviewPane extends StyleSettingPreviewPane implemen
private int COLUMN_CHART_WIDTH = 517; private int COLUMN_CHART_WIDTH = 517;
private int COLUMN_CHART_HEIGHT = 300; private int COLUMN_CHART_HEIGHT = 300;
private JPanel parent;
public PredefinedStylePreviewPane() { public PredefinedStylePreviewPane() {
this(1.0, 1.0); this(1.0, 1.0);
} }
@ -53,6 +55,10 @@ public class PredefinedStylePreviewPane extends StyleSettingPreviewPane implemen
this.add(this.elementCasePreview); this.add(this.elementCasePreview);
} }
public void setParent(JPanel parent) {
this.parent = parent;
}
private JPanel initChartPreViewPane() { private JPanel initChartPreViewPane() {
columnChartPane = new ChartPreStylePreView(initVanColumnChart()); columnChartPane = new ChartPreStylePreView(initVanColumnChart());
columnChartPane.setPreferredSize(new Dimension(COLUMN_CHART_WIDTH, COLUMN_CHART_HEIGHT)); columnChartPane.setPreferredSize(new Dimension(COLUMN_CHART_WIDTH, COLUMN_CHART_HEIGHT));
@ -142,6 +148,10 @@ public class PredefinedStylePreviewPane extends StyleSettingPreviewPane implemen
@Override @Override
public void callback() { public void callback() {
this.repaint(); if (parent != null) {
parent.repaint();
} else {
this.repaint();
}
} }
} }

Loading…
Cancel
Save