Examples of Gutter


Examples of org.fife.ui.rtextarea.Gutter

      textArea.setSecondaryLanguageBackground(i+1, secondaryLanguages[i]);
    }

    textArea.setSyntaxScheme(scheme);

    Gutter gutter = RSyntaxUtilities.getGutter(textArea);
    if (gutter!=null) {
      gutter.setBackground(bgColor);
      gutter.setBorderColor(gutterBorderColor);
      gutter.setLineNumberColor(lineNumberColor);
      String fontName = lineNumberFont!=null ? lineNumberFont :
        baseFont.getFamily();
      int fontSize = lineNumberFontSize>0 ? lineNumberFontSize :
        baseFont.getSize();
      Font font = getFont(fontName, Font.PLAIN, fontSize);
      gutter.setLineNumberFont(font);
      gutter.setFoldIndicatorForeground(foldIndicatorFG);
      gutter.setFoldBackground(foldBG);
    }

  }
View Full Code Here

Examples of org.fife.ui.rtextarea.Gutter

        requestFocusInWindow();
        super.configurePopupMenu(popupMenu);
    }

    @Override public void paint(Graphics g) {
        Gutter gutter = scrollPane.getGutter();
        gutter.removeAllTrackingIcons();
        IGutterListener[] gutterListeners = listeners.getListeners(IGutterListener.class);
        for (IGutterListener listener : gutterListeners) {
            for (int line = 0; line < getLineCount(); line++) {
                Icon icon = listener.getIconAtLine(line);
                if (icon != null)
                    try {
                        gutter.addLineTrackingIcon(line, icon);
                    } catch (BadLocationException e) {
                        e.printStackTrace();
                    }
            }
        }
        if (currentLineTrackingInfo != null) {
            try {
                currentLineTrackingInfo = gutter.addOffsetTrackingIcon(currentLineTrackingInfo.getMarkedOffset(),
                        currentLineTrackingInfo.getIcon());
            } catch (BadLocationException e) {
                e.printStackTrace();
            }
        }
View Full Code Here

Examples of org.fife.ui.rtextarea.Gutter

        if (!linenumbers)
            scrollPane.setIconRowHeaderEnabled(true);
        Document document = getDocument();
        document.addDocumentListener(this);
        addCaretListener(this);
        Gutter gutter = scrollPane.getGutter();
        gutter.setLineNumberingStartIndex(startLineNumber);
        gutter.setBookmarkingEnabled(true);
        setupGutterListener(gutter);
    }
View Full Code Here

Examples of org.fife.ui.rtextarea.Gutter

        setCaretPosition(insert.eoff);
        setBracketMatchingEnabled(b);
    }

    public void highlightLine(int line) {
        Gutter gutter = scrollPane.getGutter();
        if (line == -1) {
            if (currentLineTrackingInfo != null)
                gutter.removeTrackingIcon(currentLineTrackingInfo);
            currentLineTrackingInfo = null;
            return ;
        }
        setCaretLine(line);
        try {
            if (currentLineTrackingInfo != null)
                gutter.removeTrackingIcon(currentLineTrackingInfo);
            currentLineTrackingInfo = gutter.addLineTrackingIcon(line, CURRENTLINE);
        } catch (BadLocationException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of org.fife.ui.rtextarea.Gutter

        // have to repaint any views after the receiver.
        RSyntaxTextArea textArea = (RSyntaxTextArea)getContainer();
        textArea.repaint();
        // Must also revalidate container so gutter components, such
        // as line numbers, get updated for this line's new height
        Gutter gutter = RSyntaxUtilities.getGutter(textArea);
        if (gutter!=null) {
          gutter.revalidate();
          gutter.repaint();
        }
      }
      else if (a != null) {
        Component c = getContainer();
        Rectangle alloc = (Rectangle) a;
View Full Code Here

Examples of org.fife.ui.rtextarea.Gutter

     * Repaints the gutter in a text area's scroll pane, if necessary.
     *
     * @param textArea The text area.
     */
    protected void possiblyRepaintGutter(RTextArea textArea) {
      Gutter gutter = RSyntaxUtilities.getGutter(textArea);
      if (gutter!=null) {
        gutter.repaint();
      }
    }
View Full Code Here

Examples of org.fife.ui.rtextarea.Gutter

   * @param textArea The text area.
   * @return The color to use.
   */
  public static Color getFoldedLineBottomColor(RSyntaxTextArea textArea) {
    Color color = Color.gray;
    Gutter gutter = RSyntaxUtilities.getGutter(textArea);
    if (gutter!=null) {
      color = gutter.getFoldIndicatorForeground();
    }
    return color;
  }
View Full Code Here

Examples of org.fife.ui.rtextarea.Gutter

   * @return The gutter, or <code>null</code> if the text area is not in
   *         an {@link RTextScrollPane}.
   * @see RTextScrollPane#getGutter()
   */
  public static Gutter getGutter(RTextArea textArea) {
    Gutter gutter = null;
    Container parent = textArea.getParent();
    if (parent instanceof JViewport) {
      parent = parent.getParent();
      if (parent instanceof RTextScrollPane) {
        RTextScrollPane sp = (RTextScrollPane)parent;
View Full Code Here

Examples of org.fife.ui.rtextarea.Gutter

      secondaryLanguages[i]= textArea.getSecondaryLanguageBackground(i+1);
    }

    scheme = textArea.getSyntaxScheme();

    Gutter gutter = RSyntaxUtilities.getGutter(textArea);
    if (gutter!=null) {
      bgColor = gutter.getBackground();
      gutterBorderColor = gutter.getBorderColor();
      activeLineRangeColor = gutter.getActiveLineRangeColor();
      iconRowHeaderInheritsGutterBG = gutter.getIconRowHeaderInheritsGutterBackground();
      lineNumberColor = gutter.getLineNumberColor();
      lineNumberFont = gutter.getLineNumberFont().getFamily();
      lineNumberFontSize = gutter.getLineNumberFont().getSize();
      foldIndicatorFG = gutter.getFoldIndicatorForeground();
      foldBG = gutter.getFoldBackground();
    }

  }
View Full Code Here

Examples of org.fife.ui.rtextarea.Gutter

      textArea.setSecondaryLanguageBackground(i+1, secondaryLanguages[i]);
    }

    textArea.setSyntaxScheme(scheme);

    Gutter gutter = RSyntaxUtilities.getGutter(textArea);
    if (gutter!=null) {
      gutter.setBackground(bgColor);
      gutter.setBorderColor(gutterBorderColor);
      gutter.setActiveLineRangeColor(activeLineRangeColor);
      gutter.setIconRowHeaderInheritsGutterBackground(iconRowHeaderInheritsGutterBG);
      gutter.setLineNumberColor(lineNumberColor);
      String fontName = lineNumberFont!=null ? lineNumberFont :
        baseFont.getFamily();
      int fontSize = lineNumberFontSize>0 ? lineNumberFontSize :
        baseFont.getSize();
      Font font = getFont(fontName, Font.PLAIN, fontSize);
      gutter.setLineNumberFont(font);
      gutter.setFoldIndicatorForeground(foldIndicatorFG);
      gutter.setFoldBackground(foldBG);
    }

  }
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.