Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit 061518de522c256ce04bcaca4d33e76d63aa2f51 @HanSolo committed Jan 8, 2016
Showing with 9,970 additions and 0 deletions.
  1. +14 −0 .gitignore
  2. +1 −0 README.md
  3. +138 −0 build.gradle
  4. +1 −0 contributors.txt
  5. +21 −0 gradle.properties
  6. +164 −0 gradlew
  7. +90 −0 gradlew.bat
  8. +202 −0 license.txt
  9. +1 −0 settings.gradle
  10. +362 −0 src/main/java/eu/hansolo/medusa/Demo.java
  11. +109 −0 src/main/java/eu/hansolo/medusa/Fonts.java
  12. +114 −0 src/main/java/eu/hansolo/medusa/FramedGauge.java
  13. +1,739 −0 src/main/java/eu/hansolo/medusa/Gauge.java
  14. +927 −0 src/main/java/eu/hansolo/medusa/GaugeBuilder.java
  15. +41 −0 src/main/java/eu/hansolo/medusa/GaugeDesign.java
  16. +100 −0 src/main/java/eu/hansolo/medusa/LcdDesign.java
  17. +259 −0 src/main/java/eu/hansolo/medusa/Marker.java
  18. +100 −0 src/main/java/eu/hansolo/medusa/MarkerBuilder.java
  19. +236 −0 src/main/java/eu/hansolo/medusa/Section.java
  20. +95 −0 src/main/java/eu/hansolo/medusa/SectionBuilder.java
  21. +119 −0 src/main/java/eu/hansolo/medusa/Test.java
  22. +33 −0 src/main/java/eu/hansolo/medusa/events/UpdateEvent.java
  23. +28 −0 src/main/java/eu/hansolo/medusa/events/UpdateEventListener.java
  24. +651 −0 src/main/java/eu/hansolo/medusa/skins/AmpSkin.java
  25. +423 −0 src/main/java/eu/hansolo/medusa/skins/BulletChartSkin.java
  26. +306 −0 src/main/java/eu/hansolo/medusa/skins/DashboardSkin.java
  27. +233 −0 src/main/java/eu/hansolo/medusa/skins/FlatSkin.java
  28. +1,363 −0 src/main/java/eu/hansolo/medusa/skins/GaugeSkin.java
  29. +811 −0 src/main/java/eu/hansolo/medusa/skins/ModernSkin.java
  30. +357 −0 src/main/java/eu/hansolo/medusa/skins/SimpleSkin.java
  31. +370 −0 src/main/java/eu/hansolo/medusa/skins/SpaceXSkin.java
  32. +60 −0 src/main/java/eu/hansolo/medusa/tools/AngleConicalGradient.java
  33. +189 −0 src/main/java/eu/hansolo/medusa/tools/ConicalGradient.java
  34. +104 −0 src/main/java/eu/hansolo/medusa/tools/GradientLookup.java
  35. +150 −0 src/main/java/eu/hansolo/medusa/tools/Helper.java
  36. BIN src/main/resources/eu/hansolo/medusa/Lato-Reg.ttf
  37. BIN src/main/resources/eu/hansolo/medusa/Roboto-Bold.ttf
  38. BIN src/main/resources/eu/hansolo/medusa/Roboto-Light.ttf
  39. BIN src/main/resources/eu/hansolo/medusa/Roboto-Medium.ttf
  40. BIN src/main/resources/eu/hansolo/medusa/Roboto-Regular.ttf
  41. BIN src/main/resources/eu/hansolo/medusa/Roboto-Thin.ttf
  42. BIN src/main/resources/eu/hansolo/medusa/RobotoCondensed-Bold.ttf
  43. BIN src/main/resources/eu/hansolo/medusa/RobotoCondensed-Light.ttf
  44. BIN src/main/resources/eu/hansolo/medusa/RobotoCondensed-Regular.ttf
  45. BIN src/main/resources/eu/hansolo/medusa/digital.ttf
  46. BIN src/main/resources/eu/hansolo/medusa/digitalreadout.ttf
  47. BIN src/main/resources/eu/hansolo/medusa/digitalreadoutb.ttf
  48. BIN src/main/resources/eu/hansolo/medusa/elektra.ttf
  49. +37 −0 src/main/resources/eu/hansolo/medusa/framed-gauge.css
  50. +22 −0 src/main/resources/eu/hansolo/medusa/gauge.css
