This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to highlight entire row ?

 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i m using this logic to highlight a entire row on which caret is positioned , but this is not working what happened here is i m taking out the start and end of a line
this logic only highlights the text part but not the empty blank part (i m not talking about white spaces) just a blank part
where i m getting wrong ?
 
Rob Camick
Ranch Hand
Posts: 2584
9
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See Line Painter for one solution.
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Camick wrote:See Line Painter for one solution.

i have used this , but i guess that algorithm is not that much good because when you write or copy past a large document in your editor the editor freeze and later a stack overflow exception is thrown
,do you know any other way , however to be more precise i have implemented my solution and it is working well i have done that by overriding the default highlighter class with my custom implementation
now at this point my only problem is to code a custom method because i have changed the default beheviour of highlighter by overriding paint , so that now it paints the entire width of a line, including the empty portion (remember default highlight only paint the text portion and not the empty portion) but now when i do remove all highlight the default implementation only remove highlights from the text and not from the blank areas , so for that i need to write a custom method,
will any one help me to right one ?
thanks in advance....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic