From 94d25f749d56818d9cec314fe0a14b4df23f0352 Mon Sep 17 00:00:00 2001 From: "LAPTOP-SB56SG4Q\\86185" Date: Wed, 1 Sep 2021 14:14:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4demo=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +- build.gradle | 124 ++++++++++++++++++ encrypt.xml | 13 ++ img/demoUI.png | Bin 0 -> 6727 bytes img/预定义样式.png | Bin 0 -> 12037 bytes plugin.xml | 16 +++ .../multi/style/ui/config/provider/Demo.java | 22 ++++ .../style/ui/config/provider/DemoStyle.java | 46 +++++++ 8 files changed, 223 insertions(+), 1 deletion(-) create mode 100644 build.gradle create mode 100644 encrypt.xml create mode 100644 img/demoUI.png create mode 100644 img/预定义样式.png create mode 100644 plugin.xml create mode 100644 src/main/java/com/tptj/demo/hg/multi/style/ui/config/provider/Demo.java create mode 100644 src/main/java/com/tptj/demo/hg/multi/style/ui/config/provider/DemoStyle.java diff --git a/README.md b/README.md index 10e00de..d6eb4bd 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # demo-multi-style-ui-config-provider -MultiStyleUIConfigProvider 预定义样式扩展demo示例 \ No newline at end of file +MultiStyleUIConfigProvider 预定义样式扩展demo示例\ +demo示例,为预定义样式配置界面增加了一个名为demo的选项卡 \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..5231b5d --- /dev/null +++ b/build.gradle @@ -0,0 +1,124 @@ + +apply plugin: 'java' + +[compileJava,compileTestJava]*.options*.encoding = 'UTF-8' + +ext { + /** + * 项目中依赖的jar的路径 + * 1.如果依赖的jar需要打包到zip中,放置在lib根目录下 + * 2.如果依赖的jar仅仅是编译时需要,防止在lib下子目录下即可 + */ + libPath = "$projectDir/../../webroot/WEB-INF/lib" + + /** + * 是否对插件的class进行加密保护,防止反编译 + */ + guard = false + + def pluginInfo = getPluginInfo() + pluginPre = "fine-plugin" + pluginName = pluginInfo.id + pluginVersion = pluginInfo.version + + outputPath = "$projectDir/../../webroot/WEB-INF/plugins/plugin-" + pluginName + "-1.0/classes" +} + +group = 'com.fr.plugin' +version = '10.0' +sourceCompatibility = '8' + +sourceSets { + main { + java.outputDir = file(outputPath) + output.resourcesDir = file(outputPath) + } +} + +ant.importBuild("encrypt.xml") +//定义ant变量 +ant.projectDir = projectDir +ant.references["compile.classpath"] = ant.path { + fileset(dir: libPath, includes: '**/*.jar') + fileset(dir: ".",includes:"**/*.jar" ) +} + +classes.dependsOn('clean') + +task copyFiles(type: Copy,dependsOn: 'classes'){ + from outputPath + into "$projectDir/classes" +} + +task preJar(type:Copy,dependsOn: guard ? 'compile_encrypt_javas' : 'compile_plain_javas'){ + from "$projectDir/classes" + into "$projectDir/transform-classes" + include "**/*.*" +} +jar.dependsOn("preJar") + +task makeJar(type: Jar,dependsOn: preJar){ + from fileTree(dir: "$projectDir/transform-classes") + baseName pluginPre + appendix pluginName + version pluginVersion + destinationDir = file("$buildDir/libs") + + doLast(){ + delete file("$projectDir/classes") + delete file("$projectDir/transform-classes") + } +} + +task copyFile(type: Copy,dependsOn: ["makeJar"]){ + from "$buildDir/libs" + from("$projectDir/lib") { + include "*.jar" + } + from "$projectDir/plugin.xml" + into file("$buildDir/temp/plugin") +} + +task zip(type:Zip,dependsOn:["copyFile"]){ + from "$buildDir/temp/plugin" + destinationDir file("$buildDir/install") + baseName pluginPre + appendix pluginName + version pluginVersion +} + +//控制build时包含哪些文件,排除哪些文件 +processResources { +// exclude everything +// 用*.css没效果 +// exclude '**/*.css' +// except this file +// include 'xx.xml' +} + +/*读取plugin.xml中的version*/ +def getPluginInfo(){ + def xmlFile = file("plugin.xml") + if (!xmlFile.exists()) { + return ["id":"none", "version":"1.0.0"] + } + def plugin = new XmlParser().parse(xmlFile) + def version = plugin.version[0].text() + def id = plugin.id[0].text() + return ["id":id,"version":version] +} + +repositories { + mavenLocal() + maven { + url = uri('http://mvn.finedevelop.com/repository/maven-public/') + } +} + +dependencies { + //使用本地jar + implementation fileTree(dir: 'lib', include: ['**/*.jar']) + implementation fileTree(dir: libPath, include: ['**/*.jar']) +} + + diff --git a/encrypt.xml b/encrypt.xml new file mode 100644 index 0000000..1401cd1 --- /dev/null +++ b/encrypt.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/img/demoUI.png b/img/demoUI.png new file mode 100644 index 0000000000000000000000000000000000000000..dab49345f42b49fdf9ab44b1a833f5f1114900b3 GIT binary patch literal 6727 zcmeHL_g7Qfwhk>IM2b?PfE4xE5Q83?96BiKQ9+PiqB#`7fDq|~79)}F69ohX1hD`? zgwP2@fp|qADkKYI(Oy34-jY%$-Qf>OvNq)*LgGApXxP zj{-r7KPV~!Tqe|^z-T5;0!Gm3?T}K;VZc0II#CF?+?Is^V<83(j3Cvs@{mA>>|U>z z_~{b`mqt6s7W!Aa^dI$JzmF)WTxSNlU-IfrUV z+z+dMQtMDEhD0<9Dgg}6+0&_tSyHWZna&e#cKOro5x?OLjG8v`O{~T6uG6i-Tf1Ge zbu-|f2oPv?P>HBWQcaqK1z`Ff3K-L<-uR5lz{|*gD+P(qN!MV*)|+N1&0!L^I-)~! z+UnD7VK48~Ji>ps*IfW7+AyCEXQ6~apj#?hb5Jezyk}-Ot0=s|5*s&2f`22*U7?SZ zOV;xOnKJCybX`FTpHR_)p^WDUpZ<@w$JBv(%#fT8 zx#onfzaZ4M-~hJH8&<=zVt47`6ByD@$Cza5wY$k-U)9zl5UY=cQAS@dq#vgN`#EjT zj`(>dgq^Q&Kk=9~&N~f-==hYEMv~R)_rGaYhAqyYS#Z^+k!9q!HsKVa&lbban?@mP z0HP=hrVfQI=PVWv;AB0ptq*Ry`zQnXax&LG@jX`RVg$vynHgj@5@B%|lvB9}1cLhv zkjz>xup!_nW_00zK7Xa-lm@hhYnNc<$Kf`)Q4|A~z29F|mnhel6^%&@2S4U5#?Sz? zz`;2rGo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jaSq#2keVt}{0@H<~>9sT-Es1Z^qMwG^a)J6MvHjmt|7RFz-W*l=+Wi@vjAksMz zQ9VzC5A{0uJ`S(r8F{Eenu-1HiYMdP^Sb`WyVt4Q#d`&>5S!(9_w_0!~Vj@C^6 zoL?Hz#8|uyD9eIoz~GN&=O?cD>Dr3`Jvfsx;4993VlghxbT^`Bw5oip3bZvcO(x?( zIN?yX>TKA;YmPSGV&QyIa{VcFELjzSR10El2EUG2CAH1DDY_xQodp6Tvelk?x5*Sa^5ZS~+3DzhWStm$ zujyD1seTUnL5!(A|VasSXePY$y&p-H)?yDbP^2O0wTgyrlWg5_Upr=UI97`vC|4x{i-f^Q$ z%`~jGv5~42=d1qLpD;hx#W112Tna~rS@KUl%!8KGIxGReHU# zAWNj~E(MG1QMRww??gUDJs4OGcr05=CoA~oI$;w*Xw(!jn0%KH^l$Rkz!xP#mxo9h zI-6A3G8C>fNqAPL5`IppfH?nnGx*{)1E)G&kw@goSrr?5cC+L62ZoIKzfxIFGu3)Q z)Af&uaCP*>A1*Za3v=8rGgIL;4_CeS^7xeTvhdBvK9^d8pou~yW0!TvIGzuG9Vg$Y@01JT)rHj!fZB zyLIKF0$Ph>hdDvX!OL~KhB=;m)uT=?ES8to!-sitkT!trg4QkleK%Ykd!Tm03?mJ8 z8@=N3vfJfsl1$#vIvGL&X$hJ_;GM7As6H)xfRfT=S=GM~)^a+$=jz$;r1sb(~UO{4FV1Pb$R?u~YNCTZUDs#Kf0$TP5|3CS^6omQg c{wq}O63wYvx0thyQz5oCK literal 0 HcmV?d00001 diff --git a/img/预定义样式.png b/img/预定义样式.png new file mode 100644 index 0000000000000000000000000000000000000000..88fa80ab80ea92ca980c493f7fad7ae374894354 GIT binary patch literal 12037 zcmb7qXIxX;*CxI9E-iFvp^HcdK{`R;DuxcCK@3Ht6M73>R6vjxfrttSgkGhJfDn4` zO?vNT4)@-7{`3Cc4>R+Dl^o9A*?X_E%CnwzkVb}Dlw_=AI5;?zI@%h>z~?3o4z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9u1)&CPpCuKRO=dkx z^iw9|eKhv=rQ-7RsM<}`8{CN6?_@YkWWvpXw=G^1-Utc<%!P_4&=&!kETj7W$#8cB z{H;|q{g%pUU`DIEj0NC$(_R=gJ$Np|>vxsM`mm4MG~!svuKV(Mdkx7X=Qf|q z!mLiG9&JERGj3b(*dHYDTDX-b;-oS}|LMLRfac~7xmim=K+ZavA=C5#EuE^fRcs(jknpGj%>rqX2w zOaI#PGmQjmiPvuseno5#W%H=J?MRKU zCXM@uj+-Qtl%v(x**0&AN^V`erH!$&5pt$y6Xq_Lui$fdf_TCt!W3IteZ{B7$t3Ui z)s=6~KsT%Kjn9hz{$hw3??xv9e8+lbCZ8}goE?_+GVut)_sWw>d|+{ z+cdgx9yS;3#d9c3zXW>OvH@Ec}il5noORh z{M-Ekj9tW$EC5B|C6x?dNazaFis=;ixk2Rj3ECFa}BM_eDGwZjWc4x%* zhm~8~3hR`S8j@6KdEv-NvE0cG^KB^(3(%Z6Q49p+(wimr?socQTp@`zRg?=RQEmI4 zw#dHH4X?nGb&HOaNvTv#l_^N%#wCj)V + com.tptj.demo.hg.multi.style.ui.config.provider.v10 + + yes + 1.0 + 10.0 + tptj + 2019-07-18 + + + com.tptj.demo.hg.multi.style.ui.config.provider + + + + + \ No newline at end of file diff --git a/src/main/java/com/tptj/demo/hg/multi/style/ui/config/provider/Demo.java b/src/main/java/com/tptj/demo/hg/multi/style/ui/config/provider/Demo.java new file mode 100644 index 0000000..1136d0a --- /dev/null +++ b/src/main/java/com/tptj/demo/hg/multi/style/ui/config/provider/Demo.java @@ -0,0 +1,22 @@ +package com.tptj.demo.hg.multi.style.ui.config.provider; + +import com.fr.design.fun.StyleUIConfigProvider; +import com.fr.design.fun.impl.AbstractMultiStyleUIConfigProvider; +import com.fr.intelli.record.Focus; +import com.fr.record.analyzer.EnableMetrics; + +import java.util.Arrays; +import java.util.List; + +/** + * @author 秃破天际 + * @version 10.0 + * Created by 秃破天际 on 2021/9/1 + **/ +@EnableMetrics +public class Demo extends AbstractMultiStyleUIConfigProvider { + @Focus(id = "com.tptj.demo.hg.multi.style.ui.config.provider.v10", text = "MultiStyleUIConfigProvider") + public List getConfigList() { + return Arrays.asList( new DemoStyle() ); + } +} diff --git a/src/main/java/com/tptj/demo/hg/multi/style/ui/config/provider/DemoStyle.java b/src/main/java/com/tptj/demo/hg/multi/style/ui/config/provider/DemoStyle.java new file mode 100644 index 0000000..e74bfde --- /dev/null +++ b/src/main/java/com/tptj/demo/hg/multi/style/ui/config/provider/DemoStyle.java @@ -0,0 +1,46 @@ +package com.tptj.demo.hg.multi.style.ui.config.provider; + +import com.fr.base.Style; +import com.fr.base.background.ColorBackground; +import com.fr.design.fun.impl.AbstractStyleUIConfigProvider; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; + +import javax.swing.*; +import javax.swing.event.ChangeListener; +import java.awt.*; + +/** + * @author 秃破天际 + * @version 10.0 + * Created by 秃破天际 on 2021/9/1 + **/ +public class DemoStyle extends AbstractStyleUIConfigProvider { + + public String configName() { + return "Demo"; + } + + private UITextField w_value; + + public JComponent uiComponent(ChangeListener listener) { + w_value = new UITextField("Demo Value"); + return TableLayoutHelper.createTableLayoutPane( + new Component[][]{ + {new UILabel("txt:"), w_value} + }, + new double[]{TableLayout.PREFERRED}, + new double[]{ TableLayout.PREFERRED,TableLayout.FILL} + ); + } + + public Style updateConfig() { + return Style.getInstance().deriveBackground( ColorBackground.getInstance(Color.BLUE) ); + } + + public void populateConfig(Style style) { + w_value.setText(((ColorBackground)style.getBackground()).getColor().toString()); + } +}