I have the following scenario:
displaySelectedFeatures(IDs);
then some code... and then:
displaySelectedFeatures(features);
Display selected features looks like this:
public void displaySelectedFeatures(Map<Color, Set<FeatureId>> features) {
Style style;
style = createSelectedStyle(features);
Layer layer = mapFrame.getMapContent().layers().get(0);
((FeatureLayer) layer).setStyle(style);
mapFrame.getMapPane().repaint();
}
What I need is the following. First IDs object should be drawn and then after some time e.g. 5 seconds, object - features should be repainted.
What happens it that only the IDs is drawn while features(second repaint) is omitted.
How to solve this?