How to connect or edit? [message #75723] |
Tue, 15 April 2003 16:10  |
Eclipse User |
|
|
|
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 #76646 is a reply to message #76630] |
Thu, 24 April 2003 19:52   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.09334 seconds