Skip to main content



      Home
Home » Eclipse Projects » GEF » How to connect or edit?
How to connect or edit? [message #75723] Tue, 15 April 2003 16:10 Go to next message
Eclipse UserFriend
Originally posted by: felipeg.us.ibm.com

Hi all,

How do you make a LogicLabel connectable? Or, how do you make a Circuit
editable?

Thanks,

Felipe
Re: How to connect or edit? [message #75963 is a reply to message #75723] Thu, 17 April 2003 17:30 Go to previous messageGo to next message
Eclipse UserFriend
Felipe Gomez wrote:

> Hi all,
>
> How do you make a LogicLabel connectable?

The LogicLabelEditPart would need to use a subclass of NodeFigure for
its figure instead of a basic Label. And LogicLabelEditPart would need
to *not* set the GRAPHICAL_NODE_ROLE edit policy to null (see
LogicLabelEditPart.createEditPolicies()).

> Or, how do you make a Circuit editable?

I'm not sure what you mean.

>
> Thanks,
>
> Felipe
>
>
Re: How to connect or edit? [message #76630 is a reply to message #75963] Thu, 24 April 2003 17:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: felipeg.us.ibm.com

Regarding:

> > Or, how do you make a Circuit editable?

I have modified the Circuit so that some text is drawn within its border. I
would like to edit the text in place ala LogicLabel. I wonder if it is
easier to make the LogicLabel connectable, or the Circuit editable. I could
hack it so that a Label is placed inside the Circuit, but I do not really
want to add a child.

Also, do you know of any multi-line LogicLabel? Or, is there some way to add
multiple lines to the Label?

Thanks much for the help,

Felipe
Re: How to connect or edit? [message #76646 is a reply to message #76630] Thu, 24 April 2003 19:52 Go to previous messageGo to next message
Eclipse UserFriend
Felipe Gomez wrote:
> Regarding:
>
>
>>>Or, how do you make a Circuit editable?
>
>
> I have modified the Circuit so that some text is drawn within its border. I
> would like to edit the text in place ala LogicLabel. I wonder if it is
> easier to make the LogicLabel connectable, or the Circuit editable. I could
> hack it so that a Label is placed inside the Circuit, but I do not really
> want to add a child.

If you look at LogicLabelEditPart, there's a method called
performRequest(Request) which will be called from the tool when a direct
edit event occurs (single click on an already selected edit part -- this
will also be called when double clicking an edit part, but with the
REQ_OPEN as the request type). Check for the REQ_DIRECT_EDIT type and
process as needed. You'll need a subclass of DirectEditManager, as well
as an implementation of CellEditorLocator (which should place your cell
editor in the circuit's border, or wherever your text is that you want
to edit). I haven't done this so there may be some other intricacies I
haven't thought of.

> Also, do you know of any multi-line LogicLabel? Or, is there some way to add
> multiple lines to the Label?

Look at TextFlow in the org.eclipse.draw2d.text package.

> Thanks much for the help,
>
> Felipe
>
>
Re: How to connect or edit? [message #76795 is a reply to message #76646] Fri, 25 April 2003 17:28 Go to previous message
Eclipse UserFriend
Originally posted by: felipeg.us.ibm.com

Eric,

Thanks very much for all your help. I ended up making the "LogicLabel
connectable", and it works like a charm.

Thanks again,

Felipe
Previous Topic:open file chooser dialog in GEF
Next Topic:EMF Commands vs. GEF Commands
Goto Forum:
  


Current Time: Fri Jun 20 03:22:35 EDT 2025

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

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

Back to the top