skip to main content
Programmer's documentation > Programming with JViews Maps for Defense > Map Defense GUI interactors > Customizing the Symbol Unclutterer interactor
 
Customizing the Symbol Unclutterer interactor
When a symbol has to be displaced because it collides with another one, this interactor draws a connecting line and a marker at the initial position. You can change the default markers and lines using code such as:
 
IlvArrowLine lineTemplate = new IlvArrowLine();
   lineTemplate.setForeground(Color.red);
   lineTemplate.setLineWidth(2);
   lineTemplate.setArrowPosition(1);
Or, to set up a specific marker:
 
IlvMarker markerTemplate = new IlvMarker();
   markerTemplate.setType(IlvMarker.IlvMarkerFilledCircle);
   markerTemplate.setForeground(Color.orange);
   markerTemplate.setSize(2);
   magInteractor.setTargetMarkerTemplate(markerTemplate);
The displacement of the symbols is done through an IlvAnnealingLabelLayout that you can configure. For example, if you want all the symbols to be displaced, even when not necessary, you can call:
 
magInteractor.getAnnealingLabelLayout().setLabelMovementPolicy(null);

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.