Examples of GutterIconInfo


Examples of org.fife.ui.rtextarea.GutterIconInfo

    sp.setIconRowHeaderEnabled(true);
   
    Gutter gutter = sp.getGutter();
    try {
      Icon icon = new ImageIcon(ImageIO.read(getClass().getResource("/breakpoint.png")));
      GutterIconInfo info = gutter.addLineTrackingIcon(0, icon);
     
   
    } catch(Exception e) {
      e.printStackTrace();
    }
View Full Code Here

Examples of org.fife.ui.rtextarea.GutterIconInfo

    public void revalidateBreakpoints(DocumentEvent documentEvent) {
        script.setScript(getText());
        java.util.List<GutterIconInfo> breakpointInfo = editor.scrollPane.getBreakpoints();
        try {
            for (int i = 0; i < breakpointInfo.size(); i++) {
                GutterIconInfo b = breakpointInfo.get(i);
                int line = getLineOfOffset(b.getMarkedOffset());
                if (!isBreakableLine(line)) {
                    editor.removeBreakpoint(line);
                    i--;
                }
            }
View Full Code Here

Examples of org.fife.ui.rtextarea.GutterIconInfo

            e.printStackTrace();
        }
    }

    public boolean removeBreakpoint(int line) {
        GutterIconInfo breakpoint = getBreakpointAt(line);
        if (breakpoint == null)
            return false;
        removeBreakpoint(breakpoint);
        return true;
    }
View Full Code Here

Examples of org.fife.ui.rtextarea.GutterIconInfo

    // Paint icons
    if (trackingIcons!=null) {
      int lastLine = textArea.getLineCount() - 1;
      for (int i=trackingIcons.size()-1; i>=0; i--) { // Last to first
        GutterIconInfo ti = getTrackingIcon(i);
        int offs = ti.getMarkedOffset();
        if (offs>=0 && offs<=doc.getLength()) {
          int line = root.getElementIndex(offs);
          if (line<=lastLine && line>=topLine) {
            try {
              Icon icon = ti.getIcon();
              if (icon!=null) {
                int lineY = rsta.yForLine(line);
                if (lineY>=y && lineY<=visibleRect.y+visibleRect.height) {
                  int y2 = lineY + (cellHeight-icon.getIconHeight())/2;
                  icon.paintIcon(this, g, 0, y2);
View Full Code Here

Examples of org.fife.ui.rtextarea.GutterIconInfo

    // Paint icons
    if (trackingIcons!=null) {
      int lastLine = textArea.getLineCount() - 1;
      for (int i=trackingIcons.size()-1; i>=0; i--) { // Last to first
        GutterIconInfo ti = getTrackingIcon(i);
        int offs = ti.getMarkedOffset();
        if (offs>=0 && offs<=doc.getLength()) {
          int line = root.getElementIndex(offs);
          if (line<=lastLine && line>=topLine) {
            try {
              int lineY = rsta.yForLine(line);
              if (lineY>=topY && lineY<bottomY) {
                Icon icon = ti.getIcon();
                if (icon!=null) {
                  int y2 = lineY + (cellHeight-icon.getIconHeight())/2;
                  ti.getIcon().paintIcon(this, g, 0, y2);
                  lastLine = line-1; // Paint only 1 icon per line
                }
              }
            } catch (BadLocationException ble) {
              ble.printStackTrace(); // Never happens
View Full Code Here

Examples of org.fife.ui.rtextarea.GutterIconInfo

    // Paint icons
    if (trackingIcons!=null) {
      int lastLine = textArea.getLineCount() - 1;
      for (int i=trackingIcons.size()-1; i>=0; i--) { // Last to first
        GutterIconInfo ti = getTrackingIcon(i);
        int offs = ti.getMarkedOffset();
        if (offs>=0 && offs<=doc.getLength()) {
          int line = root.getElementIndex(offs);
          if (line<=lastLine && line>=topLine) {
            try {
              Icon icon = ti.getIcon();
              if (icon!=null) {
                int lineY = rsta.yForLine(line);
                if (lineY>=y && lineY<=visibleRect.y+visibleRect.height) {
                  int y2 = lineY + (cellHeight-icon.getIconHeight())/2;
                  icon.paintIcon(this, g, 0, y2);
View Full Code Here

Examples of org.fife.ui.rtextarea.GutterIconInfo

    // Paint icons
    if (trackingIcons!=null) {
      int lastLine = textArea.getLineCount() - 1;
      for (int i=trackingIcons.size()-1; i>=0; i--) { // Last to first
        GutterIconInfo ti = getTrackingIcon(i);
        Icon icon = ti.getIcon();
        if (icon!=null) {
          int iconH = icon.getIconHeight();
          int offs = ti.getMarkedOffset();
          if (offs>=0 && offs<=doc.getLength()) {
            int line = root.getElementIndex(offs);
            if (line<=lastLine && line>=topLine) {
              try {
                int lineY = rsta.yForLine(line);
                if (lineY<=bottomY && (lineY+iconH>=topY)) {
                  int y2 = lineY + (cellHeight-iconH)/2;
                  ti.getIcon().paintIcon(this, g, 0, y2);
                  lastLine = line-1; // Paint only 1 icon per line
                }
              } catch (BadLocationException ble) {
                ble.printStackTrace(); // Never happens
              }
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.