Browse Source

Merge pull request #1212 in BA/design from ~PLOUGH/design:release/9.0 to release/9.0

* commit '4281202edffaac9ebd0ed78a05c1ab502025f678':
  无JIRA任务,代码规范
  REPORT-4421 改代码规范
  无JIRA任务,cpt无法切换到表单-超级链接面板错误
  REPORT-4421 以下参数未生成问题=>修复空指针错误=>调整代码
  REPORT-4421 以下参数未生成问题=>修复空指针错误
master
neil 7 years ago
parent
commit
49d7750f4e
  1. 4
      designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java
  2. 28
      designer_base/src/com/fr/design/mainframe/form/FormECDesignerProvider.java
  3. 2
      designer_form/src/com/fr/design/mainframe/JForm.java
  4. 23
      designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java

4
designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java

@ -229,8 +229,8 @@ public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extend
return conditionAttributesGroupPane;
}
public JPanel getHyperlinkPane() {
return DesignerContext.getDesignerFrame().getSelectedJTemplate().getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
public JPanel getHyperlinkPane(JTemplate jt) {
return jt.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
}

28
designer_base/src/com/fr/design/mainframe/form/FormECDesignerProvider.java

@ -6,6 +6,7 @@ import java.awt.image.BufferedImage;
import javax.swing.JComponent;
import com.fr.design.designer.TargetComponent;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef;
@ -13,78 +14,79 @@ import com.fr.form.FormElementCaseProvider;
public interface FormECDesignerProvider {
public static final String XML_TAG = "FormElementCaseDesigner";
String XML_TAG = "FormElementCaseDesigner";
/**
* 选中目标的 对应Menu
* @return 返回MenuDef数组.
*/
public MenuDef[] menus4Target();
MenuDef[] menus4Target();
/**
* 获取焦点
*/
public void requestFocus() ;
void requestFocus() ;
/**
* 工具栏菜单字体字号等
* @return 工具栏菜单数组
*/
public ToolBarDef[] toolbars4Target();
ToolBarDef[] toolbars4Target();
/**
* 表单的报表块的工具按钮复制剪切那行
* @return 工具按钮
*/
public JComponent[] toolBarButton4Form();
JComponent[] toolBarButton4Form();
/**
* 模板菜单
* @return 返回菜单
*/
public ShortCut[] shortcut4TemplateMenu();
ShortCut[] shortcut4TemplateMenu();
/**
*当前正在编辑的elementcase
* @return 当前正在编辑的elementcase
*/
public FormElementCaseProvider getEditingElementCase();
FormElementCaseProvider getEditingElementCase();
/**
* 右上角属性表
* @return 属性面板
*/
public JComponent getEastDownPane();
JComponent getEastDownPane();
/**
* 右下角控件树或者扩展属性
* @return 属性面板
*/
public JComponent getEastUpPane();
JComponent getEastUpPane();
/**
* 条件属性面板
* @return 属性面板
*/
public JComponent getConditionAttrPane();
JComponent getConditionAttrPane();
/**
* 超级链接面板
* @param jt 当前模板JForm
* @return 属性面板
*/
public JComponent getHyperlinkPane();
JComponent getHyperlinkPane(JTemplate jt);
/**
* 超级链接面板
* @return 属性面板
*/
public TargetComponent getEditingElementCasePane();
TargetComponent getEditingElementCasePane();
/**
* 获取当前ElementCase的缩略图
* @param elementCaseContainerSize 缩略图的大小
* @return
*/
public BufferedImage getElementCaseImage(Dimension elementCaseContainerSize);
BufferedImage getElementCaseImage(Dimension elementCaseContainerSize);
}

2
designer_form/src/com/fr/design/mainframe/JForm.java

@ -683,7 +683,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
EastRegionContainerPane.getInstance().replaceCellAttrPane(elementCaseDesign.getEastDownPane());
EastRegionContainerPane.getInstance().replaceCellElementPane(elementCaseDesign.getEastUpPane());
EastRegionContainerPane.getInstance().replaceConditionAttrPane(elementCaseDesign.getConditionAttrPane());
EastRegionContainerPane.getInstance().replaceHyperlinkPane(elementCaseDesign.getHyperlinkPane());
EastRegionContainerPane.getInstance().replaceHyperlinkPane(elementCaseDesign.getHyperlinkPane(this));
return;
}

23
designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java

@ -26,6 +26,9 @@ public class ParameterPropertyPane extends JPanel{
private static ParameterPropertyPane THIS;
private boolean isEditing = false;
private static final int HIDE_HEIGHT = 40;
private static final int PADDING_SMALL = 5;
private static final int PADDING_MIDDLE = 10;
private static final int PADDING_LARGE = 15;
public static final ParameterPropertyPane getInstance() {
if (THIS == null) {
@ -49,6 +52,10 @@ public class ParameterPropertyPane extends JPanel{
}
private ParameterPropertyPane() {
init();
}
private void init() {
toolbarPane = new ParameterToolBarPane();
BasicScrollPane basicScrollPane = new BasicScrollPane() {
@Override
@ -58,7 +65,7 @@ public class ParameterPropertyPane extends JPanel{
@Override
public void populateBean(Object ob) {
// do nothing
}
@Override
@ -67,16 +74,15 @@ public class ParameterPropertyPane extends JPanel{
}
};
JPanel scrollPaneWrapperInner = new JPanel(new BorderLayout());
scrollPaneWrapperInner.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 5));
scrollPaneWrapperInner.setBorder(BorderFactory.createEmptyBorder(0, PADDING_MIDDLE, PADDING_MIDDLE, PADDING_SMALL));
scrollPaneWrapperInner.add(basicScrollPane, BorderLayout.CENTER);
addParaPane = new JPanel(new BorderLayout());
addParaPane.add(scrollPaneWrapperInner, BorderLayout.CENTER);
addParaPane.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.SPLIT_LINE));
initParameterListener();
this.setLayout(new BorderLayout(0, 6));
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
this.setBorder(BorderFactory.createEmptyBorder(PADDING_MIDDLE, 0, PADDING_MIDDLE, 0));
this.add(addParaPane, BorderLayout.CENTER);
}
@ -90,8 +96,13 @@ public class ParameterPropertyPane extends JPanel{
return;
}
// 表单中,只有添加并选中参数面板时,才显示
boolean hideInJForm = DesignerContext.getDesignerFrame().getSelectedJTemplate() instanceof JForm &&
boolean hideInJForm;
try {
hideInJForm = DesignerContext.getDesignerFrame().getSelectedJTemplate() instanceof JForm &&
!(FormHierarchyTreePane.getInstance().getComponentTree().getSelectionPath().getLastPathComponent() instanceof XWParameterLayout);
} catch (NullPointerException ex) {
hideInJForm = true;
}
if (isVisible && toolbarPane.hasSelectedLabelItem() && !hideInJForm) {
addParaPane.setVisible(true);
this.setPreferredSize(null);
@ -105,7 +116,7 @@ public class ParameterPropertyPane extends JPanel{
private void setEditor(FormDesigner editor) {
if (formHierarchyTreePaneWrapper == null) {
formHierarchyTreePaneWrapper = new JPanel(new BorderLayout());
formHierarchyTreePaneWrapper.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 15));
formHierarchyTreePaneWrapper.setBorder(BorderFactory.createEmptyBorder(0, PADDING_MIDDLE, 0, PADDING_LARGE));
this.add(formHierarchyTreePaneWrapper, BorderLayout.SOUTH);
}
formHierarchyTreePaneWrapper.remove(FormHierarchyTreePane.getInstance());

Loading…
Cancel
Save