-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
gianpiero.di.blasi
authored and
gianpiero.di.blasi
committed
May 20, 2022
1 parent
6cec0e1
commit 33700ec
Showing
9 changed files
with
1,025 additions
and
237 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This is free and unencumbered software released into the public domain. | ||
|
||
Anyone is free to copy, modify, publish, use, compile, sell, or | ||
distribute this software, either in source code form or as a compiled | ||
binary, for any purpose, commercial or non-commercial, and by any | ||
means. | ||
|
||
In jurisdictions that recognize copyright laws, the author or authors | ||
of this software dedicate any and all copyright interest in the | ||
software to the public domain. We make this dedication for the benefit | ||
of the public at large and to the detriment of our heirs and | ||
successors. We intend this dedication to be an overt act of | ||
relinquishment in perpetuity of all present and future rights to this | ||
software under copyright law. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR | ||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, | ||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
For more information, please refer to <https://unlicense.org> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# CircularSliderWidget | ||
An extension to visualize a circular slider. | ||
|
||
## Description | ||
This extension provides a widget to visualize a circular slider. The widget allows an high level of customization in colors, labels, tooltips, etc. | ||
|
||
## Properties | ||
- debugMode - BOOLEAN (default = false): if set to true it sends to the browser's JS console a set of information useful for debugging the widget | ||
- numberOfKnobs - INTEGER (default = 1): the number of knobs | ||
- Value1, ..., Value\<numberOfKnobs\> - NUMBER (no default value): dynamic properties based on the value of numberOfKnobs, they are the knobs values | ||
- min - INTEGER (default = 0): the minimum value | ||
- max - INTEGER (default = 100): the maximum value | ||
- startAngle - INTEGER (default = 0): the start angle (in degree), 0 = north, clockwise | ||
- sliderStrokeWidth - INTEGER (default = 20): the stroke width of the slider | ||
- sliderBackgroundColor - STRING (default = '#D8DBDE'): the background color of the slider | ||
- knobsRadius - INTEGER (default = 15): the radius of the knobs | ||
- knobsFontSize - INTEGER (default = 10): the font size of the knobs | ||
- knobsBackgroundColor - STRING (default = '#FFFFFF'): the background color of the knobs | ||
- knobsFontColor - STRING (default = '#787878'): the font color of the knobs | ||
- knobsFontFamily - STRING (default = 'sans-serif'): the font family of the knobs | ||
- knobsBorderWidth - INTEGER (default = 1): the border width of the knobs | ||
- knobsBorderColor - STRING (default = '#D8DBDE'): the border color of the knobs | ||
- knobSelectedBorderColor - STRING (default = '#0094C8'): the border color of the selected knob | ||
- knobsFormatFunction - STRING (default = 'result = value;'): the function to define the format of the knobs values, the function has an input "value" and has to return a "result" value | ||
- showValuesSummary - BOOLEAN (default = false): true to show a "summary" of all values | ||
- valuesSummaryFormatFunction - STRING (default = 'result = values.toString();'): the function to define the format of the "summary" of all values, the function has a sorted array input "values" and has to return a "result" value | ||
- valuesSummaryFontSize - INTEGER (default = 10): the font size of the "summary" of all values | ||
- valuesSummaryFontColor - STRING (default = '#787878'): The font color of the "summary" of all values | ||
- valuesSummaryFontFamily - STRING (default = 'sans-serif'): The font family of the "summary" of all values | ||
- animation - STRING (default = 'STEP'): the animation (options: STEP, SMOOTH) | ||
- showTicks - STRING (default = 'NO'): enables the ticks visualization (options: NO, PRIMARY, SECONDARY, ALL) | ||
- primaryTicksStep - INTEGER (default = 10): the step of the primary ticks | ||
- primaryTicksRadius - INTEGER (default = 5): the radius of the primary ticks | ||
- secondaryTicksRadius - INTEGER (default = 2): the radius of the secondary ticks | ||
- primaryTicksColor - STRING (default = '#787878'): the color of the primary ticks | ||
- secondaryTicksColor - STRING (default = '#787878'): the color of the secondary ticks | ||
- showTicksTooltip - BOOLEAN (default = false): true to show the ticks tooltip | ||
- ticksTooltipFormatFunction - STRING (default = 'result = value;'): the function to define the format of the ticks tooltip, the function has an input "value" and has to return a "result" value | ||
|
||
## Events | ||
- ValuesChanged: event to notify that a value has changed | ||
|
||
## Donate | ||
If you would like to support the development of this and/or other extensions, consider making a [donation](https://www.paypal.com/donate/?business=HCDX9BAEYDF4C&no_recurring=0¤cy_code=EUR). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,180 +1,116 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project name="CircularSliderWidget" basedir="." default="build"> | ||
|
||
<property name="extension.jar" value="circularsliderwidget.jar" /> | ||
|
||
<property name="target" value="1.8" /> | ||
<property name="source" value="1.8" /> | ||
<property name="debuglevel" value="source,lines,vars" /> | ||
<property name="common" value="common" /> | ||
<property name="ui" value="ui" /> | ||
<property name="lib" value="lib" /> | ||
<property name="entities" value="Entities" /> | ||
<property name="localization" value="Localization" /> | ||
<property name="src.dir" value="${basedir}/src" /> | ||
<property name="build.dir" value="${user.home}/builds/${ant.project.name}/bin" /> | ||
<property name="minify.dir" value="${user.home}/builds/${ant.project.name}/minify" /> | ||
<property name="custom.dir" value="${user.home}/builds/${ant.project.name}/custom" /> | ||
<property name="config.dir" value="${basedir}/configfiles" /> | ||
<property name="ui.dir" value="${basedir}/${ui}" /> | ||
<property name="lib.dir" value="${basedir}/${lib}" /> | ||
<property name="zip.dir" value="${user.home}/builds/${ant.project.name}/build/distributions" /> | ||
<property name="entity.dir" value="${basedir}/Entities" /> | ||
<property name="localization.dir" value="${basedir}/${localization}" /> | ||
|
||
<property file="${user.home}/vendor-custom.txt"/> | ||
<property file="extension.properties" /> | ||
|
||
<!-- ExtensionPackage directory structure props --> | ||
<property name="package.lib.basedir" value="${lib}" /> | ||
<property name="package.ui.basedir" value="${ui}" /> | ||
<property name="package.common.lib.dir" value="${package.lib.basedir}/${common}" /> | ||
<property name="package.common.ui.dir" value="${package.ui.basedir}/${common}" /> | ||
|
||
<!-- Extension file info --> | ||
<property name="zip.file.name" value="${ant.project.name}.zip" /> | ||
<property name="minify-zip.file.name" value="${ant.project.name}-min.zip" /> | ||
<property name="minify-custom-zip.file.name" value="${ant.project.name}-min-custom.zip" /> | ||
|
||
<tstamp> | ||
<format property="NOW" pattern="yyyy-MM-dd HH:mm:ss" /> | ||
</tstamp> | ||
|
||
<!-- define the classpath so it picks up the ThingWorx SDK jar relative to this basedir --> | ||
<path id="jar.classpath"> | ||
<pathelement location="${build.dir}" /> | ||
<fileset dir="${basedir}/twx-lib" includes="*.jar" /> | ||
<fileset dir="${lib.dir}" includes="*.jar" erroronmissingdir="false" /> | ||
</path> | ||
|
||
<target name="clean"> | ||
<delete dir="${build.dir}" /> | ||
<delete dir="${zip.dir}" /> | ||
<delete dir="${minify.dir}" /> | ||
<delete dir="${custom.dir}" /> | ||
</target> | ||
|
||
<target name="init" depends="clean"> | ||
<mkdir dir="${build.dir}" /> | ||
|
||
<copy includeemptydirs="false" todir="${build.dir}"> | ||
<fileset dir="${src.dir}"> | ||
<exclude name="**/*.launch" /> | ||
<exclude name="**/*.java" /> | ||
</fileset> | ||
</copy> | ||
</target> | ||
|
||
<target name="build-source" depends="init"> | ||
<echo message="${ant.project.name}: ${ant.file}" /> | ||
<javac debug="true" debuglevel="${debuglevel}" destdir="${build.dir}" source="${source}" target="${target}" includeantruntime="false"> | ||
<src path="${src.dir}" /> | ||
<classpath refid="jar.classpath" /> | ||
</javac> | ||
</target> | ||
|
||
<target name="check-bin" depends="build-source"> | ||
<fileset dir="${build.dir}" id="binfileset" /> | ||
<condition property="bindir.empty"> | ||
<length length="0"> | ||
<fileset refid="binfileset" /> | ||
</length> | ||
</condition> | ||
</target> | ||
|
||
<target name="build-jars" depends="check-bin" unless="bindir.empty"> | ||
<echo message="building ${extension.jar} to ${build.dir}..." /> | ||
<jar destfile="${build.dir}/${extension.jar}"> | ||
<!-- generate MANIFEST inline --> | ||
<manifest> | ||
<attribute name="Built-By" value="Eclipse Plugin for ThingWorx Extension Development ${twx_eclipse_plugin_version}" /> | ||
<attribute name="Build-Date" value="${NOW}" /> | ||
<section name="${ant.project.name}"> | ||
<attribute name="Package-Title" value="${ant.project.name}" /> | ||
<attribute name="Package-Version" value="${package_version}" /> | ||
<attribute name="Package-Vendor" value="${project_vendor}" /> | ||
</section> | ||
</manifest> | ||
|
||
<fileset dir="${build.dir}" /> | ||
</jar> | ||
</target> | ||
|
||
<target name="copy-minify"> | ||
<copy todir="${minify.dir}"> | ||
<fileset dir="${basedir}" includes="${ui}/**/*.min.*" excludes="${ui}/**/jslibrary/*.*"/> | ||
<fileset dir="${basedir}" includes="${ui}/**/*.png" /> | ||
</copy> | ||
|
||
<move todir="${minify.dir}"> | ||
<fileset dir="${minify.dir}" includes="${ui}/**/*.min.*" /> | ||
<mapper> | ||
<mapper type="regexp" from="(.*).min.(.*)" to="\1.\2" /> | ||
</mapper> | ||
</move> | ||
</target> | ||
|
||
<target name="metadata-custom"> | ||
<copy todir="${custom.dir}"> | ||
<fileset dir="${config.dir}" includes="metadata.xml" /> | ||
</copy> | ||
|
||
<replace file="${custom.dir}/metadata.xml" token="Accenture Italy - Industry X" value="${vendor-custom}"/> | ||
</target> | ||
|
||
<target name="package-extension" depends="build-jars"> | ||
<zip destfile="${zip.dir}/${zip.file.name}"> | ||
<mappedresources> | ||
<fileset dir="${build.dir}" includes="${extension.jar}" /> | ||
<globmapper from="*" to="${package.common.lib.dir}/*" /> | ||
</mappedresources> | ||
|
||
<zipfileset dir="${config.dir}" includes="metadata.xml" /> | ||
|
||
<zipfileset dir="${basedir}" includes="${entities}/**/*.xml" /> | ||
<zipfileset dir="${basedir}" includes="${localization}/**/*.json" /> | ||
<zipfileset dir="${basedir}" includes="${ui}/**/*.*" excludes="${ui}/**/*.min.*,${ui}/**/jslibrary/*.*" /> | ||
<zipfileset dir="${basedir}" includes="${ui}/**/jslibrary/*.*" /> | ||
<zipfileset dir="${lib.dir}" includes="**/*.jar" prefix="${package.common.lib.dir}/"/> | ||
</zip> | ||
</target> | ||
|
||
<target name="package-extension-minify" depends="build-jars,copy-minify"> | ||
<zip destfile="${zip.dir}/${minify-zip.file.name}"> | ||
<mappedresources> | ||
<fileset dir="${build.dir}" includes="${extension.jar}" /> | ||
<globmapper from="*" to="${package.common.lib.dir}/*" /> | ||
</mappedresources> | ||
|
||
<zipfileset dir="${config.dir}" includes="metadata.xml" /> | ||
|
||
<zipfileset dir="${basedir}" includes="${entities}/**/*.xml" /> | ||
<zipfileset dir="${basedir}" includes="${localization}/**/*.json" /> | ||
<zipfileset dir="${minify.dir}" includes="**/*.*" /> | ||
<zipfileset dir="${basedir}" includes="${ui}/**/jslibrary/*.*" /> | ||
<zipfileset dir="${lib.dir}" includes="**/*.jar" prefix="${package.common.lib.dir}/"/> | ||
</zip> | ||
</target> | ||
|
||
<target name="package-extension-minify-custom" depends="build-jars,copy-minify,metadata-custom"> | ||
<zip destfile="${zip.dir}/${minify-custom-zip.file.name}"> | ||
<mappedresources> | ||
<fileset dir="${build.dir}" includes="${extension.jar}" /> | ||
<globmapper from="*" to="${package.common.lib.dir}/*" /> | ||
</mappedresources> | ||
|
||
<zipfileset dir="${custom.dir}" includes="metadata.xml" /> | ||
|
||
<zipfileset dir="${basedir}" includes="${entities}/**/*.xml" /> | ||
<zipfileset dir="${basedir}" includes="${localization}/**/*.json" /> | ||
<zipfileset dir="${minify.dir}" includes="**/*.*" /> | ||
<zipfileset dir="${basedir}" includes="${ui}/**/jslibrary/*.*" /> | ||
<zipfileset dir="${lib.dir}" includes="**/*.jar" prefix="${package.common.lib.dir}/"/> | ||
</zip> | ||
</target> | ||
|
||
<target name="build" depends="package-extension,package-extension-minify,package-extension-minify-custom"> | ||
<echo message="Building ${ant.project.name} extension package..."/> | ||
</target> | ||
|
||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project name="CircularSliderWidget" basedir="." default="build"> | ||
|
||
<property name="extension.jar" value="circularsliderwidget.jar" /> | ||
|
||
<property name="target" value="1.8" /> | ||
<property name="source" value="1.8" /> | ||
<property name="debuglevel" value="source,lines,vars" /> | ||
<property name="common" value="common" /> | ||
<property name="ui" value="ui" /> | ||
<property name="lib" value="lib" /> | ||
<property name="entities" value="Entities" /> | ||
<property name="localization" value="Localization" /> | ||
<property name="src.dir" value="${basedir}/src" /> | ||
<property name="build.dir" value="${user.home}/builds/${ant.project.name}/bin" /> | ||
<property name="config.dir" value="${basedir}/configfiles" /> | ||
<property name="ui.dir" value="${basedir}/${ui}" /> | ||
<property name="lib.dir" value="${basedir}/${lib}" /> | ||
<property name="zip.dir" value="${user.home}/builds/${ant.project.name}/build/distributions" /> | ||
<property name="entity.dir" value="${basedir}/Entities" /> | ||
<property name="localization.dir" value="${basedir}/${localization}" /> | ||
|
||
<property file="extension.properties" /> | ||
|
||
<!-- ExtensionPackage directory structure props --> | ||
<property name="package.lib.basedir" value="${lib}" /> | ||
<property name="package.ui.basedir" value="${ui}" /> | ||
<property name="package.common.lib.dir" value="${package.lib.basedir}/${common}" /> | ||
<property name="package.common.ui.dir" value="${package.ui.basedir}/${common}" /> | ||
|
||
<!-- Extension file info --> | ||
<property name="zip.file.name" value="${ant.project.name}.zip" /> | ||
|
||
<tstamp> | ||
<format property="NOW" pattern="yyyy-MM-dd HH:mm:ss" /> | ||
</tstamp> | ||
|
||
<!-- define the classpath so it picks up the ThingWorx SDK jar relative to this basedir --> | ||
<path id="jar.classpath"> | ||
<pathelement location="${build.dir}" /> | ||
<fileset dir="${basedir}/twx-lib" includes="*.jar" /> | ||
<fileset dir="${lib.dir}" includes="*.jar" erroronmissingdir="false" /> | ||
</path> | ||
|
||
<target name="clean"> | ||
<delete dir="${build.dir}" /> | ||
<delete dir="${zip.dir}" /> | ||
</target> | ||
|
||
<target name="init" depends="clean"> | ||
<mkdir dir="${build.dir}" /> | ||
|
||
<copy includeemptydirs="false" todir="${build.dir}"> | ||
<fileset dir="${src.dir}"> | ||
<exclude name="**/*.launch" /> | ||
<exclude name="**/*.java" /> | ||
</fileset> | ||
</copy> | ||
</target> | ||
|
||
<target name="build-source" depends="init"> | ||
<echo message="${ant.project.name}: ${ant.file}" /> | ||
<javac debug="true" debuglevel="${debuglevel}" destdir="${build.dir}" source="${source}" target="${target}" includeantruntime="false"> | ||
<src path="${src.dir}" /> | ||
<classpath refid="jar.classpath" /> | ||
</javac> | ||
</target> | ||
|
||
<target name="check-bin" depends="build-source"> | ||
<fileset dir="${build.dir}" id="binfileset" /> | ||
<condition property="bindir.empty"> | ||
<length length="0"> | ||
<fileset refid="binfileset" /> | ||
</length> | ||
</condition> | ||
</target> | ||
|
||
<target name="build-jars" depends="check-bin" unless="bindir.empty"> | ||
<echo message="building ${extension.jar} to ${build.dir}..." /> | ||
<jar destfile="${build.dir}/${extension.jar}"> | ||
<!-- generate MANIFEST inline --> | ||
<manifest> | ||
<attribute name="Built-By" value="Eclipse Plugin for ThingWorx Extension Development ${twx_eclipse_plugin_version}" /> | ||
<attribute name="Build-Date" value="${NOW}" /> | ||
<section name="${ant.project.name}"> | ||
<attribute name="Package-Title" value="${ant.project.name}" /> | ||
<attribute name="Package-Version" value="${package_version}" /> | ||
<attribute name="Package-Vendor" value="${project_vendor}" /> | ||
</section> | ||
</manifest> | ||
|
||
<fileset dir="${build.dir}" /> | ||
</jar> | ||
</target> | ||
|
||
<target name="package-extension" depends="build-jars"> | ||
<zip destfile="${zip.dir}/${zip.file.name}"> | ||
<mappedresources> | ||
<fileset dir="${build.dir}" includes="${extension.jar}" /> | ||
<globmapper from="*" to="${package.common.lib.dir}/*" /> | ||
</mappedresources> | ||
|
||
<zipfileset dir="${config.dir}" includes="metadata.xml" /> | ||
|
||
<zipfileset dir="${basedir}" includes="${entities}/**/*.xml" /> | ||
<zipfileset dir="${basedir}" includes="${localization}/**/*.json" /> | ||
<zipfileset dir="${basedir}" includes="${ui}/**/*.*" /> | ||
<zipfileset dir="${lib.dir}" includes="**/*.jar" prefix="${package.common.lib.dir}/"/> | ||
</zip> | ||
</target> | ||
|
||
<target name="build" depends="package-extension"> | ||
<echo message="Building ${ant.project.name} extension package..."/> | ||
</target> | ||
|
||
</project> |
Oops, something went wrong.