diff --git a/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java b/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java index 0b0f734751..ed51d0469f 100644 --- a/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java +++ b/designer-form/src/main/java/com/fr/design/widget/ui/designer/ButtonDefinePane.java @@ -48,19 +48,19 @@ public abstract class ButtonDefinePane extends AbstractDataMod labelNameTextField = new UITextField(); UILabel backgroundLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Base_Background")); backgroundLabel.setVerticalAlignment(SwingConstants.TOP); - initExtraPane(); + initAdvancedPane(); JPanel boundsPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); boundsPane.add(extraPane); UIExpandablePane advancedPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, boundsPane); this.add(advancedPane); } - private void initExtraPane() { + private void initAdvancedPane() { initPluginListener(); - refreshExtraAdvancedPane(); + refreshAdvancedPane(); } - private void refreshExtraAdvancedPane() { + private void refreshAdvancedPane() { extraPaneList.clear(); boolean containsExtraPane = false; Set> providers = ExtraDesignClassManager.getInstance().getArray(WidgetAdvancedPaneProvider.XML_TAG); @@ -71,12 +71,16 @@ public abstract class ButtonDefinePane extends AbstractDataMod insertShortCut(provider.getInsertPosition(extraPaneList.size()), provider.createExtraAdvancedPane()); containsExtraPane = true; } + refreshAdvancedPane(containsExtraPane); + } + + private void refreshAdvancedPane(boolean containsExtraPane) { double p = TableLayout.PREFERRED; double f = TableLayout.FILL; Component[] backgroundCompPane = createBackgroundComp(); Component[] frFont = createFontPane(); - double rowSize[]; - double columnSize[]; + double[] rowSize; + double[] columnSize; int[][] rowCount; Component[][] n_components; if (containsExtraPane) { @@ -116,7 +120,7 @@ public abstract class ButtonDefinePane extends AbstractDataMod GeneralContext.listenPluginRunningChanged(new PluginEventListener() { @Override public void on(PluginEvent event) { - refreshExtraAdvancedPane(); + refreshAdvancedPane(); } }, pluginContext -> pluginContext.getRuntime().contain(WidgetAdvancedPaneProvider.XML_TAG)); }