Browse Source

REPORT-41858 被选中的按钮不显示

feature/big-screen
白岳 4 years ago
parent
commit
be7653fc5c
  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) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
PredefinedStylePreviewPane content = new PredefinedStylePreviewPane(0.387, 0.384);
content.setParent(this);
content.setPreferredSize(new Dimension(200, 180));
UILabel label = new UILabel(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_HEIGHT = 300;
private JPanel parent;
public PredefinedStylePreviewPane() {
this(1.0, 1.0);
}
@ -53,6 +55,10 @@ public class PredefinedStylePreviewPane extends StyleSettingPreviewPane implemen
this.add(this.elementCasePreview);
}
public void setParent(JPanel parent) {
this.parent = parent;
}
private JPanel initChartPreViewPane() {
columnChartPane = new ChartPreStylePreView(initVanColumnChart());
columnChartPane.setPreferredSize(new Dimension(COLUMN_CHART_WIDTH, COLUMN_CHART_HEIGHT));
@ -142,6 +148,10 @@ public class PredefinedStylePreviewPane extends StyleSettingPreviewPane implemen
@Override
public void callback() {
this.repaint();
if (parent != null) {
parent.repaint();
} else {
this.repaint();
}
}
}

Loading…
Cancel
Save