removeText method
Replaces the legend text and associated text marker rectangle of id
.
Implementation
void removeText(String id) {
if (textElements.containsKey(id)) {
textElements[id].remove(); // text element from legendArea
textElements.remove(id);
}
if (textMarkers.containsKey(id)) {
textMarkers[id].remove(); // rect from legendArea
textMarkers.remove(id);
}
curlineNo = nlines; // reset y position
}