Enum Class EProjection
- All Implemented Interfaces:
Serializable,Comparable<EProjection>,Constable
Each constant carries a human-readable display name accessible via
getName() and toString(). The enum is the single source of
truth for which projections the application supports; adding a new projection
requires adding a constant here, a case in ProjectionFactory, and a
concrete IMapProjection implementation.
The application's initial/default projection is
MapConstants.DEFAULT_PROJECTION, which is also what
MapProjectionMenu pre-selects and MapView2D activates on
construction. Keeping the default in MapConstants ensures both sites
stay in sync.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionEqual Earth equal-area pseudocylindrical projection.Lambert azimuthal equal-area projection (whole globe on a disk).Spherical Mercator projection (cylindrical, conformal).Mollweide equal-area pseudocylindrical projection.Orthographic azimuthal projection (perspective view of one hemisphere). -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumComboBox<EProjection> Creates anEnumComboBoxpre-populated with everyEProjectionvalue and labeled viaprojectionLabel(EProjection).getName()Returns a human-readable name suitable for use in UI labels and menus.static StringReturns the short UI label used in combo boxes and menus for the given projection.toString()Returns the same value asgetName(), making this enum safe to use directly in combo-box and list models that calltoString().static EProjectionReturns the enum constant of this class with the specified name.static EProjection[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MERCATOR
Spherical Mercator projection (cylindrical, conformal).Maps the whole globe except the extreme poles (clamped at ±89°) to a rectangle. Longitude lines are equally spaced vertical lines; latitude lines are horizontal but increasingly spread toward the poles. Area is not preserved.
-
ORTHOGRAPHIC
Orthographic azimuthal projection (perspective view of one hemisphere).Simulates the view of the Earth from an infinitely distant point in space. Only the hemisphere facing the chosen center point is visible. Area distortion increases toward the limb.
-
MOLLWEIDE
Mollweide equal-area pseudocylindrical projection.Maps the entire globe to an ellipse whose area element is everywhere proportional to the corresponding surface area on the sphere. Latitude lines are straight and parallel; meridians are elliptical arcs.
-
EQUAL_EARTH
Equal Earth equal-area pseudocylindrical projection.Maps the whole globe with straight parallels and curved meridians, balancing recognizable continental shapes with exact area preservation.
-
LAMBERT_EQUAL_AREA
Lambert azimuthal equal-area projection (whole globe on a disk).Maps the entire sphere to a disk of radius 2 (for a unit sphere). Like the orthographic projection it is azimuthal, but unlike it the whole globe is visible and area is preserved everywhere.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getName
Returns a human-readable name suitable for use in UI labels and menus.- Returns:
- the display name of this projection
-
toString
Returns the same value asgetName(), making this enum safe to use directly in combo-box and list models that calltoString().- Overrides:
toStringin classEnum<EProjection>- Returns:
- the display name of this projection
-
createComboBox
Creates anEnumComboBoxpre-populated with everyEProjectionvalue and labeled viaprojectionLabel(EProjection).The initially selected item is
null(no selection), which callers may override after construction if a specific default is needed.- Returns:
- a new
EnumComboBoxconfigured forEProjection
-
projectionLabel
Returns the short UI label used in combo boxes and menus for the given projection. This label is intentionally kept concise compared with the fullgetName()value.- Parameters:
p- the projection whose label is requested; must not benull- Returns:
- a short, human-readable label string
-