Browse Source

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

* commit 'dcce3eccb1d20acf4204b27c29800b6376af08e0':
  REPORT-3163 合作开发9.0设计器=>条件属性=》去掉原来的菜单项入口
  REPORT-3163 合作开发9.0设计器=>外框架遗留=》替换tab按钮icon
  REPORT-3163 合作开发9.0设计器=>条件属性=》聚合报表部分
  REPORT-3163 合作开发9.0设计器=>条件属性=》国际化
  REPORT-3163 合作开发9.0设计器=>条件属性=》实时保存,可撤销、重做
  REPORT-3163 合作开发9.0设计器=>外框架遗留=》默认隐藏顶部面板
  REPORT-3163 合作开发9.0设计器=>条件属性=》表单部分
  REPORT-3163 合作开发9.0设计器=>条件属性=》整合框架
master
superman 7 years ago
parent
commit
4dd8717c92
  1. 37
      designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java
  2. 25
      designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java
  3. 7
      designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java
  4. 6
      designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java
  5. 53
      designer/src/com/fr/design/present/ConditionAttributesGroupPane.java
  6. 1
      designer/src/com/fr/grid/selection/CellSelection.java
  7. 6
      designer/src/com/fr/poly/creator/ECBlockEditor.java
  8. 1
      designer/src/com/fr/poly/creator/ECBlockPane.java
  9. 39
      designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java
  10. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_disabled.png
  11. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_normal.png
  12. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_selected.png
  13. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_disabled.png
  14. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_normal.png
  15. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_selected.png
  16. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_disabled.png
  17. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_normal.png
  18. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_selected.png
  19. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_disabled.png
  20. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_normal.png
  21. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_selected.png
  22. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_disabled.png
  23. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_normal.png
  24. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_selected.png
  25. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_disabled.png
  26. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_normal.png
  27. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_selected.png
  28. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_disabled.png
  29. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_normal.png
  30. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_selected.png
  31. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_disabled.png
  32. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_normal.png
  33. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_selected.png
  34. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_diabled.png
  35. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_normal.png
  36. BIN
      designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_selected.png
  37. 1
      designer_base/src/com/fr/design/locale/designer.properties
  38. 1
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  39. 1
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  40. 1
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  41. 1
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  42. 1
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  43. 81
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  44. 6
      designer_base/src/com/fr/design/mainframe/form/FormECDesignerProvider.java
  45. 1
      designer_form/src/com/fr/design/mainframe/JForm.java

37
designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java

