Enum ImageryInfo.ImageryCategory
- java.lang.Object
-
- java.lang.Enum<ImageryInfo.ImageryCategory>
-
- org.openstreetmap.josm.data.imagery.ImageryInfo.ImageryCategory
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ImageryInfo.ImageryCategory>
,ICommonSource<ImageryInfo.ImageryCategory>
,ISourceCategory<ImageryInfo.ImageryCategory>
- Enclosing class:
- ImageryInfo
public static enum ImageryInfo.ImageryCategory extends java.lang.Enum<ImageryInfo.ImageryCategory> implements ISourceCategory<ImageryInfo.ImageryCategory>
Category of imagery entry.- Since:
- 13792
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ELEVATION
A map of digital terrain model, digital surface model or contour lines.HISTORICMAP
A historic or otherwise outdated map.HISTORICPHOTO
A historic or otherwise outdated aerial or satellite photo.MAP
A map.OSMBASEDMAP
A map based on OSM data.OTHER
Any other type of imageryPHOTO
A aerial or satellite photo.QUALITY_ASSURANCE
A map for quality assurance
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
category
private java.lang.String
description
private static java.util.Map<ImageProvider.ImageSizes,java.util.Map<ImageryInfo.ImageryCategory,javax.swing.ImageIcon>>
iconCache
-
Constructor Summary
Constructors Modifier Constructor Description private
ImageryCategory(java.lang.String category, java.lang.String description)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImageryInfo.ImageryCategory
fromString(java.lang.String s)
Returns the imagery category from the given category string.java.lang.String
getCategoryString()
Returns the unique string identifying this category.ImageryInfo.ImageryCategory
getDefault()
Get the default value for the Enumjava.lang.String
getDescription()
Returns the description of this category.ImageryInfo.ImageryCategory
getFromString(java.lang.String s)
Returns the source category from the given category string.javax.swing.ImageIcon
getIcon(ImageProvider.ImageSizes size)
Returns the category icon at the given size.static ImageryInfo.ImageryCategory
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ImageryInfo.ImageryCategory[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
PHOTO
public static final ImageryInfo.ImageryCategory PHOTO
A aerial or satellite photo.
-
ELEVATION
public static final ImageryInfo.ImageryCategory ELEVATION
A map of digital terrain model, digital surface model or contour lines.
-
MAP
public static final ImageryInfo.ImageryCategory MAP
A map.
-
HISTORICMAP
public static final ImageryInfo.ImageryCategory HISTORICMAP
A historic or otherwise outdated map.
-
OSMBASEDMAP
public static final ImageryInfo.ImageryCategory OSMBASEDMAP
A map based on OSM data.
-
HISTORICPHOTO
public static final ImageryInfo.ImageryCategory HISTORICPHOTO
A historic or otherwise outdated aerial or satellite photo.
-
QUALITY_ASSURANCE
public static final ImageryInfo.ImageryCategory QUALITY_ASSURANCE
A map for quality assurance
-
OTHER
public static final ImageryInfo.ImageryCategory OTHER
Any other type of imagery
-
-
Field Detail
-
category
private final java.lang.String category
-
description
private final java.lang.String description
-
iconCache
private static final java.util.Map<ImageProvider.ImageSizes,java.util.Map<ImageryInfo.ImageryCategory,javax.swing.ImageIcon>> iconCache
-
-
Constructor Detail
-
ImageryCategory
private ImageryCategory(java.lang.String category, java.lang.String description)
-
-
Method Detail
-
values
public static ImageryInfo.ImageryCategory[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ImageryInfo.ImageryCategory c : ImageryInfo.ImageryCategory.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ImageryInfo.ImageryCategory valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getCategoryString
public java.lang.String getCategoryString()
Returns the unique string identifying this category.- Specified by:
getCategoryString
in interfaceISourceCategory<ImageryInfo.ImageryCategory>
- Returns:
- the unique string identifying this category
-
getDescription
public java.lang.String getDescription()
Returns the description of this category.- Specified by:
getDescription
in interfaceISourceCategory<ImageryInfo.ImageryCategory>
- Returns:
- the description of this category
-
getIcon
public javax.swing.ImageIcon getIcon(ImageProvider.ImageSizes size)
Returns the category icon at the given size.- Specified by:
getIcon
in interfaceISourceCategory<ImageryInfo.ImageryCategory>
- Parameters:
size
- icon wanted size- Returns:
- the category icon at the given size
- Since:
- 15049
-
fromString
public static ImageryInfo.ImageryCategory fromString(java.lang.String s)
Returns the imagery category from the given category string.- Parameters:
s
- The category string- Returns:
- the imagery category matching the given category string
-
getDefault
public ImageryInfo.ImageryCategory getDefault()
Description copied from interface:ICommonSource
Get the default value for the Enum- Specified by:
getDefault
in interfaceICommonSource<ImageryInfo.ImageryCategory>
- Returns:
- The default value
-
getFromString
public ImageryInfo.ImageryCategory getFromString(java.lang.String s)
Description copied from interface:ICommonSource
Returns the source category from the given category string.- Specified by:
getFromString
in interfaceICommonSource<ImageryInfo.ImageryCategory>
- Parameters:
s
- The category string- Returns:
- the source category matching the given category string
-
-