Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.style.service
Interface StyleService

All Known Implementing Classes:
AbstractStyleService, StyleServiceImpl

public interface StyleService

The StyleService provides access to the Styles currently loaded.

Author:
Thorsten Reitz, Simon Templer
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Method Summary
 void addListener(StyleServiceListener listener)
          Adds a style service listener.
 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)
          Get the style for a given type.
 void removeListener(StyleServiceListener listener)
          Removes a style service listener.
 void setBackground(org.eclipse.swt.graphics.RGB color)
          Set the map background.
 

Method Detail

getStyle

org.geotools.styling.Style getStyle(TypeDefinition type,
                                    DataSet dataSet)
Get the style for a given type.

Parameters:
type - the type definition
dataSet - the type data set
Returns:
a Style for the given type.

getStyle

org.geotools.styling.Style getStyle()
Get a style combining all registered styles.

Returns:
the style

getStyle

org.geotools.styling.Style getStyle(DataSet dataset)
Get a style combining all styles for the given data set.

Parameters:
dataset - the data set
Returns:
the style

getNamedStyle

org.geotools.styling.Style getNamedStyle(String name)
Parameters:
name - the String that identifies the Style that should be returned.
Returns:
a Style for the given name. Will return a new Style object if there is no Style of the given name.

addStyles

boolean addStyles(URL url)
Add styles from a given URL.

Parameters:
url - the URL from which to load an SLD document.
Returns:
true if loading the URL was successful.

addStyles

void addStyles(org.geotools.styling.Style... styles)
Add styles to the style service. Will override any styles that exist for the same types.

Parameters:
styles - the styles to add

clearStyles

void clearStyles()
Clear all styles


getSelectionStyle

org.geotools.styling.Style getSelectionStyle(DataSet type)
Get a style combining all selection styles for the given data set.

Parameters:
type - the data set
Returns:
the style

getDefinedStyle

org.geotools.styling.Style getDefinedStyle(TypeDefinition type)
Get the defined style for the given type. If none is defined, null will be returned.

Parameters:
type - the type definition
Returns:
the type style or null

getBackground

org.eclipse.swt.graphics.RGB getBackground()
Get the map background.

Returns:
the map background color

setBackground

void setBackground(org.eclipse.swt.graphics.RGB color)
Set the map background.

Parameters:
color - the map background color

addListener

void addListener(StyleServiceListener listener)
Adds a style service listener.

Parameters:
listener - the listener to add

removeListener

void removeListener(StyleServiceListener listener)
Removes a style service listener.

Parameters:
listener - the listener to remove

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d