Browse Source

REPORT-6645 参数面板里的bug2

master
plough 7 years ago
parent
commit
643a6bb051
  1. 5
      designer-form/src/com/fr/design/designer/creator/XWParameterLayout.java
  2. 3
      designer-form/src/com/fr/design/mainframe/JForm.java
  3. 12
      designer-form/src/com/fr/design/parameter/ParameterPropertyPane.java

5
designer-form/src/com/fr/design/designer/creator/XWParameterLayout.java

@ -232,4 +232,9 @@ public class XWParameterLayout extends XWAbsoluteLayout {
return false; return false;
} }
@Override
public boolean supportInnerOrderChangeActions() {
return false;
}
} }

3
designer-form/src/com/fr/design/mainframe/JForm.java

@ -741,9 +741,8 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM);
EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(WidgetPropertyPane.getInstance(formDesign)); EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(WidgetPropertyPane.getInstance(formDesign));
ParameterPropertyPane parameterPropertyPane = ParameterPropertyPane.getInstance(formDesign); ParameterPropertyPane parameterPropertyPane = ParameterPropertyPane.getInstance(formDesign);
parameterPropertyPane.setAddParaPaneVisible(false, this); parameterPropertyPane.refreshState(this);
EastRegionContainerPane.getInstance().addParameterPane(parameterPropertyPane); EastRegionContainerPane.getInstance().addParameterPane(parameterPropertyPane);
EastRegionContainerPane.getInstance().setParameterHeight(parameterPropertyPane.getPreferredSize().height);
refreshWidgetLibPane(); refreshWidgetLibPane();
} }

12
designer-form/src/com/fr/design/parameter/ParameterPropertyPane.java

@ -1,6 +1,7 @@
package com.fr.design.parameter; package com.fr.design.parameter;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -79,7 +80,7 @@ public class ParameterPropertyPane extends JPanel{
} }
}; };
JPanel scrollPaneWrapperInner = new JPanel(new BorderLayout()); JPanel scrollPaneWrapperInner = new JPanel(new BorderLayout());
scrollPaneWrapperInner.setBorder(BorderFactory.createEmptyBorder(0, PADDING_MIDDLE, PADDING_MIDDLE, PADDING_SMALL)); scrollPaneWrapperInner.setBorder(BorderFactory.createEmptyBorder(PADDING_MIDDLE, PADDING_MIDDLE, PADDING_MIDDLE, PADDING_SMALL));
scrollPaneWrapperInner.add(basicScrollPane, BorderLayout.CENTER); scrollPaneWrapperInner.add(basicScrollPane, BorderLayout.CENTER);
addParaPane = new JPanel(new BorderLayout()); addParaPane = new JPanel(new BorderLayout());
addParaPane.add(scrollPaneWrapperInner, BorderLayout.CENTER); addParaPane.add(scrollPaneWrapperInner, BorderLayout.CENTER);
@ -87,8 +88,8 @@ public class ParameterPropertyPane extends JPanel{
initParameterListener(); initParameterListener();
this.setLayout(new BorderLayout(0, 6)); this.setLayout(new BorderLayout(0, 6));
this.setBorder(BorderFactory.createEmptyBorder(PADDING_MIDDLE, 0, PADDING_MIDDLE, 0)); this.setBorder(BorderFactory.createEmptyBorder(0, 0, PADDING_MIDDLE, 0));
this.add(addParaPane, BorderLayout.CENTER); this.add(addParaPane, BorderLayout.NORTH);
} }
// 显示或隐藏添加参数面板 // 显示或隐藏添加参数面板
@ -119,8 +120,9 @@ public class ParameterPropertyPane extends JPanel{
// 表单中,只有添加并选中参数面板时,才显示 // 表单中,只有添加并选中参数面板时,才显示
boolean hideInJForm; boolean hideInJForm;
try { try {
XCreator creator = (XCreator) FormHierarchyTreePane.getInstance().getComponentTree().getSelectionPath().getLastPathComponent();
hideInJForm = jt instanceof JForm && hideInJForm = jt instanceof JForm &&
!(FormHierarchyTreePane.getInstance().getComponentTree().getSelectionPath().getLastPathComponent() instanceof XWParameterLayout); !(creator instanceof XWParameterLayout || creator.getParent() instanceof XWParameterLayout);
} catch (NullPointerException ex) { } catch (NullPointerException ex) {
hideInJForm = true; hideInJForm = true;
} }
@ -139,7 +141,7 @@ public class ParameterPropertyPane extends JPanel{
if (formHierarchyTreePaneWrapper == null) { if (formHierarchyTreePaneWrapper == null) {
formHierarchyTreePaneWrapper = new JPanel(new BorderLayout()); formHierarchyTreePaneWrapper = new JPanel(new BorderLayout());
formHierarchyTreePaneWrapper.setBorder(BorderFactory.createEmptyBorder(0, PADDING_MIDDLE, 0, 0)); formHierarchyTreePaneWrapper.setBorder(BorderFactory.createEmptyBorder(0, PADDING_MIDDLE, 0, 0));
this.add(formHierarchyTreePaneWrapper, BorderLayout.SOUTH); this.add(formHierarchyTreePaneWrapper, BorderLayout.CENTER);
} }
formHierarchyTreePaneWrapper.remove(FormHierarchyTreePane.getInstance()); formHierarchyTreePaneWrapper.remove(FormHierarchyTreePane.getInstance());
formHierarchyTreePaneWrapper.add(FormHierarchyTreePane.getInstance(editor), BorderLayout.CENTER); formHierarchyTreePaneWrapper.add(FormHierarchyTreePane.getInstance(editor), BorderLayout.CENTER);

Loading…
Cancel
Save