帆软报表设计器源代码。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

112 lines
2.7 KiB

package com.fr.design.fun;
import com.fr.base.Utils;
import com.fr.base.chart.BaseChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.design.style.color.FRColorSelectorStyle;
import com.fr.general.FRFont;
import com.fr.report.cell.CellElement;
import com.fr.stable.StringUtils;
import com.fr.stable.collections.combination.Pair;
import com.fr.stable.fun.mark.Selectable;
import java.awt.Color;
import java.awt.Font;
import java.util.List;
/**
* 主要用于fvs报表块内元素默认值的调整,以达到所见所得效果,后续fvs内置后删除
*/
public interface DefaultValueAdjustProvider extends Selectable {
String MARK_STRING = "DefaultValueAdjustProvider";
int CURRENT_LEVEL = 2;
/**
* 调整单元格对象默认值
*
* @param cellElement
*/
void adjustCellElement(CellElement cellElement);
/**
* 调整富文本默认值
*
* @param fontSize
* @return
*/
int adjustRichTextTransform(int fontSize, double transformedFontSize);
/**
* 调整ChartCollection
*
* @param chartCollection
*/
void adjustChartCollectionStyle(BaseChartCollection chartCollection);
/**
* 调整图表
*
* @param chartProvider
*/
void adjustChart(ChartProvider chartProvider);
/**
* 转成当前分辨率下显示的font
* @param font
* @param resolution
* @return
*/
Font transformFontByResolution(FRFont font, int resolution);
/**
* 修改设计可用字体默认列表
*
* @return
*/
default String[] getAvailableFontFamilyNames4Report() {
return Utils.getAvailableFontFamilyNames4Report();
}
/**
* 修改配色方案默认值
* @return
*/
default Pair<Color[], Color[]> adjustChartDefaultColorFill() {
return new Pair<>(new Color[0], new Color[0]);
}
/**
* 支持插件自定义主题色选择器风格
* @return 颜色配置list
*/
default List getColorSelector(){
return FRColorSelectorStyle.COLOR_CONFIG;
}
/**
* 移动端弹窗界面是否支持配置POST传参方式
*
* @return 是否支持
*/
default boolean isNeedPostCombo4MobilePopupPane() {
return false;
}
/**
* JsContentPane是否支持内容提示
* @return 是否支持
*/
default boolean isNeedContentWarning4JsContentPane() {
return false;
}
/**
* 自定义匹配js内容,并返回对应的提示文本
* @return <是否匹配,提示文本>
*/
default Pair<Boolean, String> checkJsContent(String content) {
return new Pair<>(false, StringUtils.EMPTY);
}
}