forked from fanruan/finekit
Mars.Ma
5 years ago
6 changed files with 26 additions and 40 deletions
@ -1,11 +1,11 @@ |
|||||||
package com.fanruan.api.util; |
package com.fanruan.api.report; |
||||||
|
|
||||||
import com.fr.base.Style; |
import com.fr.base.Style; |
||||||
import com.fr.report.cell.cellattr.core.CellUtils; |
import com.fr.report.cell.cellattr.core.CellUtils; |
||||||
|
|
||||||
import java.awt.*; |
import java.awt.*; |
||||||
|
|
||||||
public class CellKit { |
public class PaintKit { |
||||||
|
|
||||||
/** |
/** |
||||||
* 如果value是ImageWithSuffix类的一个实例,则创建一个宽为width,高为height,类型为TYPE_4BYTE_ABGR的image,并将其按照比例和Style绘制。 |
* 如果value是ImageWithSuffix类的一个实例,则创建一个宽为width,高为height,类型为TYPE_4BYTE_ABGR的image,并将其按照比例和Style绘制。 |
@ -1,15 +0,0 @@ |
|||||||
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); |
|
||||||
} |
|
||||||
} |
|
@ -1,19 +0,0 @@ |
|||||||
package com.fanruan.api.util; |
|
||||||
|
|
||||||
import org.junit.Assert; |
|
||||||
import org.junit.Test; |
|
||||||
|
|
||||||
import static org.junit.Assert.*; |
|
||||||
|
|
||||||
public class StableKitTest { |
|
||||||
|
|
||||||
@Test |
|
||||||
public void canBeFormula() { |
|
||||||
String s1 = "=1"; |
|
||||||
String s2 = "=a+b+"; |
|
||||||
String s3 = "ppp"; |
|
||||||
Assert.assertTrue(StableKit.canBeFormula(s1)); |
|
||||||
Assert.assertTrue(StableKit.canBeFormula(s2)); |
|
||||||
Assert.assertFalse(StableKit.canBeFormula(s3)); |
|
||||||
} |
|
||||||
} |
|
Loading…
Reference in new issue