/** * decide which cursor to use (based on text string) * * @param highlighterName */ public void setCurrentHighlighter(String highlighterName) { SWTPlotHighlighter newCursor = null; for (Iterator<SWTPlotHighlighter> thisHighlighter = _myHighlighterList.iterator(); thisHighlighter.hasNext(); ) { SWTPlotHighlighter thisP = (SWTPlotHighlighter) thisHighlighter.next(); if (thisP.getName().equals(highlighterName)) { newCursor = thisP; break; } } // cool. did we find one? if (newCursor != null) setCurrentHighlighter(newCursor); }
/** * decide which cursor to use (based on text string) * * @param cursorName */ public void setCurrentPainter(String cursorName) { TemporalLayerPainter newCursor = null; for (Iterator<TemporalLayerPainter> thisPainter = _myPainterList.iterator(); thisPainter.hasNext(); ) { TemporalLayerPainter thisP = (TemporalLayerPainter) thisPainter.next(); if (thisP.getName().equals(cursorName)) { newCursor = thisP; break; } } // cool. did we find one? if (newCursor != null) setCurrentPainter(newCursor); }