@ -1,37 +0,0 @@
/*
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved.
*/
package com.fr.design.actions.cell;
import com.fr.base.BaseUtils;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.design.dialog.BasicPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.report.cell.TemplateCellElement;
/**
* Condition Attributes.
*/
public class ConditionAttributesAction extends AbstractCellElementAction {
public ConditionAttributesAction(ElementCasePane t) {
super(t);
this.setMenuKeySet(KeySetUtils.CONDITION_ATTR);
this.setName(getMenuKeySet().getMenuKeySetName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_format/highlight.png"));
}
@Override
protected BasicPane populateBasicPane(TemplateCellElement cellElement) {
ConditionAttributesGroupPane pane = new ConditionAttributesGroupPane();
pane.populate(cellElement.getHighlightGroup());
return pane;
}
@Override
protected void updateBasicPane(BasicPane bp, TemplateCellElement cellElement) {
cellElement.setHighlightGroup(((ConditionAttributesGroupPane)bp).updateHighlightGroup());
}
}

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

@ -1,6 +1,16 @@
package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.design.fun.MenuHandler;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.general.Inter;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection;
import com.fr.page.ReportSettingsProvider;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.DesignState;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.cell.*;
@ -19,6 +29,11 @@ import com.fr.design.mainframe.cell.QuickEditorRegion;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef;
import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.core.SheetUtils;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.report.worksheet.WorkSheet;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.selection.SelectionEvent;
import com.fr.design.selection.SelectionListener;
@ -59,21 +74,26 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
QuickEditorRegion.getInstance().populate(getCurrentEditor());
JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (editingTemplate != null && !editingTemplate.isUpMode()) {
Selection editingSelection = ((ElementCasePaneDelegate)e.getSource()).getSelection();
// 模板初始化完成后,才能初始化超级链接面板
// HyperlinkGroupPane hyperlinkGroupPane = ReportHyperlinkGroupPane.getInstance(HyperlinkGroupPaneActionImpl.getInstance());
HyperlinkGroupPane hyperlinkGroupPane = editingTemplate.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
hyperlinkGroupPane.populate(ElementCasePaneDelegate.this);
if (((ElementCasePaneDelegate) e.getSource()).getSelection() instanceof FloatSelection) {
if (editingSelection instanceof FloatSelection) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_FLOAT);
JPanel floatPane = new JPanel(new BorderLayout());
floatPane.add(ReportFloatPane.getInstance(), BorderLayout.NORTH);
floatPane.add(QuickEditorRegion.getInstance(), BorderLayout.CENTER);
EastRegionContainerPane.getInstance().replaceFloatElementPane(floatPane);
} else {
// 条件属性
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(ElementCasePaneDelegate.this);
EastRegionContainerPane.getInstance().replaceFloatElementPane(ReportFloatPane.getInstance());
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT);
EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance());
EastRegionContainerPane.getInstance().replaceCellElementPane(QuickEditorRegion.getInstance());
EastRegionContainerPane.getInstance().replaceConditionAttrPane(conditionAttributesGroupPane);
}
EastRegionContainerPane.getInstance().replaceHyperlinkPane(hyperlinkGroupPane);
EastRegionContainerPane.getInstance().removeParameterPane();
@ -163,7 +183,6 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
menuDef.addShortCut(new CellExpandAttrAction());
menuDef.addShortCut(new CellWidgetAttrAction(this));
menuDef.addShortCut(new GlobalStyleMenuDef(this));
menuDef.addShortCut(new ConditionAttributesAction(this));
// 单元格形态
menuDef.addShortCut(DeprecatedActionManager.getPresentMenu(this));

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.ShortCut;
import com.fr.design.menu.ToolBarDef;
import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.form.FormElementCaseProvider;
import com.fr.general.Inter;
import com.fr.grid.selection.CellSelection;
@ -222,6 +223,12 @@ public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extend
return elementCasePane.getEastDownPane();
}
public JPanel getConditionAttrPane() {
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(elementCasePane);
return conditionAttributesGroupPane;
}
public JPanel getHyperlinkPane() {
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.ShortCut;
import com.fr.design.menu.ToolBarDef;
import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.js.NameJavaScriptGroup;
import com.fr.page.ReportSettingsProvider;
import com.fr.report.elementcase.TemplateElementCase;
@ -37,10 +38,13 @@ public class FormElementCasePaneDelegate extends ElementCasePane<FormElementCase
public void selectionChanged(SelectionEvent e) {
CellElementPropertyPane.getInstance().populate(FormElementCasePaneDelegate.this);
QuickEditorRegion.getInstance().populate(getCurrentEditor());
// 超级链接
HyperlinkGroupPane hyperlinkGroupPane = DesignerContext.getDesignerFrame().getSelectedJTemplate().
getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
hyperlinkGroupPane.populate(FormElementCasePaneDelegate.this);
// 条件属性
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(FormElementCasePaneDelegate.this);
// populateHyperLinkGroupPane();
}

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

@ -4,35 +4,86 @@ import java.util.ArrayList;
import java.util.List;
import com.fr.base.FRContext;
import com.fr.design.gui.controlpane.UIListControlPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.JTemplate;
import com.fr.general.NameObject;
import com.fr.design.condition.HighLightConditionAttributesPane;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator;
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.Highlight;
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;
public class ConditionAttributesGroupPane extends JListControlPane {
public class ConditionAttributesGroupPane extends UIListControlPane {
private static ConditionAttributesGroupPane singleton;
private TemplateCellElement editCellElement; // 当前单元格对象
private ConditionAttributesGroupPane() {
super();
}
public static ConditionAttributesGroupPane getInstance() {
if (singleton == null) {
singleton = new ConditionAttributesGroupPane();
}
return singleton;
}
@Override
public NameableCreator[] createNameableCreators() {
return new NameableCreator[] { new NameObjectCreator(Inter.getLocText("Condition_Attributes"), DefaultHighlight.class, HighLightConditionAttributesPane.class) };
}
@Override
public void saveSettings() {
if (isPopulating) {
return;
}
editCellElement.setHighlightGroup(updateHighlightGroup());
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified();
}
@Override
public String title4PopupWindow() {
return Inter.getLocText("Condition_Attributes");
}
@Override
public String getAddItemText() {
return Inter.getLocText("FR-Designer_Add_Condition");
}
public void populate(ElementCasePane ePane) {
CellSelection cs = (CellSelection) ePane.getSelection();
final TemplateElementCase tplEC = ePane.getEditingElementCase();
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
*/
public void populate(HighlightGroup highlightGroup) {
// marks这个必须放在前面,不论是否有高亮分组都可以操作
if (highlightGroup == null || highlightGroup.size() <= 0) {
this.populate(new NameObject[0]);
return;
}
List<NameObject> nameObjectList = new ArrayList<NameObject>();

1
designer/src/com/fr/grid/selection/CellSelection.java

@ -458,7 +458,6 @@ public class CellSelection extends Selection {
}
popup.add(new CellExpandAttrAction().createMenuItem());
popup.add(DeprecatedActionManager.getPresentMenu(ePane).createJMenu());
popup.add(new ConditionAttributesAction(ePane).createMenuItem());
popup.add(new CellAttributeAction().createMenuItem());
// cut, copy and paste
popup.addSeparator();

6
designer/src/com/fr/poly/creator/ECBlockEditor.java

@ -12,6 +12,7 @@ import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.mainframe.*;
import com.fr.design.mainframe.cell.QuickEditorRegion;
import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.grid.GridUtils;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection;
@ -32,7 +33,6 @@ import java.awt.*;
* @since 6.5.4 创建于2011-5-5 单元格类型的聚合块编辑器
*/
public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
private static final int HEIGHT_MORE = 5;
public ECBlockEditor(PolyDesigner designer, ECBlockCreator creator) {
@ -159,8 +159,12 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
EastRegionContainerPane.getInstance().replaceCellAttrPane(CellElementPropertyPane.getInstance());
// 超级链接
HyperlinkGroupPane hyperlinkGroupPane = DesignerContext.getDesignerFrame().getSelectedJTemplate()
.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
hyperlinkGroupPane.populate(editComponent);
// 条件属性
ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance();
conditionAttributesGroupPane.populate(editComponent);
}
}

1
designer/src/com/fr/poly/creator/ECBlockPane.java

@ -142,7 +142,6 @@ public class ECBlockPane extends PolyElementCasePane {
menuDef.addShortCut(new CellExpandAttrAction());
menuDef.addShortCut(new CellWidgetAttrAction(this));
menuDef.addShortCut(new GlobalStyleMenuDef(this));
menuDef.addShortCut(new ConditionAttributesAction(this));
// 单元格形态
menuDef.addShortCut(DeprecatedActionManager.getPresentMenu(this));

39
designer_base/src/com/fr/design/gui/controlpane/UIListControlPane.java

@ -3,6 +3,7 @@ package com.fr.design.gui.controlpane;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.data.tabledata.tabledatapane.GlobalMultiTDTableDataPane;
import com.fr.design.data.tabledata.tabledatapane.GlobalTreeTableDataPane;
@ -26,6 +27,7 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable;
import com.fr.stable.StringUtils;
import com.fr.stable.core.PropertyChangeAdapter;
import javax.swing.*;
@ -436,6 +438,43 @@ public abstract class UIListControlPane extends UIControlPane {
this.setSmallIcon(BaseUtils.readIcon("/com/fr/base/images/cell/control/add.png"));
}
/**
* Gets component on toolbar.
*
* @return the created components on toolbar.
*/
@Override
public JComponent createToolBarComponent() {
Object object = this.getValue(UIButton.class.getName());
if (!(object instanceof AbstractButton)) {
// 直接使用默认UI
UIButton button = new UIButton();
// 添加一个名字作为自动化测试用
button.setName(getName());
//设置属性.
Integer mnemonicInteger = (Integer) this.getValue(Action.MNEMONIC_KEY);
if (mnemonicInteger != null) {
button.setMnemonic((char) mnemonicInteger.intValue());
}
button.setIcon((Icon) this.getValue(Action.SMALL_ICON));
button.addActionListener(this);
button.registerKeyboardAction(this, this.getAccelerator(), JComponent.WHEN_IN_FOCUSED_WINDOW);
this.putValue(UIButton.class.getName(), button);
button.setText(StringUtils.EMPTY);
button.setEnabled(this.isEnabled());
//peter:产生tooltip
button.setToolTipText(ActionFactory.createButtonToolTipText(this));
object = button;
}
return (JComponent) object;
}
@Override
public void actionPerformed(ActionEvent e) {
Nameable nameable = creator.createNameable(UIListControlPane.this);

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/authorityedit_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellattr_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/cellelement_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/conditionattr_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/configuredroles_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/floatelement_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/hyperlink_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_disabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetlib_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_diabled.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_normal.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 B

BIN
designer_base/src/com/fr/design/images/buttonicon/propertiestab/widgetsettings_selected.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

1
designer_base/src/com/fr/design/locale/designer.properties

@ -2092,6 +2092,7 @@ FR-Designer_CellWrite_Show_As_HTML=CellWrite_Show_As_HTML
FR-Designer_Datasource_Other_Attributes=Other_Attributes
FR-Designer_Not_use_a_cell_attribute_table_editing=Not_use_a_cell_attribute_table_editing
FR-Designer_CellElement_Property_Table=CellElement_Property_Table
FR-Designer_Add_Condition=Add Condition
FR-Designer_Use_Params_Template=
FR-Designer_Label_Name=
FR-Designer_T_Insert_Float=Insert_Float

1
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -2093,6 +2093,7 @@ FR-Designer_CellWrite_Show_As_HTML=CellWrite_Show_As_HTML
FR-Designer_Datasource_Other_Attributes=Other_Attributes
FR-Designer_Not_use_a_cell_attribute_table_editing=Not_use_a_cell_attribute_table_editing
FR-Designer_CellElement_Property_Table=CellElement_Property_Table
FR-Designer_Add_Condition=Add Condition
FR-Designer_Use_Params_Template=use parameter template
FR-Designer_Label_Name=label name
FR-Designer_T_Insert_Float=Insert_Float

1
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -2074,6 +2074,7 @@ FR-Designer_CellWrite_Show_As_HTML=
FR-Designer_Datasource_Other_Attributes=
FR-Designer_Not_use_a_cell_attribute_table_editing=
FR-Designer_CellElement_Property_Table=
FR-Designer_Add_Condition=
FR-Designer_T_Insert_Float=
FR-Designer_Add_FloatElement=
FR-Designer_Insert_Image=

1
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -2073,6 +2073,7 @@ FR-Designer_CellWrite_Show_As_HTML=
FR-Designer_Datasource_Other_Attributes=
FR-Designer_Not_use_a_cell_attribute_table_editing=
FR-Designer_CellElement_Property_Table=
FR-Designer_Add_Condition=
FR-Designer_T_Insert_Float=
FR-Designer_Add_FloatElement=
FR-Designer_Insert_Image=

1
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -2092,6 +2092,7 @@ FR-Designer_CellWrite_Show_As_HTML=\u7528HTML\u663E\u793A\u5185\u5BB9
FR-Designer_Datasource_Other_Attributes=\u5176\u4ED6\u5C5E\u6027
FR-Designer_Not_use_a_cell_attribute_table_editing=\u60A8\u4E0D\u53EF\u4EE5\u7528\u5355\u5143\u683C\u5C5E\u6027\u8868\u7F16\u8F91
FR-Designer_CellElement_Property_Table=\u5355\u5143\u683C\u5C5E\u6027\u8868
FR-Designer_Add_Condition=\u6DFB\u52A0\u6761\u4EF6
FR-Designer_Use_Params_Template=\u4F7F\u7528\u5E38\u7528\u53C2\u6570\u7EC4\u5408
FR-Designer_Label_Name=\u6807\u7B7E\u540D\u79F0
FR-Designer_T_Insert_Float=\u63D2\u5165\u60AC\u6D6E\u5143\u7D20

1
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -2092,6 +2092,7 @@ FR-Designer_CellWrite_Show_As_HTML=
FR-Designer_Datasource_Other_Attributes=
FR-Designer_Not_use_a_cell_attribute_table_editing=
FR-Designer_CellElement_Property_Table=
FR-Designer_Add_Condition=
FR-Designer_T_Insert_Float=
FR-Designer_Add_FloatElement=
FR-Designer_Insert_Image=

81
designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java

@ -30,6 +30,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private FixedPopupPane currentPopupPane;
private static final int CONTAINER_WIDTH = 290;
private static final int TAB_WIDTH = 40;
private static final int TAB_BUTTON_WIDTH = 32;
private static final int CONTENT_WIDTH = CONTAINER_WIDTH - TAB_WIDTH;
private static final int POPUP_TOOLPANE_HEIGHT = 25;
private static final int ARROW_RANGE_START = CONTENT_WIDTH - 30;
@ -86,39 +87,39 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
propertyItemMap = new LinkedHashMap<>(); // 有序map
// 单元格元素
PropertyItem cellElement = new PropertyItem(KEY_CELL_ELEMENT, Inter.getLocText("FR-Designer_Cell_Element"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
"cellelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 单元格属性
PropertyItem cellAttr = new PropertyItem(KEY_CELL_ATTR, Inter.getLocText("FR-Designer_Cell_Attributes"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
"cellattr", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 悬浮元素
PropertyItem floatElement = new PropertyItem(KEY_FLOAT_ELEMENT, Inter.getLocText("FR-Designer_Float_Element"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
"floatelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.POLY_REPORT});
// 控件设置
PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, Inter.getLocText("FR-Designer-Widget_Settings"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY},
"widgetsettings", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.FORM, PropertyMode.POLY_REPORT, PropertyMode.POLY_CHART});
// 条件属性
PropertyItem conditionAttr = new PropertyItem(KEY_CONDITION_ATTR, Inter.getLocText("FR-Designer_Condition_Attributes"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
"conditionattr", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 超级链接
PropertyItem hyperlink = new PropertyItem(KEY_HYPERLINK, Inter.getLocText("FR-Designer_Hyperlink"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
"hyperlink", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 组件库
PropertyItem widgetLib = new PropertyItem(KEY_WIDGET_LIB, Inter.getLocText("FR-Designer_Widget_Library"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.FORM},
"widgetlib", new PropertyMode[]{PropertyMode.FORM},
new PropertyMode[]{PropertyMode.FORM});
// 权限编辑
PropertyItem authorityEdition = new PropertyItem(KEY_AUTHORITY_EDITION, Inter.getLocText("FR-Designer_Permissions_Edition"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.AUTHORITY_EDITION},
"authorityedit", new PropertyMode[]{PropertyMode.AUTHORITY_EDITION},
new PropertyMode[]{PropertyMode.AUTHORITY_EDITION});
// 已配置角色
PropertyItem configuredRoles = new PropertyItem(KEY_CONFIGURED_ROLES, Inter.getLocText("FR-Designer_Configured_Roles"),
"/com/fr/design/images/buttonicon/add.png", new PropertyMode[]{PropertyMode.AUTHORITY_EDITION},
"configuredroles", new PropertyMode[]{PropertyMode.AUTHORITY_EDITION},
new PropertyMode[]{PropertyMode.AUTHORITY_EDITION});
propertyItemMap.put(KEY_CELL_ELEMENT, cellElement);
@ -167,7 +168,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// 左侧按钮面板
private void initLeftPane() {
leftPane = new JPanel();
leftPane.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 0));
leftPane.setLayout(new VerticalFlowLayout(VerticalFlowLayout.TOP, 4, 4));
for (PropertyItem item : propertyItemMap.values()) {
if (item.isPoppedOut() || !item.isVisible()) {
continue;
@ -176,7 +177,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
// leftPane.setLayout(new BoxLayout(leftPane, BoxLayout.Y_AXIS));
leftPane.setBackground(new Color(210, 210, 210));
leftPane.setBackground(new Color(226, 226, 226));
replaceLeftPane(leftPane);
}
@ -268,6 +269,14 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
return propertyItemMap.get(KEY_WIDGET_SETTINGS).getContentPane();
}
public void replaceConditionAttrPane(JComponent pane) {
propertyItemMap.get(KEY_CONDITION_ATTR).replaceContentPane(pane);
}
public JComponent getConditionAttrPane() {
return propertyItemMap.get(KEY_CONDITION_ATTR).getContentPane();
}
public void replaceHyperlinkPane(JComponent pane) {
propertyItemMap.get(KEY_HYPERLINK).replaceContentPane(pane);
}
@ -388,6 +397,12 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
}
private void resetPropertyIcons() {
for (PropertyItem item : propertyItemMap.values()) {
item.resetButtonIcon();
}
}
class PropertyItem {
@ -408,10 +423,21 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private Set<PropertyMode> enableModes;
private static final int MAX_PARA_HEIGHT = 240;
public PropertyItem(String name, String title, String btnUrl, PropertyMode[] visibleModes, PropertyMode[] enableModes) {
// 完整icon路径为 ICON_BASE_DIR + btnIconName + iconSuffix
private static final String ICON_BASE_DIR = "/com/fr/design/images/buttonicon/propertiestab/";
private static final String ICON_SUFFIX_NORMAL = "_normal.png";
private static final String ICON_SUFFIX_DISABLED = "_disabled.png";
private static final String ICON_SUFFIX_SELECTED = "_selected.png";
private String btnIconName;
private String iconSuffix = ICON_SUFFIX_NORMAL; // normal, diabled, selected, 三者之一
private final Color selectedBtnBackground = new Color(240, 240, 240);
private Color originBtnBackground;
public PropertyItem(String name, String title, String btnIconName, PropertyMode[] visibleModes, PropertyMode[] enableModes) {
this.name = name;
this.title = title;
initButton(btnUrl);
this.btnIconName = btnIconName;
initButton();
initPropertyPanel();
// this.visibleModes = new ArrayList<PropertyMode>(visibleModes);
initModes(visibleModes, enableModes);
@ -458,6 +484,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
contentPane = generateContentPane();
popupToolPane = new PopupToolPane(this, PopupToolPane.DOWN_BUTTON);
headerPane = new JPanel();
headerPane.setPreferredSize(new Dimension(headerPane.getPreferredSize().width, 0)); // 默认隐藏
contentArea = new JPanel(new BorderLayout());
contentArea.add(headerPane, BorderLayout.NORTH);
contentArea.add(contentPane, BorderLayout.CENTER);
@ -533,14 +560,31 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// propertyPanel.repaint();
// propertyPanel.revalidate();
// }
private String getBtnIconUrl() {
return ICON_BASE_DIR + btnIconName + iconSuffix;
}
private void initButton(String btnUrl) {
button = new UIButton(BaseUtils.readIcon(btnUrl)) {
public void resetButtonIcon() {
if (iconSuffix.equals(ICON_SUFFIX_SELECTED)) {
iconSuffix = ICON_SUFFIX_NORMAL;
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(originBtnBackground);
button.setOpaque(false);
}
}
private void initButton() {
button = new UIButton(BaseUtils.readIcon(getBtnIconUrl())) {
public Dimension getPreferredSize() {
return new Dimension(TAB_WIDTH, TAB_WIDTH);
return new Dimension(TAB_BUTTON_WIDTH, TAB_BUTTON_WIDTH);
}
@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
}
};
button.set4LargeToolbarButton();
originBtnBackground = button.getBackground();
button.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -549,6 +593,11 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} else {
popupFixedPane();
}
resetPropertyIcons();
iconSuffix = ICON_SUFFIX_SELECTED;
button.setIcon(BaseUtils.readIcon(getBtnIconUrl()));
button.setBackground(selectedBtnBackground);
button.setOpaque(true);
}
});
}

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

@ -62,6 +62,12 @@ public interface FormECDesignerProvider {
*/
public JComponent getEastUpPane();
/**
* 条件属性面板
* @return 属性面板
*/
public JComponent getConditionAttrPane();
/**
* 超级链接面板
* @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().replaceCellAttrPane(elementCaseDesign.getEastDownPane());
EastRegionContainerPane.getInstance().replaceCellElementPane(elementCaseDesign.getEastUpPane());
EastRegionContainerPane.getInstance().replaceConditionAttrPane(elementCaseDesign.getConditionAttrPane());
EastRegionContainerPane.getInstance().replaceHyperlinkPane(elementCaseDesign.getHyperlinkPane());
return;
}

Loading…
Cancel
Save