Browse Source

Merge pull request #3047 in DESIGN/design from feature/10.0 to research/10.0

* commit 'faf662f0cfd5f76a2f58280721f36d9abaacd766':
  REPORT-42240 【10.0.13】设计器里功能描述(表单、组件)优化
  代码质量
  REPORT-42240 【10.0.13】设计器里功能描述(表单、组件)优化
  REPORT-42240 【10.0.13】设计器里功能描述(表单、组件)优化
  REPORT-44784 复制tab块中的图表块到决定画布块中 移动端h5查看不应该有展开收起按钮
  REPORT-44596 下拉树控件-急速构建依赖层数自动变化
  REPORT-42240 【10.0.13】设计器里功能描述(表单、组件)优化
  REPORT-42240 【10.0.13】设计器里功能描述(表单、组件)优化
  REPORT-44390 alpha-fine搜索帮助文档,右侧不展示详细内容,只显示文档名称 改动:修改一下方法名
  update
  CHART-17231 默认不选中 无
  REPORT-44390 alpha-fine搜索帮助文档,右侧不展示详细内容,只显示文档名称 【问题原因】本地常用的逻辑有点问题,比如用户搜索"定时填报",关键词被解析成关键词组,遍历关键词组去搜索结果,但是搜索结果的逻辑里会将结果集先清空然后添加新的,然后把这个返回的结果又赋值给结果集合,这会不断刷新结果集合,导致返回结果只是关键词组中最后一个元素的搜索结果 【改动思路】在搜索结果的逻辑里,将清空结果集的逻辑去掉,放到更上层的遍历之前,这样就不是每一次遍历就清空结果集,而是用户每一次搜索才清空结果集,然后搜索结果的返回值也无须赋值给结果集,因为在搜索的时候已经添加到结果集中了
research/10.0
superman 4 years ago
parent
commit
7dd8063186
  1. 1
      designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java
  2. 34
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  3. 9
      designer-base/src/main/java/com/fr/design/mainframe/widget/BasicPropertyPane.java
  4. 3
      designer-base/src/main/java/com/fr/design/preview/FormPreview.java
  5. 5
      designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java
  6. 21
      designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java
  7. 10
      designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java
  8. 11
      designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java
  9. 6
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java
  10. 14
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java
  11. 7
      designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java

1
designer-base/src/main/java/com/fr/design/gui/frpane/tree/layer/config/LayerDependenceSettingPane.java

@ -142,6 +142,7 @@ public class LayerDependenceSettingPane extends JPanel implements ItemListener {
this.model.clear();
this.model.addAll(dependenceList);
this.model.fireTableDataChanged();
}

34
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -18,6 +18,7 @@ import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.GUIPaintUtils;
import com.fr.general.FRFont;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginRuntime;
import com.fr.plugin.injectable.PluginModule;
@ -100,14 +101,29 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
REPORT, // 报表
REPORT_PARA, // 报表参数面板
REPORT_FLOAT, // 报表悬浮元素
FORM, // 表单
FORM(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Settings")), // 表单
FORM_REPORT, // 表单报表块
POLY, // 聚合报表
POLY_REPORT, // 聚合报表-报表块
POLY_CHART, // 聚合报表-图表块
AUTHORITY_EDITION, // 权限编辑
AUTHORITY_EDITION_DISABLED // 权限编辑
AUTHORITY_EDITION_DISABLED; // 权限编辑
private String title;
PropertyMode() {
this.title = com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Settings");
}
PropertyMode(String title) {
this.title = title;
}
public String getTitle() {
return this.title;
}
}
private PropertyMode currentMode; // 当前模式(根据不同模式,显示不同的可用面板)
@ -400,6 +416,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private void updatePropertyItemMap() {
for (PropertyItem item : propertyItemMap.values()) {
item.updateStatus();
item.updateTitle();
}
}
@ -734,6 +751,19 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
}
}
public void updateTitle() {
try {
if (StringUtils.equals(KEY_WIDGET_SETTINGS, name)) {
title = currentMode.getTitle();
button.setToolTipText(title);
UILabel uiLabel = (UILabel) ((BorderLayout) popupToolPane.contentPane.getLayout()).getLayoutComponent(BorderLayout.WEST);
uiLabel.setText(title);
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
}
}
public void reAddContentArea() {
propertyPanel.add(contentArea, BorderLayout.CENTER);
}

9
designer-base/src/main/java/com/fr/design/mainframe/widget/BasicPropertyPane.java

@ -4,6 +4,7 @@ import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -56,20 +57,24 @@ public class BasicPropertyPane extends BasicPane {
}
}
};
widgetName.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"));
widgetName.setGlobalName(Toolkit.i18nText("Fine-Design_Report_Basic"));
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}};
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Name")), widgetName},
new Component[]{new UILabel(obtainBasicName()), widgetName},
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
this.add(panel, BorderLayout.NORTH);
}
public String obtainBasicName(){
return Toolkit.i18nText("Fine-Design_Basic_Component_Name");
}
public UITextField getWidgetNameField() {
return widgetName;
}

