@ -0,0 +1,5 @@
|
||||
*.iml |
||||
.idea/ |
||||
.classpath |
||||
lib/report/*.jar |
||||
.DS_Store |
@ -1,15 +1,16 @@
|
||||
# 自定义条件属性 |
||||
|
||||
当前已有的条件属性包含下图中的几种类型 |
||||
|
||||
![0](effect/e0.png) |
||||
![0](screenshots/e0.png) |
||||
|
||||
在特殊情况下,已有的几种类型并不能完全满足需求,典型的就是,根据不同的条件把单元格内的内容做不同的对齐。 |
||||
这个时候,就可以使用条件属性接口```com.fr.design.fun.HighlightProvider```以及其抽象类```com.fr.design.fun.impl.AbstractHighlightProvider```了。 |
||||
通过这个接口可以制作出如下如所示的插件效果 |
||||
|
||||
![1](effect/e1.png) |
||||
![1](screenshots/e1.png) |
||||
|
||||
可以看到多出了一个"我的条件属性"的项,当然这个名字是可以根据实际情况修改的。 |
||||
选择了以后,就可以设置单元格的对齐方式了 |
||||
|
||||
![2](effect/e2.png) |
||||
![2](screenshots/e2.png) |
||||
|
@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<module type="JAVA_MODULE" version="4"> |
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false"> |
||||
<output url="file://$MODULE_DIR$/../../../env/8.0/WebReport/WEB-INF/classes" /> |
||||
<content url="file://$MODULE_DIR$"> |
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> |
||||
</content> |
||||
<orderEntry type="jdk" jdkName="jdk1.8" jdkType="JavaSDK" /> |
||||
<orderEntry type="sourceFolder" forTests="false" /> |
||||
<orderEntry type="library" name="lib" level="project" /> |
||||
<orderEntry type="module" module-name="base" /> |
||||
<orderEntry type="module" module-name="base-basic" /> |
||||
<orderEntry type="module" module-name="base-calculate" /> |
||||
<orderEntry type="module" module-name="base-data" /> |
||||
<orderEntry type="module" module-name="base-file" /> |
||||
<orderEntry type="module" module-name="base-performance" /> |
||||
<orderEntry type="module" module-name="base-stable" /> |
||||
<orderEntry type="module" module-name="chart-base" /> |
||||
<orderEntry type="module" module-name="designer" /> |
||||
<orderEntry type="module" module-name="engine" /> |
||||
<orderEntry type="module" module-name="designer_base" /> |
||||
</component> |
||||
</module> |
@ -1,23 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><plugin> |
||||
<id>com.fr.plugin.cell.highlight.align</id> |
||||
<id>com.fr.plugin.cell.highlight.align.v10</id> |
||||
<main-package>com.fr.plugin.cell.highlight</main-package> |
||||
<name><![CDATA[单元格对齐条件属性]]></name> |
||||
<active>yes</active> |
||||
<version>2.1</version> |
||||
<env-version>8.0</env-version> |
||||
<jartime>2016-03-20</jartime> |
||||
<price>1000</price> |
||||
<vendor email="solution@finereport.com">solution.richie</vendor> |
||||
<env-version>10.0</env-version> |
||||
<jartime>2018-09-20</jartime> |
||||
<vendor>author</vendor> |
||||
<description><![CDATA[可以设置单元格为左对齐,右对齐以及居中对齐]]></description> |
||||
<change-notes><![CDATA[ |
||||
<p>[2016-01-20]增加了插件功能说明</p> |
||||
<p>[2016-03-21]增加了国际化支持(美国英语)</p> |
||||
<p>[2016-01-20]增加了插件功能说明。<br/> |
||||
<p>[2016-03-21]增加了国际化支持(美国英语)。<br/> |
||||
]]></change-notes> |
||||
<extra-core> |
||||
<LocaleFinder class="com.fr.plugin.cell.highlight.MyCellHighlightLocaleFinder"/> |
||||
<LocaleFinder class="com.fr.plugin.cell.highlight.AlignHighlightLocaleBridge"/> |
||||
</extra-core> |
||||
<extra-report> |
||||
</extra-report> |
||||
<extra-designer> |
||||
<HighlightProvider class="com.fr.plugin.cell.highlight.MyCellHighlight"/> |
||||
<HighlightProvider class="com.fr.plugin.cell.highlight.AlignCellHighlightBridge"/> |
||||
</extra-designer> |
||||
<function-recorder class="com.fr.plugin.cell.highlight.fun.AlignHighlightAction"/> |
||||
</plugin> |
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
|
||||
<parent> |
||||
<groupId>com.fr.plugin</groupId> |
||||
<artifactId>starter</artifactId> |
||||
<version>10.0</version> |
||||
</parent> |
||||
<packaging>jar</packaging> |
||||
<artifactId>demo-highlight-align</artifactId> |
||||
<build> |
||||
<!---如果要更改调试插件,改这里的配置就可以了--> |
||||
<outputDirectory>${project.basedir}/../webroot/WEB-INF/plugins/plugin-com.fr.plugin.cell.highlight.align.v10-1.0/classes</outputDirectory> |
||||
</build> |
||||
</project> |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 4.3 KiB |
@ -1,28 +0,0 @@
|
||||
package com.fr.plugin.cell.highlight.fun; |
||||
|
||||
import com.fr.plugin.cell.highlight.MyConstants; |
||||
import com.fr.stable.fun.FunctionHelper; |
||||
import com.fr.stable.fun.FunctionProcessor; |
||||
import com.fr.stable.fun.impl.AbstractFunctionProcessor; |
||||
|
||||
/** |
||||
* Created by richie on 16/1/22. |
||||
*/ |
||||
public class MyCellFunctionProcessor extends AbstractFunctionProcessor { |
||||
|
||||
private static MyCellFunctionProcessor instance = new MyCellFunctionProcessor(); |
||||
|
||||
public static FunctionProcessor getInstance() { |
||||
return instance; |
||||
} |
||||
|
||||
@Override |
||||
public int getId() { |
||||
return FunctionHelper.generateFunctionID(MyConstants.PLUGIN_ID); |
||||
} |
||||
|
||||
@Override |
||||
public String getLocaleKey() { |
||||
return "Plugin-Highlight_Align"; |
||||
} |
||||
} |
@ -1,4 +0,0 @@
|
||||
Plugin-Highlight_Align=Align |
||||
Plugin-Highlight_Align_Left=Left |
||||
Plugin-Highlight_Align_Center=Center |
||||
Plugin-Highlight_Align_Right=Right |
@ -1,4 +0,0 @@
|
||||
Plugin-Highlight_Align=\u5BF9\u9F50 |
||||
Plugin-Highlight_Align_Left=\u5DE6\u5BF9\u9F50 |
||||
Plugin-Highlight_Align_Center=\u5C45\u4E2D\u5BF9\u9F50 |
||||
Plugin-Highlight_Align_Right=\u53F3\u5BF9\u9F50 |
@ -1,10 +1,10 @@
|
||||
package com.fr.plugin.cell.highlight; |
||||
package com.fr.plugin.cell.highlight.fun; |
||||
|
||||
/** |
||||
* Created by richie on 16/3/30. |
||||
*/ |
||||
public class MyConstants { |
||||
public class AlignHighlightConstants { |
||||
|
||||
public static final String PLUGIN_ID = "com.fr.plugin.cell.highlight.align"; |
||||
public static final String PLUGIN_ID = "com.fr.plugin.cell.highlight.align.v10"; |
||||
|
||||
} |
@ -0,0 +1,7 @@
|
||||
Plugin-Highlight_Align=Align |
||||
Plugin-Highlight_Align_Left=Left |
||||
Plugin-Highlight_Align_Center=Center |
||||
Plugin-Highlight_Align_Right=Right |
||||
Plugin-Highlight_Align_Current_Row=Current row |
||||
Plugin-Highlight_Align_Current_Column=Current column |
||||
Plugin-Highlight_Align_Current_Cell Current cell |
@ -0,0 +1,7 @@
|
||||
Plugin-Highlight_Align=\u5BF9\u9F50 |
||||
Plugin-Highlight_Align_Left=\u5DE6\u5BF9\u9F50 |
||||
Plugin-Highlight_Align_Center=\u5C45\u4E2D\u5BF9\u9F50 |
||||
Plugin-Highlight_Align_Right=\u53F3\u5BF9\u9F50 |
||||
Plugin-Highlight_Align_Current_Row=\u5F53\u524D\u884C |
||||
Plugin-Highlight_Align_Current_Column=\u5F53\u524D\u5217 |
||||
Plugin-Highlight_Align_Current_Cell=\u5F53\u524D\u683C\u5B50 |