Mars.Ma
5 years ago
6 changed files with 73 additions and 0 deletions
@ -0,0 +1,4 @@
|
||||
package com.fanruan.api.base; |
||||
|
||||
public abstract class AbstractPainter extends com.fr.base.AbstractPainter { |
||||
} |
@ -0,0 +1,4 @@
|
||||
package com.fanruan.api.base; |
||||
|
||||
public abstract class BaseFormula extends com.fr.base.BaseFormula { |
||||
} |
@ -0,0 +1,7 @@
|
||||
package com.fanruan.api.design.work.formula; |
||||
|
||||
public class TinyFormulaPane extends com.fr.design.formula.TinyFormulaPane { |
||||
public TinyFormulaPane() { |
||||
super(); |
||||
} |
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.fanruan.api.util; |
||||
|
||||
import com.fr.stable.html.Tag; |
||||
import com.fr.stable.web.Repository; |
||||
import com.fr.web.BaseHTMLWriterUtils; |
||||
|
||||
import java.awt.*; |
||||
|
||||
public class BaseHTMLWriterKit { |
||||
|
||||
/** |
||||
* 根据原始的图片和指定的尺寸以及报表上下文生成图片的HTML标签,该方法只生成一个简单的img标签 |
||||
* @param image 原始图片 |
||||
* @param dimension 指定尺寸 |
||||
* @param repo 报表上下文 |
||||
* @return img图片标签 |
||||
*/ |
||||
public static Tag createImageTag4RepoWithCheckVml(Image image, Dimension dimension, Repository repo){ |
||||
return BaseHTMLWriterUtils.createImageTag4RepoWithCheckVml(image, dimension, repo); |
||||
} |
||||
} |
@ -0,0 +1,22 @@
|
||||
package com.fanruan.api.util; |
||||
|
||||
import com.fr.base.Style; |
||||
import com.fr.report.cell.cellattr.core.CellUtils; |
||||
|
||||
import java.awt.*; |
||||
|
||||
public class CellKit { |
||||
|
||||
/** |
||||
* 如果value是ImageWithSuffix类的一个实例,则创建一个宽为width,高为height,类型为TYPE_4BYTE_ABGR的image,并将其按照比例和Style绘制。 |
||||
* @param value 传入的需要判断为是否是ImageWithSuffix实例的对象 |
||||
* @param resolution 缩放比例的分母,缩放比例为1/resolution |
||||
* @param style 绘制image的style |
||||
* @param width 绘制image的宽 |
||||
* @param height 绘制image的高 |
||||
* @return |
||||
*/ |
||||
public static Image value2Image(Object value, int resolution, Style style, int width, int height){ |
||||
return CellUtils.value2Image(value, resolution, style, width, height); |
||||
} |
||||
} |
@ -0,0 +1,15 @@
|
||||
package com.fanruan.api.util; |
||||
|
||||
import com.fr.stable.StableUtils; |
||||
|
||||
public class StableKit { |
||||
|
||||
/** |
||||
* 判断一个对象是否可以转化为公式 |
||||
* @param object 要判断的字符串 |
||||
* @return 如果该字符串是以"="开头,说明可以转化成公式,否则不能转化成公式 |
||||
*/ |
||||
public static boolean canBeFormula(Object object){ |
||||
return StableUtils.canBeFormula(object); |
||||
} |
||||
} |
Loading…
Reference in new issue