Package edu.cnu.mdi.mapping.layer
Class MapLayerStyle
java.lang.Object
edu.cnu.mdi.mapping.layer.MapLayerStyle
Mutable style values used by
MapLayerStyleDialog.
Only values corresponding to enabled capability bits are presented by the dialog. The same object can therefore be used by several different map-layer types.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty style with default numeric values.MapLayerStyle(MapLayerStyle source) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionfloatdoublefloatdoublelongReturns the minimum population threshold.doubledoublebooleanbooleanbooleanvoidsetAdaptive(boolean adaptive) voidsetAvailableFeedbackFields(List<String> fields) voidsetBoundaryColor(Color boundaryColor) voidsetDrawLabels(boolean drawLabels) voidsetDrawOutline(boolean drawOutline) voidsetFillColor(Color fillColor) voidsetLabelColor(Color labelColor) voidsetLabelFontSize(float labelFontSize) voidsetLatitudeStepDeg(double latitudeStepDeg) voidsetLineWidth(float lineWidth) voidsetLongitudeStepDeg(double longitudeStepDeg) voidsetMinimumPopulation(long minimumPopulation) Sets the minimum population threshold.voidsetOpacity(double opacity) voidsetPointColor(Color pointColor) voidsetPointSize(double pointSize) voidsetSelectedFeedbackFields(List<String> fields)
-
Constructor Details
-
MapLayerStyle
public MapLayerStyle()Creates an empty style with default numeric values. -
MapLayerStyle
Copy constructor.- Parameters:
source- source style
-
-
Method Details
-
getAvailableFeedbackFields
- Returns:
- immutable DBF fields available for feedback selection
-
setAvailableFeedbackFields
- Parameters:
fields- DBF fields available for feedback selection
-
getSelectedFeedbackFields
- Returns:
- immutable DBF fields selected for hit-test feedback
-
setSelectedFeedbackFields
- Parameters:
fields- DBF fields selected for hit-test feedback
-
getMinimumPopulation
public long getMinimumPopulation()Returns the minimum population threshold.- Returns:
- minimum population, or a nonpositive value when filtering is disabled
-
setMinimumPopulation
public void setMinimumPopulation(long minimumPopulation) Sets the minimum population threshold.- Parameters:
minimumPopulation- minimum population; negative values are stored as zero
-
getFillColor
- Returns:
- polygon fill color, or
nullwhen no fill is configured
-
setFillColor
- Parameters:
fillColor- polygon fill color;nulldisables filling
-
getBoundaryColor
- Returns:
- line or polygon-boundary color
-
setBoundaryColor
- Parameters:
boundaryColor- line or polygon-boundary color
-
getPointColor
- Returns:
- point-marker color
-
setPointColor
- Parameters:
pointColor- point-marker color
-
getLabelColor
- Returns:
- feature-label color
-
setLabelColor
- Parameters:
labelColor- feature-label color
-
getLineWidth
public float getLineWidth()- Returns:
- line width in pixels
-
setLineWidth
public void setLineWidth(float lineWidth) - Parameters:
lineWidth- line width in pixels; values below0.1are clamped
-
getLabelFontSize
public float getLabelFontSize()- Returns:
- feature-label font size in points
-
setLabelFontSize
public void setLabelFontSize(float labelFontSize) - Parameters:
labelFontSize- font size in points; clamped to[6, 36]
-
getPointSize
public double getPointSize()- Returns:
- point-marker radius in pixels
-
setPointSize
public void setPointSize(double pointSize) - Parameters:
pointSize- point-marker radius in pixels; values below0.1are clamped
-
getOpacity
public double getOpacity()- Returns:
- layer opacity in the range
[0, 1]
-
setOpacity
public void setOpacity(double opacity) - Parameters:
opacity- layer opacity; values are clamped to[0, 1]
-
isAdaptive
public boolean isAdaptive()- Returns:
- whether adaptive graticule spacing is enabled
-
setAdaptive
public void setAdaptive(boolean adaptive) - Parameters:
adaptive- whether to adapt graticule spacing to the visible extent
-
isDrawLabels
public boolean isDrawLabels()- Returns:
- whether feature labels are drawn
-
setDrawLabels
public void setDrawLabels(boolean drawLabels) - Parameters:
drawLabels- whether feature labels should be drawn
-
isDrawOutline
public boolean isDrawOutline()- Returns:
- whether the projection or layer outline is drawn
-
setDrawOutline
public void setDrawOutline(boolean drawOutline) - Parameters:
drawOutline- whether the projection or layer outline should be drawn
-
getLatitudeStepDeg
public double getLatitudeStepDeg()- Returns:
- fixed latitude-line spacing in degrees
-
setLatitudeStepDeg
public void setLatitudeStepDeg(double latitudeStepDeg) - Parameters:
latitudeStepDeg- latitude-line spacing in degrees; clamped to at least one arc-second
-
getLongitudeStepDeg
public double getLongitudeStepDeg()- Returns:
- fixed longitude-line spacing in degrees
-
setLongitudeStepDeg
public void setLongitudeStepDeg(double longitudeStepDeg) - Parameters:
longitudeStepDeg- longitude-line spacing in degrees; clamped to at least one arc-second
-