Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » add a moveable label to a conenction
add a moveable label to a conenction [message #206098] Sat, 24 December 2005 14:50 Go to next message
Eclipse UserFriend
Originally posted by: marguu.libero.it

Hi all! I'd like to add a Text Label to a connection. I've tried to
add(new Label()) but this label can't move. How can i do it? Thanks
Re: add a moveable label to a conenction [message #206123 is a reply to message #206098] Sun, 25 December 2005 05:44 Go to previous messageGo to next message
venkataramana m is currently offline venkataramana mFriend
Messages: 86
Registered: July 2009
Member
Check the sources of the QVT plugin at http://qvtp.org/downloads/qvtp-eclipse/
QVT diagrammer does have moveable connection labels.

Thanks
~Venkat
Re: add a moveable label to a conenction [message #206137 is a reply to message #206123] Sun, 25 December 2005 08:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: marguu.libero.it

Thanks a lot! Happy Xmas!
BYE
Re: add a moveable label to a conenction [message #206143 is a reply to message #206123] Sun, 25 December 2005 09:59 Go to previous messageGo to next message
Jin Missing name is currently offline Jin Missing nameFriend
Messages: 100
Registered: July 2009
Senior Member
Hi, Venkataramana. Do you know how to add a movable label to a Node?
Thanks:)
Re: add a moveable label to a conenction [message #206160 is a reply to message #206143] Sun, 25 December 2005 10:29 Go to previous message
venkataramana m is currently offline venkataramana mFriend
Messages: 86
Registered: July 2009
Member
Moveable label to a node (as you asked) looks like more of an ANNOTATION or a VISUAL-ATTACHMENT to a node. The semantics of such elements could be like ..
a) when node is moved, attachments should also move.
b) when node is deleted, attachments should also get deleted.
c) attachments should be moveable independently.
d) to add a visual cue that attachments belong to a node, a thin dull greyish line could connect the annotation to node.
c) to add an attachment, pick an entry from palette, click anywhere on a desired node. Attachment may get created surrounding the boundary (may be in any of the four quadrants)

Plausible implementation:
------------------------
Have a model like ...

class Node
{
List attachments; /* Attachment */
void addAttachment();
void removeAttachment();
}

class Attachment extends Node
{
}


When an attachment is created for a node, add it to node's attachments by addAttachment API. But visually, attachment is outside the node..so add attachment figure to node's parent figure..then attachment figure may look like a sibling of node itself. Whatever applies to node movement should apply to attachment as well(since it is also a node). In order to move attachment along with node, do it with a polylineconnection (normal connection creation)
A container-editpolicy on node can serve for creating attachment-create commands.

Hope I have given a fair idea.

Thanks
~Venkat
Previous Topic:open a new editor
Next Topic:How to do multiple editpart(models) creations in one creation time?
Goto Forum:
  


Current Time: Fri Apr 26 05:51:23 GMT 2024

Powered by FUDForum. Page generated in 0.02740 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top