How to make connections in Visual Editor ? [message #145314] |
Thu, 11 September 2008 09:15  |
Eclipse User |
|
|
|
Hi,
Does anybody know how to make connections in Visual Editor ?, for example
I have JButton and JLabel on JFrame and I want to connect them with solid
line with an arrow (at design time) - how to do this ?
Regards
|
|
|
|
|
|
|
Re: How to make connections in Visual Editor ? [message #145347 is a reply to message #145326] |
Thu, 18 September 2008 13:05  |
Eclipse User |
|
|
|
Thank you for information - so you saying that there is no easy way just
to draw line between two components (without code generation etc.) ? I've
tried to solve this problem - I can start connection from one component,
but when I try to connect with second component, connection disappear (I
think it's because I don't have Models - only EditParts). Any suggestions
appreciated !
Best regards
|
|
|
Re: How to make connections in Visual Editor ? [message #617273 is a reply to message #145314] |
Thu, 11 September 2008 13:39  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
VE doesn't do connections. You can add events, e.g. JButton clicked
event -> run some code. When you add an event a listener is created and
then the developer can put any code they want in that listener.
Ktos wrote:
> Hi,
>
> Does anybody know how to make connections in Visual Editor ?, for
> example I have JButton and JLabel on JFrame and I want to connect them
> with solid line with an arrow (at design time) - how to do this ?
>
> Regards
>
--
Thanks,
Rich Kulp
|
|
|
Re: How to make connections in Visual Editor ? [message #617274 is a reply to message #145316] |
Fri, 12 September 2008 05:40  |
Eclipse User |
|
|
|
So how should I implement this ? I know that I should subclass
AbstractConnectionEditPart - but I don't know what how to add new entry in
palette, because Connection tool is not visual java bean (it doesn't
extends Composite). I need to add to palette tool similar to "selection",
or "marque".
Thanx for reply
|
|
|
Re: How to make connections in Visual Editor ? [message #617277 is a reply to message #145318] |
Fri, 12 September 2008 11:06  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
We don't recommend doing this. It is more than just "creating a
connection" that shows visually. It is code generation too. In fact you
must be able to re-interpret the code to find such a connection to show
visually because VE doesn't persist the model information, it only
persists the code.
It is a big deal to do this. VE very intentionally decided to NOT
support this kind of function from VisualAge because it looks cute in
small doses but it quickly gets out of hand and makes a mess of the
visual surface. It is better to not do this.
--
Thanks,
Rich Kulp
|
|
|
|
Re: How to make connections in Visual Editor ? [message #617284 is a reply to message #145326] |
Thu, 18 September 2008 13:05  |
Eclipse User |
|
|
|
Thank you for information - so you saying that there is no easy way just
to draw line between two components (without code generation etc.) ? I've
tried to solve this problem - I can start connection from one component,
but when I try to connect with second component, connection disappear (I
think it's because I don't have Models - only EditParts). Any suggestions
appreciated !
Best regards
|
|
|
Powered by
FUDForum. Page generated in 0.02942 seconds