Class WeatherLayer
- java.lang.Object
-
- de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherLayer
-
public class WeatherLayer extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WeatherLayer.Layers
static class
WeatherLayer.Legend
static class
WeatherLayer.TZ
static class
WeatherLayer.UpdateMode
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CACHE_FILENAME_SUFFIX
static java.lang.String[]
CacheFileNames
java.text.SimpleDateFormat
dateFormat
static float[]
EuropeLargeGeo
static int[]
EuropeLargeSize
static int
LAYERCOUNT
static java.lang.String[]
LayerIDs
static int
layerMapHeight
static int
layerMapWidth
static float[]
WarnMapGeo
static int[]
WarnMapSize
static float
WARNMAPX0
static float
WARNMAPX1
static float
WARNMAPY0
static float
WARNMAPY1
-
Constructor Summary
Constructors Constructor Description WeatherLayer(int i)
WeatherLayer(int layer, float[] mapGeo, long targetTime, int width, int height, java.lang.String srs, int updateMode, int[] atop, int legendType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCacheFilename()
static java.lang.String
getCacheFilename(int layer)
static int[]
getDisabledLayersArray(Context context)
long
getFileLastModifiedTime(Context context)
static int[]
getFilteredBrowseItemsOrder(Context context)
java.lang.String
getFullChacheFilepath(Context context)
static long
getFullHourTime(long time, int hour, int daysToAdd, int timeZone)
static java.lang.String
getLabel(Context context, int layer)
static WeatherLayer
getLayer(int i)
Bitmap
getLayerBitmap(Context context)
static java.lang.String
getLayerID(int layer)
static java.util.ArrayList<WeatherLayer>
getLayers(Context context)
static long
getMidnightTime(long time)
static long
getMidnightTime(long time, int daysToAdd)
static int
getRelativeDays(long time)
static java.lang.String
getShortLabel(Context context, int layer)
long
getTargetTime()
java.lang.String
getTimestampString()
Bitmap
getTransparentLayerBitmap(Context context, int targetColor)
static boolean
isInArray(int[] array, int item)
static boolean
isInIntArray(int[] array, int value)
boolean
isOutdated(Context context)
boolean
isPollen()
boolean
isPollenLayerCacheFileOutdated(Context context)
static Bitmap
replaceBitmapColor(Bitmap bitmap, int sourceColor, int targetColor)
void
saveLayerBitmapToCache(Context context, Bitmap bitmap)
boolean
setFileLastModifiedTime(Context context, long time)
-
-
-
Field Detail
-
LAYERCOUNT
public static final int LAYERCOUNT
- See Also:
- Constant Field Values
-
dateFormat
public final java.text.SimpleDateFormat dateFormat
-
WARNMAPX0
public static final float WARNMAPX0
- See Also:
- Constant Field Values
-
WARNMAPY0
public static final float WARNMAPY0
- See Also:
- Constant Field Values
-
WARNMAPX1
public static final float WARNMAPX1
- See Also:
- Constant Field Values
-
WARNMAPY1
public static final float WARNMAPY1
- See Also:
- Constant Field Values
-
WarnMapGeo
public static final float[] WarnMapGeo
-
WarnMapSize
public static final int[] WarnMapSize
-
layerMapWidth
public static final int layerMapWidth
- See Also:
- Constant Field Values
-
layerMapHeight
public static final int layerMapHeight
- See Also:
- Constant Field Values
-
EuropeLargeGeo
public static final float[] EuropeLargeGeo
-
EuropeLargeSize
public static final int[] EuropeLargeSize
-
CACHE_FILENAME_SUFFIX
public static final java.lang.String CACHE_FILENAME_SUFFIX
- See Also:
- Constant Field Values
-
CacheFileNames
public static final java.lang.String[] CacheFileNames
-
LayerIDs
public static final java.lang.String[] LayerIDs
-
-
Method Detail
-
isInIntArray
public static boolean isInIntArray(int[] array, int value)
-
getDisabledLayersArray
public static int[] getDisabledLayersArray(Context context)
-
getFilteredBrowseItemsOrder
public static int[] getFilteredBrowseItemsOrder(Context context)
-
getCacheFilename
public static java.lang.String getCacheFilename(int layer)
-
getCacheFilename
public java.lang.String getCacheFilename()
-
getFullChacheFilepath
public java.lang.String getFullChacheFilepath(Context context)
-
getFileLastModifiedTime
public long getFileLastModifiedTime(Context context)
-
setFileLastModifiedTime
public boolean setFileLastModifiedTime(Context context, long time)
-
getLayerID
public static java.lang.String getLayerID(int layer)
-
getLabel
public static java.lang.String getLabel(Context context, int layer)
-
getShortLabel
public static java.lang.String getShortLabel(Context context, int layer)
-
getMidnightTime
public static long getMidnightTime(long time, int daysToAdd)
-
getMidnightTime
public static long getMidnightTime(long time)
-
getRelativeDays
public static int getRelativeDays(long time)
-
getFullHourTime
public static long getFullHourTime(long time, int hour, int daysToAdd, int timeZone)
-
isOutdated
public boolean isOutdated(Context context)
-
getLayer
public static WeatherLayer getLayer(int i)
-
isInArray
public static boolean isInArray(int[] array, int item)
-
getLayers
public static java.util.ArrayList<WeatherLayer> getLayers(Context context)
-
getLayerBitmap
public Bitmap getLayerBitmap(Context context)
-
getTransparentLayerBitmap
public Bitmap getTransparentLayerBitmap(Context context, int targetColor)
-
replaceBitmapColor
public static Bitmap replaceBitmapColor(Bitmap bitmap, int sourceColor, int targetColor)
-
getTargetTime
public long getTargetTime()
-
getTimestampString
public java.lang.String getTimestampString()
-
saveLayerBitmapToCache
public void saveLayerBitmapToCache(Context context, Bitmap bitmap)
-
isPollenLayerCacheFileOutdated
public boolean isPollenLayerCacheFileOutdated(Context context)
-
isPollen
public boolean isPollen()
-
-