Class MapStyle

java.lang.Object
com.vividsolutions.wms.MapStyle

public class MapStyle extends Object
  • Constructor Details

    • MapStyle

      public MapStyle(String name, String title, String urlLegend, String formatLegend)
      Parameters:
      name - name of this MapStyle
      title - title of this MapStyle
      urlLegend - url String of the legend for this MapStyle
      formatLegend - image format of the legend
    • MapStyle

      public MapStyle(String name, String title, String urlLegend, String formatLegend, int w, int h)
      Parameters:
      name - name of this MapStyle
      title - title of this MapStyle
      urlLegend - url String of the legend for this MapStyle
      formatLegend - image format of the legend
      w - width of the image containing the legend
      h - height of the image containing the legend
  • Method Details

    • getWidth

      public int getWidth()
      Returns:
      the width of the legend image
    • getHeight

      public int getHeight()
      Returns:
      the height of the image legend
    • getName

      public String getName()
      Returns:
      the name of the style
    • setName

      public void setName(String name)
      Parameters:
      name - name of the style
    • getTitle

      public String getTitle()
      Returns:
      the legend title
    • setTitle

      public void setTitle(String title)
      Parameters:
      title - the legend title
    • getUrlLegend

      public String getUrlLegend()
      Returns:
      url legend as a String
    • setUrlLegend

      public void setUrlLegend(String newURLLegend)
      Parameters:
      newURLLegend - the URL of the legend
    • getFormatLegend

      public String getFormatLegend()
      Returns:
      the image format of the legend
    • setFormatLegend

      public void setFormatLegend(String formatLegend)
      Parameters:
      formatLegend - image format of the legend
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLegendIcon

      public Icon getLegendIcon()
      Load the legend icon at first request, not before
      Returns:
      an Icon containing the legend
    • isSelected

      public boolean isSelected()
      Returns:
      true if this MapStyle is selected
    • setSelected

      public void setSelected(boolean selected, boolean check)
      Parameters:
      selected - whether this MapStyle is selected or not
      check - if check, don't unselect the style if the layer has only one style
    • fireStyleChanged

      public void fireStyleChanged()
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • setLayer

      public void setLayer(MapLayer layer)
      Parameters:
      layer - MapLayer associated to this MapStyle