deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.graphics.optimizers
Interface Optimizer

All Known Implementing Classes:
AbstractOptimizer, LabelOptimizer, OptimizerChain

public interface Optimizer

This is the interface for (graphical) Optimizers that need to alter the contents of Themes (e.g. positions of display elements} before the parent MapView object is painted.

For example, the placements of LabelDisplayElements in a Theme may be optimized to minimize overlapping using the LabelOptimizer.

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Method Summary
 void addTheme(Theme theme)
          Adds a Theme to be considered by this Optimizer.
 void optimize(java.awt.Graphics2D g)
          Invokes the optimization process.
 void setMapView(MapView mapView)
          Sets the associated MapView instance.
 

Method Detail

setMapView

void setMapView(MapView mapView)
Sets the associated MapView instance. This is needed to provide scale and projection information. Called by the MapView.

Parameters:
mapView - MapView instance to associate with this Optimizer

addTheme

void addTheme(Theme theme)
Adds a Theme to be considered by this Optimizer.

Parameters:
theme - Theme to be considered

optimize

void optimize(java.awt.Graphics2D g)
              throws java.lang.Exception
Invokes the optimization process. This Optimizer will now process and modify the contents of the attached Themes.

Parameters:
g - graphis context that will be used to draw the optimized display elements
Throws:
java.lang.Exception

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org