diff --git a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java index 280a12067d..e84259fd86 100644 --- a/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java +++ b/designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java @@ -114,7 +114,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP FormWidgetDetailPane.getInstance(this)); if (!BaseUtils.isAuthorityEditing()) { ParameterPropertyPane parameterPropertyPane = ParameterPropertyPane.getInstance(this); - parameterPropertyPane.setAddParaPaneVisible(true); + parameterPropertyPane.refreshState(); EastRegionContainerPane.getInstance().addParameterPane(parameterPropertyPane); EastRegionContainerPane.getInstance().setParameterHeight(parameterPropertyPane.getPreferredSize().height); EastRegionContainerPane.getInstance().replaceWidgetSettingsPane( diff --git a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java index 28c912c368..9404964a63 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java @@ -45,7 +45,7 @@ public class ParameterPropertyPane extends JPanel{ revalidate(); } - public ParameterPropertyPane() { + private ParameterPropertyPane() { toolbarPane = new ParameterToolBarPane(); BasicScrollPane basicScrollPane = new BasicScrollPane() { @Override @@ -77,6 +77,11 @@ public class ParameterPropertyPane extends JPanel{ this.add(addParaPane, BorderLayout.CENTER); } + // 显示或隐藏添加参数面板 + public void refreshState() { + setAddParaPaneVisible(toolbarPane.hasSelectedLabelItem()); + } + public void setAddParaPaneVisible(boolean isVisible) { if (isVisible == addParaPane.isVisible()) { return; diff --git a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java index daac4c2db8..16fc6ce041 100644 --- a/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java +++ b/designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java @@ -82,6 +82,7 @@ public class ParameterToolBarPane extends BasicBeanPane { this.add(label); if (parameterArray.length == 0) { + ParameterPropertyPane.getInstance().refreshState(); this.setVisible(false); this.repaint(); return; @@ -102,6 +103,7 @@ public class ParameterToolBarPane extends BasicBeanPane { this.add(addAll); this.doLayout(); + ParameterPropertyPane.getInstance().refreshState(); this.repaint(); }