Problems with moving Label/Figure in Connection [message #158299] |
Wed, 17 November 2004 08:56 |
Eclipse User |
|
|
|
Originally posted by: pengfai81.mail.yahoo.com
Hi , all..
I have created a connection between two figures. What can i do to move the
label along the conn in "every certain distance"?
Here is portion of the code:
PolylineConnection conn = new PolylineConnection();
ChopboxAnchor sourceAnchor = new
ChopboxAnchor(nodeFigure1); ChopboxAnchor targetAnchor = new
ChopboxAnchor(nodeFigure2);
conn.setSourceAnchor(sourceAnchor);
conn.setTargetAnchor(targetAnchor);
Label label = new Label(" ");
label.setOpaque(true);
label.setBackgroundColor(ColorConstants.blue);
label.setVisible(true);
// just display the label located at source
conn.add(label, new ConnectionLocator(conn,2));
Thanks in advance....
|
|
|
|
Re: Problems with moving Label/Figure in Connection [message #158643 is a reply to message #158619] |
Fri, 19 November 2004 08:15 |
Eclipse User |
|
|
|
Originally posted by: pengfai81.mail.yahoo.com
Bob Brodt wrote:
Yes.I tried ConnectionLocator before, it can locate the label in the start
,middle and also end point. I faced problem when need to move the label
attached to the connection in various points but with same distance .Any
suggestion??
Thanks a lot....
|
|
|
Re: Problems with moving Label/Figure in Connection [message #158647 is a reply to message #158619] |
Fri, 19 November 2004 08:17 |
Eclipse User |
|
|
|
Originally posted by: pengfai81.mail.yahoo.com
Bob Brodt wrote:
Yes.I tried ConnectionLocator before, it can locate the label in the start
,middle and also end point. I faced problem when need to move the label
attached to the connection in various points but with same distance .Any
suggestion??
Thanks a lot....
|
|
|
Re: Problems with moving Label/Figure in Connection [message #158655 is a reply to message #158619] |
Fri, 19 November 2004 08:17 |
Eclipse User |
|
|
|
Originally posted by: pengfai81.mail.yahoo.com
Bob Brodt wrote:
Yes.I tried ConnectionLocator before, it can locate the label in the start
,middle and also end point. I faced problem when need to move the label
attached to the connection in various points but with same distance .Any
suggestion??
Thanks a lot....
|
|
|
Re: Problems with moving Label/Figure in Connection [message #158663 is a reply to message #158619] |
Fri, 19 November 2004 08:17 |
Eclipse User |
|
|
|
Originally posted by: pengfai81.mail.yahoo.com
Bob Brodt wrote:
Yes.I tried ConnectionLocator before, it can locate the label in the start
,middle and also end point. I faced problem when need to move the label
attached to the connection in various points but with same distance .Any
suggestion??
Thanks a lot....
|
|
|
Powered by
FUDForum. Page generated in 0.06495 seconds