Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Alignment and Offsets of Labels
Alignment and Offsets of Labels [message #193031] Tue, 17 June 2008 10:59 Go to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Hi there,

I want a figure with an affixed south positioned label like this:

**********
* FIGURE *
* *
**********
LABEL


Now actually the label is quite far away from the figure (y distance
could be about 20pt). And even if I specify the affixed side "SOUTH",
it's not really centered but much more to the right. Like this:

**********
* FIGURE *
* *
**********


LABEL

How can I finetune this? I tried an "Label Offset Facet" with negative y
value to the Diagram Label and an Alignment Facet, but they don't seem
to have an effect.

Could it be a problem if the figure is rather small, like this?

***
*F*
***


LABEL

How do I get the label centered below the figure with a very small
distance to it?

Hope for some hints,
cheers,
Hauke
Re: Alignment and Offsets of Labels [message #193192 is a reply to message #193031] Wed, 18 June 2008 07:30 Go to previous message
Eclipse UserFriend
Originally posted by: jan.herriger.gmx.de

Hi Hauke,

inside the EditPart (the parent), you'll find the method #addBorderItem.
There, a new BorderItemLocator is created for each child. Afaik, you
have to override it in order to control how children are positioned.
Therein #getPreferredLocation and #locateOnParent are most interesting,
i think.

Hauke Fuhrmann schrieb:
> Hi there,
>
> I want a figure with an affixed south positioned label like this:
>
> **********
> * FIGURE *
> * *
> **********
> LABEL
>
>
> Now actually the label is quite far away from the figure (y distance
> could be about 20pt). And even if I specify the affixed side "SOUTH",
> it's not really centered but much more to the right. Like this:
>
> **********
> * FIGURE *
> * *
> **********
>
>
> LABEL
>
> How can I finetune this? I tried an "Label Offset Facet" with negative y
> value to the Diagram Label and an Alignment Facet, but they don't seem
> to have an effect.
>
> Could it be a problem if the figure is rather small, like this?
>
> ***
> *F*
> ***
>
>
> LABEL
>
> How do I get the label centered below the figure with a very small
> distance to it?
>
> Hope for some hints,
> cheers,
> Hauke
Previous Topic:Integration between Graphical editor and outline view
Next Topic:auto create connection
Goto Forum:
  


Current Time: Sat Apr 27 02:51:11 GMT 2024

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

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

Back to the top