Skip to main content



      Home
Home » Eclipse Projects » GEF » Adding labels to circuit elements
Adding labels to circuit elements [message #19012] Wed, 04 September 2002 17:28 Go to next message
Eclipse UserFriend
Originally posted by: neilgoldsmith.yahoo.com

How might I go about adding a text label to the circuit elements provided in
the circuit sample? Text should follow the element around and should be
displayed underneath the element. This is in preparation for a similar
activity we want to perform in our application. I'm hoping to learn GEF by
doing small changes to the circuit example, but need a jumpstart to get
going.

thanks
Re: Adding labels to circuit elements [message #19034 is a reply to message #19012] Thu, 05 September 2002 08:25 Go to previous messageGo to next message
Eclipse UserFriend
See the thread "Two kinds of inplave editing" posted on 7/15/2002 by Yoav
Rubin
There is a posting in there that has some code snipets

Guy
Re: Adding labels to circuit elements [message #21096 is a reply to message #19034] Thu, 26 September 2002 09:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r-leclercq.magic.fr

Guy Slade wrote:

> See the thread "Two kinds of inplave editing" posted on 7/15/2002 by Yoav
> Rubin
> There is a posting in there that has some code snipets

> Guy

I have the same simple problem, displaying an image with text in an
EditPart.
I came up with the same kind of solution as Guy pointed out. I changed my
implementation to be the same as the one in the thread, but...

Nothing is displayed. When I select the EditParts they exist, and seem to
have the correct size, the connections between the EditParts are connected
in the right place.

I must have mist something somewhere, can anybody help please?

René
Re: Adding labels to circuit elements [message #21125 is a reply to message #21096] Thu, 26 September 2002 09:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

What are you trying to do? A mockup and your current code would help.

"Ren
Re: Adding labels to circuit elements [message #21185 is a reply to message #21125] Thu, 26 September 2002 10:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: r-leclercq.magic.fr

I am trying to display a composed Figure. So I used the code snippet
indicated by Guy:
private Label title = new Label();
private Label icon = new Label();

public ConceptFigure() {
super();

FlowLayout layout = new FlowLayout(false);
layout.setMajorAlignment(FlowLayout.ALIGN_CENTER);
setLayoutManager(layout);

add(getIcon());
add(getTitle());
}
This didn't seem to work, BUT when I was looking at the code to place in
this answer I noticed that I had overridden the method useLocalCoordinates
to return true! Apparently this is not compatible with the FlowLayout,
removing the method from my ConceptFigure displayed corectly the image and
the text in my EditPart.

René

Randy Hudson wrote:

> What are you trying to do? A mockup and your current code would help.

> "René le CLERCQ" <r-leclercq@magic.fr> wrote in message
> news:amv0do$qo6$1@rogue.oti.com...
> > Guy Slade wrote:
> >
> > > See the thread "Two kinds of inplave editing" posted on 7/15/2002 by
> Yoav
> > > Rubin
> > > There is a posting in there that has some code snipets
> >
> > > Guy
> >
> > I have the same simple problem, displaying an image with text in an
> > EditPart.
> > I came up with the same kind of solution as Guy pointed out. I changed my
> > implementation to be the same as the one in the thread, but...
> >
> > Nothing is displayed. When I select the EditParts they exist, and seem to
> > have the correct size, the connections between the EditParts are connected
> > in the right place.
> >
> > I must have mist something somewhere, can anybody help please?
> >
> > René
> >
> >
> >
> >
> >
Re: Adding labels to circuit elements [message #21201 is a reply to message #21185] Thu, 26 September 2002 15:57 Go to previous message
Eclipse UserFriend
Originally posted by: hudsonr.us.eye-bee-em.com

"Ren
Previous Topic:Drag and Drop behaviour in Logic Editor Example
Next Topic:Printer, graphic export and zoom supports in GEF
Goto Forum:
  


Current Time: Thu Jul 10 02:10:20 EDT 2025

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

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

Back to the top