Browse Source

REPORT-3163 合作开发9.0设计器=>条件属性=》表单部分

master
plough 7 years ago
parent
commit
34ae0c223d
  1. 16
      designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java
  2. 7
      designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java
  3. 6
      designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java
  4. 20
      designer/src/com/fr/design/present/ConditionAttributesGroupPane.java
  5. 6
      designer_base/src/com/fr/design/mainframe/form/FormECDesignerProvider.java
  6. 1
      designer_form/src/com/fr/design/mainframe/JForm.java

16
designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java

@ -76,7 +76,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
} else { } else {
// 条件属性 // 条件属性
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance(); ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(getEditingCellElement((CellSelection)editingSelection).getHighlightGroup()); conditionAttributesGroupPane.populate(ElementCasePaneDelegate.this);
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT);
EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance()); EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance());
@ -96,20 +96,6 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
}); });
} }
private TemplateCellElement getEditingCellElement(CellSelection cs) {
final ElementCasePane ePane = ElementCasePaneDelegate.this;
final TemplateElementCase tplEC = ePane.getEditingElementCase();
TemplateCellElement editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow());
if (editCellElement == null) {
editCellElement = new DefaultTemplateCellElement(cs.getColumn(), cs.getRow());
tplEC.addCellElement(editCellElement);
}
if (tplEC != null) {
SheetUtils.calculateDefaultParent(tplEC);
}
return editCellElement;
}
@Override @Override
protected boolean supportRepeatedHeaderFooter() { protected boolean supportRepeatedHeaderFooter() {
return true; return true;

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

@ -28,6 +28,7 @@ import com.fr.design.menu.MenuDef;
import com.fr.design.menu.NameSeparator; import com.fr.design.menu.NameSeparator;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.form.FormElementCaseProvider; import com.fr.form.FormElementCaseProvider;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
@ -222,6 +223,12 @@ public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extend
return elementCasePane.getEastDownPane(); return elementCasePane.getEastDownPane();
} }
public JPanel getConditionAttrPane() {
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(elementCasePane);
return conditionAttributesGroupPane;
}
public JPanel getHyperlinkPane() { public JPanel getHyperlinkPane() {
return DesignerContext.getDesignerFrame().getSelectedJTemplate().getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance()); return DesignerContext.getDesignerFrame().getSelectedJTemplate().getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
} }

6
designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java

@ -19,6 +19,7 @@ import com.fr.design.menu.KeySetUtils;
import com.fr.design.menu.MenuDef; import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.js.NameJavaScriptGroup; import com.fr.js.NameJavaScriptGroup;
import com.fr.page.ReportSettingsProvider; import com.fr.page.ReportSettingsProvider;
import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.elementcase.TemplateElementCase;
@ -37,10 +38,13 @@ public class FormElementCasePaneDelegate extends ElementCasePane<FormElementCase
public void selectionChanged(SelectionEvent e) { public void selectionChanged(SelectionEvent e) {
CellElementPropertyPane.getInstance().populate(FormElementCasePaneDelegate.this); CellElementPropertyPane.getInstance().populate(FormElementCasePaneDelegate.this);
QuickEditorRegion.getInstance().populate(getCurrentEditor()); QuickEditorRegion.getInstance().populate(getCurrentEditor());
// 超级链接
HyperlinkGroupPane hyperlinkGroupPane = DesignerContext.getDesignerFrame().getSelectedJTemplate(). HyperlinkGroupPane hyperlinkGroupPane = DesignerContext.getDesignerFrame().getSelectedJTemplate().
getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance()); getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
hyperlinkGroupPane.populate(FormElementCasePaneDelegate.this); hyperlinkGroupPane.populate(FormElementCasePaneDelegate.this);
// 条件属性
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(FormElementCasePaneDelegate.this);
// populateHyperLinkGroupPane(); // populateHyperLinkGroupPane();
} }

20
designer/src/com/fr/design/present/ConditionAttributesGroupPane.java

@ -5,15 +5,21 @@ import java.util.List;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.gui.controlpane.UIListControlPane; import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.design.condition.HighLightConditionAttributesPane; import com.fr.design.condition.HighLightConditionAttributesPane;
import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.grid.selection.CellSelection;
import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.cell.cellattr.highlight.DefaultHighlight; import com.fr.report.cell.cellattr.highlight.DefaultHighlight;
import com.fr.report.cell.cellattr.highlight.Highlight; import com.fr.report.cell.cellattr.highlight.Highlight;
import com.fr.report.cell.cellattr.highlight.HighlightGroup; import com.fr.report.cell.cellattr.highlight.HighlightGroup;
import com.fr.report.core.SheetUtils;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
public class ConditionAttributesGroupPane extends UIListControlPane { public class ConditionAttributesGroupPane extends UIListControlPane {
@ -44,6 +50,20 @@ public class ConditionAttributesGroupPane extends UIListControlPane {
return Inter.getLocText("Condition_Attributes"); return Inter.getLocText("Condition_Attributes");
} }
public void populate(ElementCasePane ePane) {
CellSelection cs = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase();
TemplateCellElement editCellElement = tplEC.getTemplateCellElement(cs.getColumn(), cs.getRow());
if (editCellElement == null) {
editCellElement = new DefaultTemplateCellElement(cs.getColumn(), cs.getRow());
tplEC.addCellElement(editCellElement);
}
SheetUtils.calculateDefaultParent(tplEC); // 不知道这行代码的作用,怕去掉之后会出问题,先放在这里
populate(editCellElement.getHighlightGroup());
}
/** /**
* Populate * Populate
*/ */

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

@ -62,6 +62,12 @@ public interface FormECDesignerProvider {
*/ */
public JComponent getEastUpPane(); public JComponent getEastUpPane();
/**
* 条件属性面板
* @return 属性面板
*/
public JComponent getConditionAttrPane();
/** /**
* 超级链接面板 * 超级链接面板
* @return 属性面板 * @return 属性面板

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

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

Loading…
Cancel
Save