public void clearMap(boolean performRedraw) { Listener[] painters; painters = mapShell.getListeners(SWT.Paint); for (int i = 0; i < painters.length; i++) mapShell.removeListener(SWT.Paint, painters[i]); if (performRedraw) mapShell.redraw(); }