Examples of removeHighlight()


Examples of javax.swing.text.Highlighter.removeHighlight()

  public void clearMarkAllHighlights() {
    Highlighter h = getHighlighter();
    if (h!=null && markAllHighlights!=null) {
      int count = markAllHighlights.size();
      for (int i=0; i<count; i++)
        h.removeHighlight(markAllHighlights.get(i));
      markAllHighlights.clear();
    }
    markedWord = null;
    repaint();
  }
View Full Code Here

Examples of javax.swing.text.Highlighter.removeHighlight()

  public void updateBreakpoints() {
    Highlighter hl = codeEditor.getHighlighter();

    for (Object breakpointsLineTag: breakpointsLineTags) {
      hl.removeHighlight(breakpointsLineTag);
    }
    breakpointsLineTags.clear();

    for (Watchpoint w: mote.getBreakpoints()) {
      if (!w.getCodeFile().equals(displayedFile)) {
View Full Code Here

Examples of javax.swing.text.Highlighter.removeHighlight()

    // Removes only our private highlights
    protected void removeHighlights() {
        Highlighter hilite = getHighlighter();
        for ( Highlighter.Highlight h : hilite.getHighlights()){
            if (h.getPainter() instanceof MyHighlightPainter){
                hilite.removeHighlight(h);
            }
        }
    }
   
    // A private subclass of the default highlight painter
View Full Code Here

Examples of javax.swing.text.Highlighter.removeHighlight()

        Highlighter hilite = textComp.getHighlighter();
        Highlighter.Highlight[] hilites = hilite.getHighlights();
   
        for (int i=0; i<hilites.length; i++) {
            if (hilites[i].getPainter() instanceof MyHighlightPainter) {
                hilite.removeHighlight(hilites[i]);
            }
        }
    }
   
View Full Code Here

Examples of javax.swing.text.Highlighter.removeHighlight()

        textPane.setCaretPosition(apos);
        Highlighter hl = textPane.getHighlighter();

        try {
            if (lastMarkierung != null) {
                hl.removeHighlight(lastMarkierung);
            }
            lastMarkierung = hl.addHighlight(apos, epos, DefaultHighlighter.DefaultPainter);
        } catch (BadLocationException ex) {
            ex.printStackTrace();
        }
View Full Code Here

Examples of javax.swing.text.Highlighter.removeHighlight()

  public void clearMarkAllHighlights() {
    Highlighter h = getHighlighter();
    if (h!=null && markAllHighlights!=null) {
      int count = markAllHighlights.size();
      for (int i=0; i<count; i++)
        h.removeHighlight(markAllHighlights.get(i));
      markAllHighlights.clear();
    }
    markedWord = null;
    repaint();
  }
View Full Code Here

Examples of javax.swing.text.Highlighter.removeHighlight()

        private static void moveHighlight(final JEditorPane editor,
                                          final int start, final int end) {
            Highlighter highlighter = editor.getHighlighter();
            Object tag = highlightTags.get(highlighter);
            if (tag != null) {
                highlighter.removeHighlight(tag);
                highlightTags.remove(highlighter);
            }
            try {
                tag = highlighter.addHighlight(start, end,
                                               new LinkHighlightPainter());
View Full Code Here

Examples of javax.swing.text.Highlighter.removeHighlight()

        static void removeHighlight(final JEditorPane editor) {
            Highlighter highlighter = editor.getHighlighter();
            Object tag = highlightTags.get(highlighter);
            if (tag != null) {
                highlighter.removeHighlight(tag);
                highlightTags.remove(highlighter);
            }
        }
    }
View Full Code Here

Examples of javax.swing.text.Highlighter.removeHighlight()

        Highlighter highlighter = getEditor().getHighlighter();
        Highlight[] highlights = highlighter.getHighlights();
       
        for (final Highlight highlight : highlights) {
            if (highlight.getPainter() instanceof ErrorUnderlineHighlightPainter) {
                highlighter.removeHighlight(highlight);
            }
        }

        errorOffsets.clear();
        sidePanel.repaint();
View Full Code Here

Examples of javax.swing.text.Highlighter.removeHighlight()

        Highlighter highlighter = getHighlighter();
        Highlight[] highlights = highlighter.getHighlights();
       
        for (final Highlight highlight : highlights) {
            if (highlight.getPainter() instanceof AmbiguityUnderlineHighlightPainter) {
                highlighter.removeHighlight(highlight);
            }
        }

        ambiguityOffsets.clear();
    }   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.