Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Drawing a child node partially outside its compartment(How to make an child image be drawn on top of a compartment)
Drawing a child node partially outside its compartment [message #632339] Tue, 12 October 2010 15:47
Artur Ribeiro is currently offline Artur RibeiroFriend
Messages: 3
Registered: February 2010
Junior Member
Hello,

The Problem

I am unable to create a solution for the following problem:

EMF Model:
- Shelf contains Slots
- Slot contains 1 Book

GMF Model:

- Shelf as a horizontal rectangle
- Many Slots as vertical rectangles contained on the Shelf compartment (all equal on size)
- The Book is a colored rectangle which fills the Slot compartment.

However there is a semantic which i wanted to be able to draw:

A Book can occupy more then 1 slot, although in the EMF model it just occupies 1 slot, but it has an attribute saying how many slots it does occupy. The graphical result of this unusual modelation was intended to be as shown in the following image:

http://img405.imageshack.us/img405/276/shelfexample.jpg

It is a shelf with 11 slots and 3 books (Book A, B and C). Book A is on slot 2 and occupies 1 slot. Book B is on slot 6 and occupies 3 slots. Book C is on slot 10 and occupies 1 slot. The Book B concept is what i didn't manage to do yet, to draw the Book image outside the Slot compartment.


What have i tried


1. It seems that there is no way to draw the Book image outside its own compartment. Or is there? After many hours trying this approuch i believe there isn't. The compartment allways adjusts to the image size, or the image gets behind the compartment.

2. There was an previous discussion about a possible solution for this problem:

http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg03814.html

Also tried the proposed solution (using affixed childs on each side of the Book image) without any result.


That is it. I was wondering if there is really a reasonable solution for this using GMF. Any insight is greatly appreciated.

Kind regards,

Artur Ribeiro
Previous Topic:Problems with a layout: not resize the Top Nodes
Next Topic:Child Meta Feature must reference Meta Class
Goto Forum:
  


Current Time: Wed Apr 24 22:04:43 GMT 2024

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

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

Back to the top