Home arrow static arrow Java Programming [Archive] - how to realize single line in eclipse's file compare tool
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - how to realize single line in eclipse's file compare tool
This topic has 4 replies on 1 page.

Posts:13
Registered: 5/3/04
how to realize single line in eclipse's file compare tool  
Aug 6, 2004 9:20 AM



 
You may use the eclipse's file compare tool, when it compare two files it display two files side by side, and connect ranges with single line. When you scroll the pane, these single lines with change their forms accrodingly but always connect ranges.

I'm programming a similar tool to the eclipse's file compare tool. I'd like to know which classes are related to this kind of "single line", any suggestion will be appreciated.

Best regards
 

Posts:13
Registered: 5/3/04
Re: how to realize single line in eclipse's file compare tool  
Aug 7, 2004 9:15 AM (reply 1 of 4)



 
In fact, what I want to do is to draw a soft line who connect two objects in a panel, when we move these two objects, the line can move accrodingly. Any help will be appreciated, Regards.
 

Posts:349
Registered: 1/8/04
Re: how to realize single line in eclipse's file compare tool  
Aug 7, 2004 9:31 AM (reply 2 of 4)



 
There is a class for drawing lines: java.awt.geom.Line2D

As far as I know (I am no expert) what you're doing is going to involve some fairly complicated work to figure out where to draw those lines. Drawing works in pixels, and TextAreas and so forth aren't going to give you the pixel positions of lines of text. You'll probably want a good book on Java2D.
 

Posts:13
Registered: 5/3/04
Re: how to realize single line in eclipse's file compare tool  
Aug 7, 2004 3:36 PM (reply 3 of 4)



 
Thank you very much for your reply.

In fact I am not sure what I am planning to do. If it is too complicated, I will modify the design and make it easier to realize. Cause I don't know any classe for drawing lines, do you know any more besides java.awt.geom.Line2D?

In addition, I posted another message related to this one. They are different parts of one same project, can you take a look at it?

Thank you very much.
 

Posts:13
Registered: 5/3/04
Re: how to realize single line in eclipse's file compare tool  
Aug 7, 2004 3:38 PM (reply 4 of 4)



 
Excuse me, I forgot it. The name of the other message is "use next and previous buttons in two scroll panes".
 
This topic has 4 replies on 1 page.