public class StyleServiceImpl extends AbstractStyleService
StyleService
implementation that will provide simple styles
for Lines, Points and Polygons if none have been loaded from an SLD.Constructor and Description |
---|
StyleServiceImpl(ProjectService projectService,
SchemaService schemaService)
Create a style service.
|
Modifier and Type | Method and Description |
---|---|
void |
addStyles(org.geotools.styling.Style... styles)
Add styles to the style service.
|
boolean |
addStyles(URL url)
Add styles from a given URL.
|
void |
clearStyles()
Clear all styles
|
org.eclipse.swt.graphics.RGB |
getBackground()
Get the map background.
|
org.geotools.styling.Style |
getDefinedStyle(TypeDefinition type)
Get the defined style for the given type.
|
org.geotools.styling.Style |
getNamedStyle(String name) |
org.geotools.styling.Style |
getSelectionStyle(DataSet type)
Get a style combining all selection styles for the given data set.
|
org.geotools.styling.Style |
getStyle()
Get a style combining all registered styles.
|
org.geotools.styling.Style |
getStyle(DataSet dataset)
Get a style combining all styles for the given data set.
|
org.geotools.styling.Style |
getStyle(TypeDefinition type,
DataSet dataSet)
This implementation will build a simple style if none is defined
previously.
|
void |
setBackground(org.eclipse.swt.graphics.RGB color)
Set the map background.
|
addListener, notifyBackgroundChanged, notifySettingsChanged, notifyStylesAdded, notifyStylesRemoved, removeListener
public StyleServiceImpl(ProjectService projectService, SchemaService schemaService)
projectService
- the project serviceschemaService
- the schema servicepublic org.geotools.styling.Style getNamedStyle(String name)
name
- the String that identifies the Style
that should be
returned.Style
for the given name. Will return a new
Style
object if there is no Style of the given name.StyleService.getNamedStyle(String)
public org.geotools.styling.Style getStyle(TypeDefinition type, DataSet dataSet)
type
- the type definitiondataSet
- the type data setStyle
for the given type.StyleService.getStyle(TypeDefinition, DataSet)
public org.geotools.styling.Style getDefinedStyle(TypeDefinition type)
StyleService
null
will be returned.type
- the type definitionnull
StyleService.getDefinedStyle(TypeDefinition)
public org.geotools.styling.Style getStyle()
StyleService
StyleService.getStyle()
public org.geotools.styling.Style getStyle(DataSet dataset)
StyleService
dataset
- the data setStyleService.getStyle(DataSet)
public org.geotools.styling.Style getSelectionStyle(DataSet type)
StyleService
type
- the data setStyleService.getSelectionStyle(DataSet)
public void addStyles(org.geotools.styling.Style... styles)
StyleService
styles
- the styles to addStyleService.addStyles(Style[])
public boolean addStyles(URL url)
StyleService
url
- the URL from which to load an SLD document.StyleService.addStyles(URL)
public org.eclipse.swt.graphics.RGB getBackground()
StyleService
StyleService.getBackground()
public void setBackground(org.eclipse.swt.graphics.RGB color)
StyleService
color
- the map background colorStyleService.setBackground(RGB)
public void clearStyles()
StyleService
StyleService.clearStyles()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a