Class MapLayerStyle

java.lang.Object
edu.cnu.mdi.mapping.layer.MapLayerStyle

public class MapLayerStyle extends Object
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 Details

    • MapLayerStyle

      public MapLayerStyle()
      Creates an empty style with default numeric values.
    • MapLayerStyle

      public MapLayerStyle(MapLayerStyle source)
      Copy constructor.
      Parameters:
      source - source style
  • Method Details

    • getAvailableFeedbackFields

      public List<String> getAvailableFeedbackFields()
      Returns:
      immutable DBF fields available for feedback selection
    • setAvailableFeedbackFields

      public void setAvailableFeedbackFields(List<String> fields)
      Parameters:
      fields - DBF fields available for feedback selection
    • getSelectedFeedbackFields

      public List<String> getSelectedFeedbackFields()
      Returns:
      immutable DBF fields selected for hit-test feedback
    • setSelectedFeedbackFields

      public void setSelectedFeedbackFields(List<String> fields)
      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

      public Color getFillColor()
      Returns:
      polygon fill color, or null when no fill is configured
    • setFillColor

      public void setFillColor(Color fillColor)
      Parameters:
      fillColor - polygon fill color; null disables filling
    • getBoundaryColor

      public Color getBoundaryColor()
      Returns:
      line or polygon-boundary color
    • setBoundaryColor

      public void setBoundaryColor(Color boundaryColor)
      Parameters:
      boundaryColor - line or polygon-boundary color
    • getPointColor

      public Color getPointColor()
      Returns:
      point-marker color
    • setPointColor

      public void setPointColor(Color pointColor)
      Parameters:
      pointColor - point-marker color
    • getLabelColor

      public Color getLabelColor()
      Returns:
      feature-label color
    • setLabelColor

      public void setLabelColor(Color labelColor)
      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 below 0.1 are 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 below 0.1 are 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