/plugins/GdbPlugin/tags/release-0_4/debugger/jedit/CurrentPositionPainter.java

# · Java · 45 lines · 21 code · 7 blank · 17 comment · 0 complexity · a88a5847f2bef63a65f0b9f62037c482 MD5 · raw file

  1. /*
  2. Copyright (C) 2007 Shlomy Reinstein
  3. This program is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU General Public License
  5. as published by the Free Software Foundation; either version 2
  6. of the License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  14. */
  15. package debugger.jedit;
  16. import java.awt.Color;
  17. import java.awt.Graphics2D;
  18. import java.awt.Point;
  19. import org.gjt.sp.jedit.Buffer;
  20. import org.gjt.sp.jedit.EditPane;
  21. public class CurrentPositionPainter extends DebuggerPainter {
  22. CurrentPositionPainter(EditPane e, Buffer b, int l) {
  23. super(e, b, l);
  24. }
  25. @Override
  26. protected void paintLine(Graphics2D gfx, int screenLine, int physicalLine, int start, int end, int y, Point p) {
  27. gfx.setColor(Color.MAGENTA);
  28. gfx.drawLine(p.x, p.y + 5, p.x + 10, p.y + 5);
  29. gfx.drawLine(p.x, p.y + 6, p.x + 10, p.y + 6);
  30. gfx.drawLine(p.x + 7, p.y + 2, p.x + 10, p.y + 5);
  31. gfx.drawLine(p.x + 6, p.y + 2, p.x + 9, p.y + 5);
  32. gfx.drawLine(p.x + 7, p.y + 9, p.x + 10, p.y + 6);
  33. gfx.drawLine(p.x + 6, p.y + 9, p.x + 9, p.y + 6);
  34. }
  35. }