Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Attaching labels to figures
Attaching labels to figures [message #149928] Mon, 06 September 2004 01:18 Go to next message
Eclipse UserFriend
Originally posted by: PeterMayne.ap.spherion.com

I'm trying to attach labels beneath my figures. I don't want the labels
to be selectable or editable (at least for now), and I don't want them
to be included in the selection handles when figures are selected, but I
do want them to stay with my figures when my figures are moved or
resized. It would be easy to do this by just including the label within
the figure, but I specifically want the label to be outside the figure,
and not restricted by the figure's bounds.

I've tried various ways of doing this. In particular, I've tried
implementing getModelChildren() in the edit part to create a dummy
model: this works, but the label is clipped to its parent.

How do I get a label attached to a figure?

Thanks.

PJDM
--
Peter Mayne
Spherion Technology Solutions
Canberra, ACT, Australia
"You're given the form, but you have to write the sonnet yourself.
What you say is completely up to you." - Mrs. Whatsit
Re: Attaching labels to figures [message #149940 is a reply to message #149928] Mon, 06 September 2004 13:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eostroukhov.hotmail.com

One thing I could suggest is to create new layer (so your labels don't mess
with other figures on your main layer) and make your lables position
themselves relatively to the mane figures like the handles do. See the
AbstractHandle class for details - you could even reuse the locators/etc. Of
course you can also use one of the existing layers
(handles/feedback/connections/main/grid - I just don't remember the exact
list and ordering).

"Peter Mayne" <PeterMayne@ap.spherion.com> wrote in message
news:chgdnh$aor$1@eclipse.org...
> I'm trying to attach labels beneath my figures. I don't want the labels
> to be selectable or editable (at least for now), and I don't want them
> to be included in the selection handles when figures are selected, but I
> do want them to stay with my figures when my figures are moved or
> resized. It would be easy to do this by just including the label within
> the figure, but I specifically want the label to be outside the figure,
> and not restricted by the figure's bounds.
>
> I've tried various ways of doing this. In particular, I've tried
> implementing getModelChildren() in the edit part to create a dummy
> model: this works, but the label is clipped to its parent.
>
> How do I get a label attached to a figure?
>
> Thanks.
>
> PJDM
> --
> Peter Mayne
> Spherion Technology Solutions
> Canberra, ACT, Australia
> "You're given the form, but you have to write the sonnet yourself.
> What you say is completely up to you." - Mrs. Whatsit
Re: Attaching labels to figures [message #150426 is a reply to message #149940] Fri, 10 September 2004 04:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: PeterMayne.ap.spherion.com

>> "Peter Mayne" <PeterMayne@ap.spherion.com> wrote in message
>> news:chgdnh$aor$1@eclipse.org...
>>
>> I'm trying to attach labels beneath my figures.
>
> Eugene Ostroukhov wrote:
> One thing I could suggest is to create new layer (so your labels don't mess
> with other figures on your main layer) and make your lables position
> themselves relatively to the mane figures like the handles do. See the
> AbstractHandle class for details - you could even reuse the locators/etc. Of
> course you can also use one of the existing layers
> (handles/feedback/connections/main/grid - I just don't remember the exact
> list and ordering).

Sorry, I don't understand this at all. AbstractHandle doesn't mention
layers. Even if I did figure out how to draw in the connection layer,
the labels would presumably appear over top of other figures as
connections do, whereas I'd rather the figures were drawn over any
labels they overlap with.

I still don't know how to draw labels next to figures.

PJDM
--
Peter Mayne
Spherion Technology Solutions
Canberra, ACT, Australia
"You're given the form, but you have to write the sonnet yourself.
What you say is completely up to you." - Mrs. Whatsit
Re: Attaching labels to figures [message #150433 is a reply to message #150426] Fri, 10 September 2004 06:16 Go to previous message
Eclipse UserFriend
Originally posted by: eostroukhov.hotmail.com

I just thought it would make sense if you'll take a look on an
AbstractHandle class in terms on the figure that is "attached" to another
figure even as it stays on another layer - see that AncestralListener parts.
As to the layers - you could add new layer so the labels do not participate
in the layout (that won't be a problem if you usen an XYLayout), you will be
able to make sure that all labels are behind/in front of all "main" figures
and also it would be easier to show all/hide all labels when the user wants
to. Also this would help with the clipping problem.

"Peter Mayne" <PeterMayne@ap.spherion.com> wrote in message
news:chr8su$td9$1@eclipse.org...
> >> "Peter Mayne" <PeterMayne@ap.spherion.com> wrote in message
> >> news:chgdnh$aor$1@eclipse.org...
> >>
> >> I'm trying to attach labels beneath my figures.
> >
> > Eugene Ostroukhov wrote:
> > One thing I could suggest is to create new layer (so your labels don't
mess
> > with other figures on your main layer) and make your lables position
> > themselves relatively to the mane figures like the handles do. See the
> > AbstractHandle class for details - you could even reuse the
locators/etc. Of
> > course you can also use one of the existing layers
> > (handles/feedback/connections/main/grid - I just don't remember the
exact
> > list and ordering).
>
> Sorry, I don't understand this at all. AbstractHandle doesn't mention
> layers. Even if I did figure out how to draw in the connection layer,
> the labels would presumably appear over top of other figures as
> connections do, whereas I'd rather the figures were drawn over any
> labels they overlap with.
>
> I still don't know how to draw labels next to figures.
>
> PJDM
> --
> Peter Mayne
> Spherion Technology Solutions
> Canberra, ACT, Australia
> "You're given the form, but you have to write the sonnet yourself.
> What you say is completely up to you." - Mrs. Whatsit
Previous Topic:GEF project running problems
Next Topic:Problems with PaletteDrawer
Goto Forum:
  


Current Time: Sat Dec 21 16:49:59 GMT 2024

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

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

Back to the top