Alignment and Offsets of Labels [message #193031] |
Tue, 17 June 2008 06:59  |
Eclipse User |
|
|
|
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 03:30  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.08080 seconds