Browse Source
Merge in DESIGN/design from ~OBO/design:release/11.0 to release/11.0 * commit '083ceefcfb57a98440f710b21f7ab4691ac2e1ee': REPORT-92160 设计器-图标-数据源部分-新建无disable状态 REPORT-82787 图表空数据提示配置页面,默认图片需补充繁中版release/11.0
5 changed files with 72 additions and 12 deletions
@ -0,0 +1,37 @@ |
|||||||
|
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; |
||||||
|
} |
||||||
|
} |
After Width: | Height: | Size: 18 KiB |
Loading…
Reference in new issue