Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Simple Text compartment?
Simple Text compartment? [message #216300] Fri, 23 January 2009 14:40 Go to next message
No real name is currently offline No real nameFriend
Messages: 4
Registered: July 2009
Junior Member
I have nodes with a simple multi-line label showing some text, as well as
a name for the node.

I thought i'd use a compartment to contain the text, so that it could be
opened and closed (to hide it out of the way when its not wanted).
However, from what i've seen, compartments are really to contain other
nodes.

Is this right? How could i use a compartment to just contain a label for
my figure so that i can open and close it?
Re: Simple Text compartment? [message #216437 is a reply to message #216300] Tue, 27 January 2009 02:30 Go to previous message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi,

Compartment is meant to be a subview. Text compartment is really a label,
it doesn't have expand/collapse functionality, hence it has to be
implemented manually.
There is an option that requires the least amount of work though. Create a
compartment view (Node + DrawerStyle, possibly DescriptionStyle if
labels's text doesn't come from the semantics). Editpart of the
compartment will have a TextCompartmentEditPart as a child.
TextCompartmentEditPart will point to the compartment as its model.
Another option is decorating the compartment view with the label view.
Hopr this helps.

Cheers,
Alex
Previous Topic:Control Position of dragged element
Next Topic:[Announce] Win a Copy of the EMF Book
Goto Forum:
  


Current Time: Thu Apr 25 18:09:14 GMT 2024

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

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

Back to the top