|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.deegree_impl.graphics.optimizers.AbstractOptimizer
org.deegree_impl.graphics.optimizers.LabelOptimizer
Selects optimized Labels (graphical representations generated from LabelDisplayElements) that have a minimimal amount of overlapping.
The labeling and optimization approach uses ideas from papers by Ingo Petzold on automated label placement.
TODO: The handling of rotated labels is currently broken. Don't use rotated LabelDisplayElements with this optimizer at the moment!
| Field Summary | |
private boolean[][] |
candidates
|
private java.util.ArrayList |
choices
|
private java.util.ArrayList |
displayElements
|
| Fields inherited from class org.deegree_impl.graphics.optimizers.AbstractOptimizer |
mapView, themes |
| Constructor Summary | |
LabelOptimizer()
Creates a new instance of LabelOptimizer. |
|
LabelOptimizer(Theme[] themes)
Creates a new instance of LabelOptimizer for the given Themes. |
|
| Method Summary | |
void |
addTheme(Theme theme)
Adds a Theme that the Optimizer should consider. |
private void |
anneal()
Performs the "Simulated Annealing" for the LabelChoices. |
private void |
buildCollisionMatrix()
Builds the collision matrix for all LabelChoices. |
private double |
objectiveFunction()
Calculates a quality value for the currently selected combination of Labels. |
void |
optimize(java.awt.Graphics2D g)
Finds optimized Label representations for the registered LabelDisplayElements. |
| Methods inherited from class org.deegree_impl.graphics.optimizers.AbstractOptimizer |
setMapView |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.util.ArrayList displayElements
private java.util.ArrayList choices
private boolean[][] candidates
| Constructor Detail |
public LabelOptimizer()
public LabelOptimizer(Theme[] themes)
themes - | Method Detail |
public void addTheme(Theme theme)
addTheme in interface OptimizeraddTheme in class AbstractOptimizertheme - public void optimize(java.awt.Graphics2D g)
optimize in interface Optimizeroptimize in class AbstractOptimizerg - private void buildCollisionMatrix()
private void anneal()
private double objectiveFunction()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||