@@ -0,0 +1,14 @@
+.idea
+medusa.iml
+build
+gradle
+logos
+signing.properties
+cache.properties.lock
+fileHashes.bin
+fileSnapshots.bin
+outputFileStates.bin
+taskArtifacts.bin
+otherResources
+._*
+.gradle
@@ -0,0 +1 @@
+A JavaFX library for Gauges. The main focus of this project is to provide Gauges that can be configured in multiple ways.
@@ -0,0 +1,138 @@
+// Medusa main build file
+import org.gradle.api.XmlProvider
+import org.gradle.api.artifacts.maven.MavenDeployment
+
+apply plugin: 'idea'
+apply plugin: 'signing'
+
+def isDevBuild
+def isSnapshotBuild
+def isReleaseBuild
+
+def sonatypeRepositoryUrl
+
+// Apply settings for signing if available
+if (file("signing.properties").exists()) {
+ Properties props = new Properties()
+ props.load(new FileInputStream("signing.properties"))
+ props.each { key, value -> project.ext[key] = value }
+}
+
+
+//set build variables based on build type (release, continuous integration, development)
+if(hasProperty("release")) {
+ isReleaseBuild = true
+ sonatypeRepositoryUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
+} else if (hasProperty("snapshot")) {
+ isSnapshotBuild = true
+ version += "-SNAPSHOT"
+ sonatypeRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
+} else {
+ isDevBuild = true
+}
+
+repositories {
+ jcenter()
+}
+
+allprojects {
+ apply plugin: 'idea'
+ apply plugin: 'java'
+ apply plugin: 'maven'
+
+ idea {
+ project {
+ jdkName '1.8'
+ languageLevel '1.8'
+ }
+ }
+}
+
+// create one jar for the javadoc
+task docs(type: Javadoc) {
+ source subprojects.collect { project -> project.sourceSets.main.allJava }
+ classpath = files(subprojects.collect { project -> project.sourceSets.main.compileClasspath })
+ destinationDir = new File('build/docs/javadoc')
+}
+task javadocJar(type: Jar, dependsOn: docs) {
+ classifier ='javadoc'
+ from 'build/docs/javadoc'
+}
+
+
+// create one jar for the source files
+task sourcesJar(type: Jar, dependsOn: javadocJar) {
+ classifier = 'sources'
+ subprojects.each {
+ subproject ->
+ from subproject.configurations.archives.allArtifacts.files.filter { it.name.endsWith("sources.jar") }.collect { zipTree(it) }
+ }
+}
+
+
+artifacts {
+ archives jar
+ archives javadocJar
+ archives sourcesJar
+}
+
+
+// signing the artifacts
+if (isReleaseBuild) {
+ signing {
+ sign configurations.archives
+ }
+} else {
+ task signArchives {
+ // do nothing
+ }
+}
+
+
+// upload artifacts to maven
+uploadArchives {
+ repositories {
+ if (isDevBuild) {
+ //mavenLocal()
+ }
+ else {
+ mavenDeployer {
+ if(isReleaseBuild) {
+ beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
+ }
+
+ repository(url: sonatypeRepositoryUrl) {
+ authentication(userName: sonatypeUsername, password: sonatypePassword)
+ }
+
+ pom.project {
+ name 'Medusa'
+ packaging 'jar'
+ description 'Medusa is a JavaFX 8 gauges library'
+ url 'https://github.com/HanSolo/Medusa/wiki'
+
+ scm {
+ url 'scm:git@github.com:HanSolo/Medusa.git'
+ connection 'scm:git@github.com:HanSolo/Medusa.git'
+ developerConnection 'scm:git@github.com:HanSolo/Medusa.git'
+ }
+
+ licenses {
+ license {
+ name 'The Apache Software License, Version 2.0'
+ url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ distribution 'repo'
+ }
+ }
+
+ developers {
+ developer {
+ id 'HanSolo'
+ name 'Gerrit Grunwald'
+ }
+ }
+ }
+ }
+ }
+ }
+}
@@ -0,0 +1 @@
+Gerrit Grunwald (han.solo.gg@gmail.com)
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2016 by Gerrit Grunwald
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+sourceCompatibility = 1.8
+targetCompatibility = 1.8
+
+group = eu.hansolo.medusa
+version = 0.1
@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+ echo "$*"
+}
+
+die ( ) {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+ [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+ JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
Oops, something went wrong.

0 comments on commit 061518d

Please sign in to comment.