Package org.apache.uima.caseditor.editor.util

Examples of org.apache.uima.caseditor.editor.util.Span


    List<AnnotationFS> selection = new ArrayList<AnnotationFS>();

    if (isSomethingSelected()) {
      Point selectedText = getSourceViewer().getTextWidget().getSelectionRange();

      Span selecectedSpan = new Span(selectedText.x, selectedText.y);

      Collection<AnnotationFS> selectedAnnotations = getAnnotation(getDocument().getCAS(),
              getAnnotationMode(), selecectedSpan);

      for (AnnotationFS annotation : selectedAnnotations) {
View Full Code Here


        Point selection = mTextWidget.getSelectionRange();

        // get old annotations of current type for this area
        // if there is something ... the delete them and add
        Collection<AnnotationFS> oldAnnotations = getDocument().getAnnotation(
            getAnnotationMode(), new Span(selection.x, selection.y));

        if (!oldAnnotations.isEmpty()) {
          getDocument().removeFeatureStructures(oldAnnotations);
        }
View Full Code Here

        // The z offsets should be drawn, the X offsets should not be overdrawn. That is solved
        // by drawing for every z offset area one background rectangle.
       
        List<Span> dontOverDrawSpans = new ArrayList<Span>();
       
        Span annotationSpan = new Span(offset, length);
       
        // add all style ranges to the list in the range of the annotation
        for (StyleRange styleRange : textWidget.getStyleRanges(offset, length)) {
          Span styleRangeSpan = new Span(styleRange.start, styleRange.length);
          if (styleRangeSpan.getLength() > 0)
              dontOverDrawSpans.add(styleRangeSpan);
        }
       
        // add text selection to the list if intersects with annotation
        Point selection = textWidget.getSelection();
        Span selectionSpan = new Span(selection.x, selection.y - selection.x);
        if (annotationSpan.isIntersecting(selectionSpan) && selectionSpan.getLength() > 0) {
          dontOverDrawSpans.add(selectionSpan);
        }
       
        Collections.sort(dontOverDrawSpans);
        // TODO: Asks on mailing list for help ...
View Full Code Here

    List<AnnotationFS> selection = new ArrayList<AnnotationFS>();

    if (isSomethingSelected()) {
      Point selectedText = getSourceViewer().getTextWidget().getSelectionRange();

      Span selecectedSpan = new Span(selectedText.x, selectedText.y);

      Collection<AnnotationFS> selectedAnnotations = getDocument().getAnnotation(
              getAnnotationMode(), selecectedSpan);

      for (AnnotationFS annotation : selectedAnnotations) {
View Full Code Here

TOP

Related Classes of org.apache.uima.caseditor.editor.util.Span

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.