p.add(new JScrollPane(txtMappaint), GBC.std().fill());
}
protected void createMapPaintText() {
final Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getAllSelected();
ElemStyles elemstyles = MapPaintStyles.getStyles();
NavigatableComponent nc = Main.map.mapView;
double scale = nc.getDist100Pixel();
for (OsmPrimitive osm : sel) {
txtMappaint.append(tr("Styles Cache for \"{0}\":", osm.getDisplayName(DefaultNameFormatter.getInstance())));
MultiCascade mc = new MultiCascade();
for (StyleSource s : elemstyles.getStyleSources()) {
if (s.active) {
txtMappaint.append(tr("\n\n> applying {0} style \"{1}\"\n", getSort(s), s.getDisplayString()));
s.apply(mc, osm, scale, null, false);
txtMappaint.append(tr("\nRange:{0}", mc.range));
for (Entry<String, Cascade> e : mc.getLayers()) {
txtMappaint.append("\n " + e.getKey() + ": \n" + e.getValue());
}
} else {
txtMappaint.append(tr("\n\n> skipping \"{0}\" (not active)", s.getDisplayString()));
}
}
txtMappaint.append(tr("\n\nList of generated Styles:\n"));
StyleList sl = elemstyles.get(osm, scale, nc);
for (ElemStyle s : sl) {
txtMappaint.append(" * " + s + "\n");
}
txtMappaint.append("\n\n");
}