java.lang.Object
eu.hansolo.fx.countries.tools.Helper

public class Helper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static final double
    bearing(double x1, double y1, double x2, double y2)
     
    static final double
    bearing(eu.hansolo.toolboxfx.geom.Point p1, eu.hansolo.toolboxfx.geom.Point p2)
     
    static final double
    clamp(double min, double max, double value)
     
    static final float
    clamp(float min, float max, float value)
     
    static final int
    clamp(int min, int max, int value)
     
    static final long
    clamp(long min, long max, long value)
     
    static final String
    colorToWeb(javafx.scene.paint.Color color)
     
    static final Map<String,List<CountryPath>>
     
    static final Map<Country,List<CountryPath>>
     
    static final double
    distance(double x1, double y1, double x2, double y2)
     
    static final Map<String,Records.Airport>
     
     
    static final List<Records.City>
     
    static final List<Records.City>
     
    static final javafx.scene.paint.Color
    getColorAt(javafx.scene.paint.LinearGradient gradient, double fraction)
     
    static final double
    getControlPointAngle(eu.hansolo.toolboxfx.geom.Point p1, eu.hansolo.toolboxfx.geom.Point p2)
     
    static final double[]
    getCubicBezierXYatT(double startPointX, double startPointY, double controlPoint1X, double controlPoint1Y, double controlPoint2X, double controlPoint2Y, double endPointX, double endPointY, double distance)
     
    static final eu.hansolo.toolboxfx.geom.Point
    getCubicBezierXYatT(eu.hansolo.toolboxfx.geom.Point startPoint, eu.hansolo.toolboxfx.geom.Point controlPoint1, eu.hansolo.toolboxfx.geom.Point controlPoint2, eu.hansolo.toolboxfx.geom.Point endPoint, double distance)
     
    static final double
    getDecimalDeg(int degrees, int minutes, double seconds)
     
    static final double[]
    getMidPoint(double x1, double y1, double x2, double y2)
     
    static final <T extends eu.hansolo.toolboxfx.geom.Point>
    eu.hansolo.toolboxfx.geom.Point
    getMidPoint(T p1, T p2)
     
    static final int
    getMinutes(double decimalDegree)
     
    static final OperatingSystem
     
    static final Map<Country,Long>
     
    static final double
    getSeconds(double decimalDegree)
     
    static final eu.hansolo.toolboxfx.geom.Point
    latLonToXY(double lat, double lon)
     
    static final double[]
    latLonToXY(double latitude, double longitude, double mapOffsetX, double mapOffsetY, double mapWidth, double mapHeight)
     
    static final eu.hansolo.toolboxfx.geom.Point
    latLonToXY(eu.hansolo.toolboxfx.geom.Point latlon)
     
    static final eu.hansolo.toolboxfx.geom.Point
    latLonToXY(eu.hansolo.toolboxfx.geom.Point latlon, double mapOffsetX, double mapOffsetY, double mapWidth, double mapHeight)
     
    static final Properties
     
    static final double[]
    rotatePointAroundRotationCenter(double x, double y, double rx, double ry, double angle)
     
    static final eu.hansolo.toolboxfx.geom.Point
    rotatePointAroundRotationCenter(eu.hansolo.toolboxfx.geom.Point p, eu.hansolo.toolboxfx.geom.Point rc, double angle)
     
    static final String
    shortenNumber(long value)
     
    static final String
    shortenNumber(long value, Locale locale)
     
    static final eu.hansolo.toolboxfx.geom.Point
    xyToLatLon(double x, double y)
     
    static final double[]
    xyToLatLon(double x, double y, double mapOffsetX, double mapOffsetY, double mapWidth, double mapHeight)
     
    static final eu.hansolo.toolboxfx.geom.Point
    xyToLatLon(eu.hansolo.toolboxfx.geom.Point xy)
     
    static final eu.hansolo.toolboxfx.geom.Point
    xyToLatLon(eu.hansolo.toolboxfx.geom.Point xy, double mapOffsetX, double mapOffsetY, double mapWidth, double mapHeight)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Helper

      public Helper()
  • Method Details

    • clamp

      public static final int clamp(int min, int max, int value)
    • clamp

      public static final long clamp(long min, long max, long value)
    • clamp

      public static final float clamp(float min, float max, float value)
    • clamp

      public static final double clamp(double min, double max, double value)
    • getOperatingSystem

      public static final OperatingSystem getOperatingSystem()
    • getCities

      public static final List<Records.City> getCities()
    • getCapitals

      public static final List<Records.City> getCapitals()
    • getAirports

      public static final Map<String,Records.Airport> getAirports()
    • getAirports2

      public static final Map<String,Records.Airport2> getAirports2()
    • getPopulations

      public static final Map<Country,Long> getPopulations()
    • createCountryPaths

      public static final Map<String,List<CountryPath>> createCountryPaths(Resolution resolution)
    • createCountryPaths2

      public static final Map<Country,List<CountryPath>> createCountryPaths2(Resolution resolution)
    • colorToWeb

      public static final String colorToWeb(javafx.scene.paint.Color color)
    • getColorAt

      public static final javafx.scene.paint.Color getColorAt(javafx.scene.paint.LinearGradient gradient, double fraction)
    • distance

      public static final double distance(double x1, double y1, double x2, double y2)
    • bearing

      public static final double bearing(eu.hansolo.toolboxfx.geom.Point p1, eu.hansolo.toolboxfx.geom.Point p2)
    • bearing

      public static final double bearing(double x1, double y1, double x2, double y2)
    • getMinutes

      public static final int getMinutes(double decimalDegree)
    • getSeconds

      public static final double getSeconds(double decimalDegree)
    • getDecimalDeg

      public static final double getDecimalDeg(int degrees, int minutes, double seconds)
    • latLonToXY

      public static final eu.hansolo.toolboxfx.geom.Point latLonToXY(double lat, double lon)
    • latLonToXY

      public static final eu.hansolo.toolboxfx.geom.Point latLonToXY(eu.hansolo.toolboxfx.geom.Point latlon)
    • latLonToXY

      public static final eu.hansolo.toolboxfx.geom.Point latLonToXY(eu.hansolo.toolboxfx.geom.Point latlon, double mapOffsetX, double mapOffsetY, double mapWidth, double mapHeight)
    • latLonToXY

      public static final double[] latLonToXY(double latitude, double longitude, double mapOffsetX, double mapOffsetY, double mapWidth, double mapHeight)
    • xyToLatLon

      public static final eu.hansolo.toolboxfx.geom.Point xyToLatLon(double x, double y)
    • xyToLatLon

      public static final eu.hansolo.toolboxfx.geom.Point xyToLatLon(eu.hansolo.toolboxfx.geom.Point xy)
    • xyToLatLon

      public static final eu.hansolo.toolboxfx.geom.Point xyToLatLon(eu.hansolo.toolboxfx.geom.Point xy, double mapOffsetX, double mapOffsetY, double mapWidth, double mapHeight)
    • xyToLatLon

      public static final double[] xyToLatLon(double x, double y, double mapOffsetX, double mapOffsetY, double mapWidth, double mapHeight)
    • readProperties

      public static final Properties readProperties(String filename)
    • shortenNumber

      public static final String shortenNumber(long value)
    • shortenNumber

      public static final String shortenNumber(long value, Locale locale)
    • getMidPoint

      public static final <T extends eu.hansolo.toolboxfx.geom.Point> eu.hansolo.toolboxfx.geom.Point getMidPoint(T p1, T p2)
    • getMidPoint

      public static final double[] getMidPoint(double x1, double y1, double x2, double y2)
    • rotatePointAroundRotationCenter

      public static final eu.hansolo.toolboxfx.geom.Point rotatePointAroundRotationCenter(eu.hansolo.toolboxfx.geom.Point p, eu.hansolo.toolboxfx.geom.Point rc, double angle)
    • rotatePointAroundRotationCenter

      public static final double[] rotatePointAroundRotationCenter(double x, double y, double rx, double ry, double angle)
    • getCubicBezierXYatT

      public static final eu.hansolo.toolboxfx.geom.Point getCubicBezierXYatT(eu.hansolo.toolboxfx.geom.Point startPoint, eu.hansolo.toolboxfx.geom.Point controlPoint1, eu.hansolo.toolboxfx.geom.Point controlPoint2, eu.hansolo.toolboxfx.geom.Point endPoint, double distance)
      Parameters:
      startPoint -
      controlPoint1 -
      controlPoint2 -
      endPoint -
      distance - in % (0-1)
      Returns:
    • getCubicBezierXYatT

      public static final double[] getCubicBezierXYatT(double startPointX, double startPointY, double controlPoint1X, double controlPoint1Y, double controlPoint2X, double controlPoint2Y, double endPointX, double endPointY, double distance)
    • getControlPointAngle

      public static final double getControlPointAngle(eu.hansolo.toolboxfx.geom.Point p1, eu.hansolo.toolboxfx.geom.Point p2)