Package com.vividsolutions.wms
Class MapStyle
- java.lang.Object
-
- com.vividsolutions.wms.MapStyle
-
public class MapStyle extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)voidfireStyleChanged()StringgetFormatLegend()intgetHeight()IcongetLegendIcon()Load the legend icon at first request, not beforeStringgetName()StringgetTitle()StringgetUrlLegend()intgetWidth()booleanisSelected()voidsetFormatLegend(String formatLegend)voidsetLayer(MapLayer layer)voidsetName(String name)voidsetSelected(boolean selected, boolean check)voidsetTitle(String title)voidsetUrlLegend(String newURLLegend)StringtoString()
-
-
-
Constructor Detail
-
MapStyle
public MapStyle(String name, String title, String urlLegend, String formatLegend)
- Parameters:
name- name of this MapStyletitle- title of this MapStyleurlLegend- url String of the legend for this MapStyleformatLegend- 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 MapStyletitle- title of this MapStyleurlLegend- url String of the legend for this MapStyleformatLegend- image format of the legendw- width of the image containing the legendh- height of the image containing the legend
-
-
Method Detail
-
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
-
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 notcheck- if check, don't unselect the style if the layer has only one style
-
fireStyleChanged
public void fireStyleChanged()
-
setLayer
public void setLayer(MapLayer layer)
- Parameters:
layer- MapLayer associated to this MapStyle
-
-