3
designer-base/src/main/java/com/fr/design/preview/FormPreview.java

@ -1,6 +1,7 @@
package com.fr.design.preview;
import com.fr.design.fun.impl.AbstractPreviewProvider;
import com.fr.design.i18n.Toolkit;
/**
@ -12,7 +13,7 @@ public class FormPreview extends AbstractPreviewProvider {
@Override
public String nameForPopupItem() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Form_Preview");
return Toolkit.i18nText("Fine-Design_Form_M_PC_Preview");
}
@Override

5
designer-base/src/main/java/com/fr/design/report/fit/menupane/ReportFitAttrAction.java

@ -4,6 +4,7 @@ import com.fr.design.actions.JTemplateAction;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.UIDialog;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.MenuKeySet;
@ -26,7 +27,7 @@ public class ReportFitAttrAction extends JTemplateAction {
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Template");
return Toolkit.i18nText("Fine-Designer_PC_Fit_Attr");
}
@Override
@ -42,7 +43,7 @@ public class ReportFitAttrAction extends JTemplateAction {
@Override
public String getMenuName() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Fit-Elementcase");
return Toolkit.i18nText("Fine-Designer_PC_Element_Case_Fit_Attr");
}
@Override

21
designer-base/src/main/java/com/fr/design/widget/WidgetBoundsPaneFactory.java

@ -4,6 +4,7 @@ import com.fr.design.designer.IntervalConstants;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
@ -25,8 +26,8 @@ public class WidgetBoundsPaneFactory {
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Size")), createRightPane(width, height)},
new Component[]{null, createRightPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))},
new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Basic_Component_Size")), createRightPane(width, height)},
new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))},
};
double[] rowSize = {p, p};
double[] columnSize = {f, RIGHT_PANE_WIDTH};
@ -34,7 +35,7 @@ public class WidgetBoundsPaneFactory {
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W5, IntervalConstants.INTERVAL_L6);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
boundsPane.add(panel);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane);
}
public static JPanel createRightPane(Component com1, Component com2){
double f = TableLayout.FILL;
@ -53,12 +54,12 @@ public class WidgetBoundsPaneFactory {
double p = TableLayout.PREFERRED;
Component[][] northComponents = new Component[][]{
new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Position")), createRightPane(x, y)},
new Component[]{null, createRightPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_X_Coordinate"), SwingConstants.CENTER), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Y_Coordinate"), SwingConstants.CENTER))},
new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Position")), createRightPane(x, y)},
new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_X_Coordinate"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Y_Coordinate"), SwingConstants.CENTER))},
};
Component[][] centerComponents = new Component[][]{
new Component[]{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Size")), createRightPane(width, height)},
new Component[]{null, createRightPane(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))},
new Component[]{FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Size")), createRightPane(width, height)},
new Component[]{null, createRightPane(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Width"), SwingConstants.CENTER), new UILabel(Toolkit.i18nText("Fine-Design_Basic_Tree_Height"), SwingConstants.CENTER))},
};
double[] rowSize = {p, p};
double[] columnSize = {f, RIGHT_PANE_WIDTH};
@ -70,7 +71,7 @@ public class WidgetBoundsPaneFactory {
centerPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
boundsPane.add(northPanel, BorderLayout.NORTH);
boundsPane.add(centerPanel, BorderLayout.CENTER);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 230, 24, boundsPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 230, 24, boundsPane);
}
@ -79,7 +80,7 @@ public class WidgetBoundsPaneFactory {
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Size")), width},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Component_Size")), width},
};
double[] rowSize = {p};
double[] columnSize = {p, f};
@ -87,6 +88,6 @@ public class WidgetBoundsPaneFactory {
final JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L6);
panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0));
boundsPane.add(panel);
return new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane);
return new UIExpandablePane(Toolkit.i18nText("Fine-Design_Form_Coords_And_Size"), 280, 24, boundsPane);
}
}

10
designer-chart/src/main/java/com/fr/extended/chart/UIComboBoxWithNone.java

@ -2,6 +2,8 @@ package com.fr.extended.chart;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.i18n.Toolkit;
import com.fr.general.GeneralUtils;
import com.fr.stable.StringUtils;
import java.util.List;
@ -17,6 +19,11 @@ public class UIComboBoxWithNone extends UIComboBox {
public UIComboBoxWithNone() {
super();
addDefaultItem();
setDefaultSelectedItem();
}
protected void setDefaultSelectedItem() {
setSelectedItem(StringUtils.EMPTY);
}
@Override
@ -43,7 +50,8 @@ public class UIComboBoxWithNone extends UIComboBox {
//找不到的都选中无。中文的无 英文下是none。
//改正:找不到的且anObject不是null的 全部选中无。
if (getSelectedIndex() == -1 && anObject != null) {
//改正:找不到的且anObject不是null的且anObject不是空字符串的 全部选中无。
if (getSelectedIndex() == -1 && StringUtils.isNotEmpty(GeneralUtils.objectToString(anObject))) {
super.setSelectedItem(getDefaultLocaleString());
}
}

11
designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormBasicWidgetPropertyPane.java

@ -1,9 +1,12 @@
package com.fr.design.mainframe.widget.ui;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.form.ui.Widget;
import javax.swing.BorderFactory;
import java.awt.Component;
/**
* Created by ibm on 2017/7/26.
@ -16,13 +19,17 @@ public class FormBasicWidgetPropertyPane extends BasicSetVisiblePropertyPane {
}
public UICheckBox createOtherConfig() {
enableCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Enabled"), true);
enableCheckBox.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"));
enableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enabled"), true);
enableCheckBox.setGlobalName(Toolkit.i18nText("Fine-Design_Report_Basic"));
enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
return enableCheckBox;
}
public String obtainBasicName(){
return Toolkit.i18nText("Fine-Design_Basic_Widget_Name");
}
@Override
public String title4PopupWindow() {
return "basicProperty";

6
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java

@ -176,8 +176,10 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
this.functionalWhenUnactivatedCheckBox.setSelected(!isFunctionalWhenUnactivated);
this.bindListeners2Widgets();
this.addAttributeChangeListener(changeListener);
// 直接return时 也要处理下相应数据
MobileCollapsedStyle style = ((ChartEditor) xCreator.toData()).getMobileCollapsedStyle();
if (!FormDesignerUtils.isAppRelayout(designer) || isInAbsoluteLayout()) {
fix(style);
return;
}
@ -199,8 +201,6 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
}
}
});
MobileCollapsedStyle style = ((ChartEditor) xCreator.toData()).getMobileCollapsedStyle();
this.mobileCollapsedStyleEditor.setStyle(style);
fix(style);
this.mobileCollapsedStyleEditor.setSelected(style.isCollapsedWork());

14
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

@ -66,10 +66,10 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
@Override
public SearchResult getLessSearchResult(String[] searchText) {
this.recentModelList = new SearchResult();
SearchResult modelList = new SearchResult();
for (String aSearchText : searchText) {
recentModelList = getRecentModelList(aSearchText);
addToRecentModelList(aSearchText);
}
if (recentModelList != null && recentModelList.size() > 0) {
modelList.add(new MoreModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Latest")));
@ -87,8 +87,12 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
return new SearchResult();
}
private synchronized SearchResult getRecentModelList(String searchText) {
return searchBySort(searchText);
/**
* 将单次遍历的关键词的搜索结果添加到结果集中
* @param searchText
*/
private synchronized void addToRecentModelList(String searchText) {
searchBySort(searchText);
}
public List<AlphaCellModel> getRecentModelList() {
@ -161,7 +165,6 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
* 按序搜索
*/
private synchronized SearchResult searchBySort(String key) {
recentModelList = new SearchResult();
try {
initReader();
@ -175,7 +178,6 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
Query query = new TermQuery(term);
TopFieldDocs docs = searcher.search(query, MAX_SIZE, sortKey);
ScoreDoc[] scores = docs.scoreDocs;
this.recentModelList = new SearchResult();
//遍历结果
for (ScoreDoc scoreDoc : scores) {
Document document = searcher.doc(scoreDoc.doc);

7
designer-realize/src/main/java/com/fr/design/widget/ui/BasicWidgetPropertySettingPane.java

@ -4,6 +4,7 @@ import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.dialog.BasicPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.NoneWidget;
@ -25,16 +26,16 @@ public class BasicWidgetPropertySettingPane extends BasicPane {
public BasicWidgetPropertySettingPane() {
this.setLayout(new BorderLayout());
enableCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Enabled"), true);
enableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_Enabled"), true);
enableCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
visibleCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Visible"), true);
visibleCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Form_Widget_Visible"), true);
visibleCheckBox.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
widgetNameComboBox = new ParameterTreeComboBox();
widgetNameComboBox.refreshTree();
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
Component[][] components = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form-Widget_Name")), widgetNameComboBox},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Basic_Widget_Name")), widgetNameComboBox},
new Component[]{enableCheckBox, null},
new Component[]{visibleCheckBox, null},
};

Loading…
Cancel
Save