Browse Source

Pull request #11818: REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版

Merge in DESIGN/design from ~OBO/design:final/11.0 to final/11.0

* commit '07c29bb0b35b0dd2ecc0200dc7f48a4fb38e5941':
  REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版
  REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版
  REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版
  REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版
  REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版
new-design
Obo-王学仁 2 years ago committed by Bruce.Deng-邓铖臻
parent
commit
12e52bf66e
  1. 38
      designer-chart/src/main/java/com/fr/design/locale/impl/EmptyDataMark.java
  2. 11
      designer-chart/src/main/java/com/fr/design/module/ChartEmptyDataStylePane.java
  3. 0
      designer-chart/src/main/resources/com/fr/design/images/en_us_emptydata.png
  4. 0
      designer-chart/src/main/resources/com/fr/design/images/zh_cn_emptydata.png
  5. 0
      designer-chart/src/main/resources/com/fr/design/images/zh_tw_emptydata.png

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

@ -1,38 +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
* @since 11.0
* Created 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;
}
}

11
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.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; 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.ImageFileChooser;
import com.fr.design.style.background.image.ImagePreviewPane; import com.fr.design.style.background.image.ImagePreviewPane;
import com.fr.design.utils.ImageUtils; import com.fr.design.utils.ImageUtils;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.locale.LocaleCenter; import com.fr.general.locale.image.LocaleImageFactory;
import com.fr.general.locale.LocaleMark; import com.fr.general.locale.image.LocaleImageMark;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.CoreGraphHelper; import com.fr.stable.CoreGraphHelper;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -35,7 +34,6 @@ import java.awt.GridLayout;
import java.awt.Image; import java.awt.Image;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.File; import java.io.File;
/** /**
@ -63,10 +61,11 @@ public class ChartEmptyDataStylePane extends AbstractAttrNoScrollPane {
private Image emptyDataImage = DEFAULT_EMPTY_DATA_IMAGE; private Image emptyDataImage = DEFAULT_EMPTY_DATA_IMAGE;
private SwingWorker<Void, Void> imageWorker; private SwingWorker<Void, Void> imageWorker;
private static final String EMPTY_DATA_IMAGE_PATH = "/com/fr/design/images/emptydata.png";
static { static {
LocaleMark<BufferedImage> localeMark = LocaleCenter.getMark(EmptyDataMark.class); LocaleImageMark localeImageMark = LocaleImageFactory.getOrCreateLocaleMark(EMPTY_DATA_IMAGE_PATH);
DEFAULT_EMPTY_DATA_IMAGE = localeMark.getValue(); DEFAULT_EMPTY_DATA_IMAGE = localeImageMark.getValue();
} }
@Override @Override

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