Browse Source

Merge pull request #12090 in DESIGN/design from final/10.0 to persist/10.0

* commit '42339dbe9bb5352c3c5fbbcc16fd7fbf239bed42':
  REPORT-94597 安装【平台内打开标签页】插件,FR图表超链会多两个重复下拉项 改用ListMap
  REPORT-94597 安装【平台内打开标签页】插件,FR图表超链会多两个重复下拉项
  REPORT-94114 设计器面板图表超链选项缺失 修改 报表块超链选项
  REPORT-94114 设计器面板图表超链选项缺失 【问题原因】没有判断当前是决策报表图表还是普通报表图表,两者的超链选项不同 【改动思路】增加判断当前报表类型
  REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版
persist/10.0
superman 2 years ago
parent
commit
4ca379d78c
  1. 37
      designer-chart/src/main/java/com/fr/design/locale/impl/EmptyDataMark.java
  2. 10
      designer-chart/src/main/java/com/fr/design/module/ChartEmptyDataStylePane.java
  3. 39
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java
  4. 0
      designer-chart/src/main/resources/com/fr/design/images/en_us_emptydata.png
  5. 0
      designer-chart/src/main/resources/com/fr/design/images/zh_cn_emptydata.png
  6. 0
      designer-chart/src/main/resources/com/fr/design/images/zh_tw_emptydata.png

37
designer-chart/src/main/java/com/fr/design/locale/impl/EmptyDataMark.java

@ -1,37 +0,0 @@
package com.fr.design.locale.impl;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.locale.LocaleMark;
import java.awt.image.BufferedImage;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
/**
* 根据本地化信息设置服务器图表空数据提示图标
*
* @author obo
* @version 11.0
* Created by obo on 2023/3/22
*/
public class EmptyDataMark implements LocaleMark<BufferedImage> {
private Map<Locale, BufferedImage> map = new HashMap<>();
private static final BufferedImage ZH_EMPTY_DATA = IOUtils.readImage("com/fr/design/images/zh_emptydata.png");
private static final BufferedImage US_EMPTY_DATA = IOUtils.readImage("/com/fr/design/images/us_emptydata.png");
private static final BufferedImage ZH_TRADITIONAL_EMPTY_DATA = IOUtils.readImage("/com/fr/design/images/zh_traditional_emptydata.png");
public EmptyDataMark() {
map.put(Locale.CHINA, ZH_EMPTY_DATA);
map.put(Locale.US, US_EMPTY_DATA);
map.put(Locale.TAIWAN, ZH_TRADITIONAL_EMPTY_DATA);
}
@Override
public BufferedImage getValue() {
BufferedImage result = map.get(GeneralContext.getLocale());
return result == null ? US_EMPTY_DATA : result;
}
}

10
designer-chart/src/main/java/com/fr/design/module/ChartEmptyDataStylePane.java

@ -10,13 +10,12 @@ import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.locale.impl.EmptyDataMark;
import com.fr.design.style.background.image.ImageFileChooser;
import com.fr.design.style.background.image.ImagePreviewPane;
import com.fr.design.utils.ImageUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark;
import com.fr.general.locale.image.LocaleImageFactory;
import com.fr.general.locale.image.LocaleImageMark;
import com.fr.stable.Constants;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StringUtils;
@ -63,10 +62,11 @@ public class ChartEmptyDataStylePane extends AbstractAttrNoScrollPane {
private Image emptyDataImage = DEFAULT_EMPTY_DATA_IMAGE;
private SwingWorker<Void, Void> imageWorker;
private static final String EMPTY_DATA_IMAGE_PATH = "/com/fr/design/images/emptydata.png";
static {
LocaleMark<BufferedImage> localeMark = LocaleCenter.getMark(EmptyDataMark.class);
DEFAULT_EMPTY_DATA_IMAGE = localeMark.getValue();
LocaleImageMark localeImageMark = LocaleImageFactory.getOrCreateLocaleMark(EMPTY_DATA_IMAGE_PATH);
DEFAULT_EMPTY_DATA_IMAGE = localeImageMark.getValue();
}
@Override

39
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java

@ -152,24 +152,23 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
setPlot(plot);
HashMap paneMap = getHyperlinkMap(plot);
//安装平台内打开插件时,添加相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
java.util.List<UIMenuNameableCreator> list = refreshList(paneMap);
Map<String, NameObjectCreator> creators = new ListMap<>();
int size = list.size();
NameObjectCreator[] creators = new NameObjectCreator[list.size() + providers.size()];
for (int i = 0; i < size; i++) {
UIMenuNameableCreator uiMenuNameableCreator = list.get(i);
creators[i] = new NameObjectCreator(uiMenuNameableCreator.getName(), uiMenuNameableCreator.getObj().getClass(), uiMenuNameableCreator.getPaneClazz());
NameObjectCreator creator = new NameObjectCreator(uiMenuNameableCreator.getName(), uiMenuNameableCreator.getObj().getClass(), uiMenuNameableCreator.getPaneClazz());
creators.put(uiMenuNameableCreator.getName(), creator);
}
//安装平台内打开插件时, 添加/替换 相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
for (HyperlinkProvider provider : providers) {
NameableCreator creator = provider.createHyperlinkCreator();
if (creator != null) {
creators[size] = new NameObjectCreator(creator.menuName(), creator.getHyperlink(), creator.getUpdatePane());
size++;
creators.put(creator.menuName(), new NameObjectCreator(creator.menuName(), creator.getHyperlink(), creator.getUpdatePane()));
}
}
refreshNameableCreator(creators);
refreshNameableCreator(creators.values().toArray(new NameObjectCreator[0]));
java.util.List<NameObject> nameObjects = new ArrayList<NameObject>();
@ -293,12 +292,24 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
if (template == null) {
return false;
}
Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class};
for (Class aClass : classes) {
if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) {
// 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项
if (ComparatorUtils.equals(aClass, clazz)) {
return false;
if (template.isJWorkBook()) {
// 如果是普通报表单元格,那么没有 FormHyperlink 选项
FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class);
return !ComparatorUtils.equals(clazz, formHyperlink.getClass());
} else {
// 如果是决策报表
if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) {
// 编辑的是决策报表中的报表块,那么没有 ChartHyperRelateFloatLink选项
return !ComparatorUtils.equals(clazz, ChartHyperRelateFloatLink.class);
}
Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class};
for (Class aClass : classes) {
if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) {
// 编辑的是决策报表中的图表,那么没有 ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项
if (ComparatorUtils.equals(aClass, clazz)) {
return false;
}
}
}
}

0
designer-chart/src/main/resources/com/fr/design/images/us_emptydata.png → designer-chart/src/main/resources/com/fr/design/images/en_us_emptydata.png

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

0
designer-chart/src/main/resources/com/fr/design/images/zh_emptydata.png → designer-chart/src/main/resources/com/fr/design/images/zh_cn_emptydata.png

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

0
designer-chart/src/main/resources/com/fr/design/images/zh_traditional_emptydata.png → designer-chart/src/main/resources/com/fr/design/images/zh_tw_emptydata.png

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Loading…
Cancel
Save