|
|
@ -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); |
|
|
|