org.deegree_impl.graphics.optimizers
Class AbstractOptimizer

java.lang.Object
  extended byorg.deegree_impl.graphics.optimizers.AbstractOptimizer
All Implemented Interfaces:
Optimizer
Direct Known Subclasses:
LabelOptimizer, OptimizerChain

public abstract class AbstractOptimizer
extends java.lang.Object
implements Optimizer

This is the abstract base class for Optimizers that need to alter the contents of Themes 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: 1.3 $ $Date: 2004/03/12 15:56:47 $
Author:
Markus Schneider

Field Summary
protected  MapView mapView
           
protected  java.util.Set themes
           
 
Constructor Summary
AbstractOptimizer()
           
 
Method Summary
 void addTheme(Theme theme)
          Adds a Theme that the Optimizer should consider.
abstract  void optimize(java.awt.Graphics2D g)
          Invokes the optimization process.
 void setMapView(MapView mapView)
          Sets the associated MapView-instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

themes

protected java.util.Set themes

mapView

protected MapView mapView
Constructor Detail

AbstractOptimizer

public AbstractOptimizer()
Method Detail

setMapView

public void setMapView(MapView mapView)
Sets the associated MapView-instance. Is needed for the scale and projection information. Called by the MapView.

Specified by:
setMapView in interface Optimizer
Parameters:
mapView -

addTheme

public void addTheme(Theme theme)
Adds a Theme that the Optimizer should consider.

Specified by:
addTheme in interface Optimizer
Parameters:
theme -

optimize

public abstract void optimize(java.awt.Graphics2D g)
Invokes the optimization process. The Optimizer will now process and modify the contents of the attached Themes.

Specified by:
optimize in interface Optimizer
Parameters:
g -