Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Positionning a label above a figure
Positionning a label above a figure [message #1004584] Wed, 23 January 2013 08:58 Go to previous message
nicolas h is currently offline nicolas h
Messages: 47
Registered: February 2011
Location: Grenoble, France
Member
Hi there,

I'm looking for positionning a label above a Rectangle Figure, i.e. outside the RectangleFigure. To do this, I created a rectangle with no border containing the label and a rectangle with a border (dashed border). The dashed-border rectangle is used as a Compartment.

Below is my GMFGraph Model :
<descriptors
        name="RectangleWithoutLabelFigure">
      <actualFigure
          xsi:type="gmfgraph:Rectangle"
          name="RectangleWithoutLabelFigure"
          lineWidth="2">
        <layout
            xsi:type="gmfgraph:FlowLayout"/>
      </actualFigure>
    </descriptors>

<descriptors
        name="RectangleFigure">
      <actualFigure
          xsi:type="gmfgraph:Rectangle"
          name="RectangleFigure"
          lineWidth="0">
        <layout
            xsi:type="gmfgraph:FlowLayout"
            majorAlignment="CENTER"
            minorAlignment="CENTER"/>
        <children
            xsi:type="gmfgraph:Label"
            name="RectangleNameFigure"
            text="&lt;...>"/>
        <children
            xsi:type="gmfgraph:FigureRef"
            figure="//@figures.0/@descriptors.0/@actualFigure"/>
      </actualFigure>
      <accessors
          figure="//@figures.0/@descriptors.1/@actualFigure/@children.0"/>
    </descriptors>

<compartments
      name="RectangleCompartment"
      figure="RectangledWithoutLabelFigure"/>

<labels
      name="RectangledName"
      figure="RectangleFigure"
      accessor="//@figures.0/@descriptors.1/@accessors.0"/>


The visual representation does not fit with the expected result...
index.php/fa/13062/0/

In the figure, the top node is my rectangle "Test". Another object is put inside the RectangleComportament.

A thin border appears all around the expected borderless rectangle named "Rectangle" an no dashed border delimitate the "RectangleWithoutLabel" Rectangle. Besides, a solid line separate the label and the compartment.

Any idea about how to fix this ?

Many thanks,


regards,


Nicolas
 
Read Message
Read Message
Read Message
Previous Topic:Change domain model when diagram was opened
Next Topic:How can i make a shortcut that can't be contained in the root element?
Goto Forum:
  


Current Time: Sat May 18 19:00:47 EDT 2013

Powered by FUDForum. Page generated in 0.01776 seconds