Пример #1
0
  /**
   * 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);
  }
Пример #2
0
  /**
   * 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);
  }