Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » How to make connections in Visual Editor ?
How to make connections in Visual Editor ? [message #145314] Thu, 11 September 2008 13:15 Go to next message
Ktos is currently offline KtosFriend
Messages: 12
Registered: July 2009
Junior Member
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 #145316 is a reply to message #145314] Thu, 11 September 2008 17:39 Go to previous messageGo to next message
Eclipse UserFriend
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 #145318 is a reply to message #145316] Fri, 12 September 2008 09:40 Go to previous messageGo to next message
Ktos is currently offline KtosFriend
Messages: 12
Registered: July 2009
Junior Member
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 #145326 is a reply to message #145318] Fri, 12 September 2008 15:06 Go to previous messageGo to next message
Eclipse UserFriend
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 #145335 is a reply to message #145314] Thu, 18 September 2008 07:12 Go to previous messageGo to next message
Alberto  is currently offline Alberto Friend
Messages: 18
Registered: July 2009
Junior Member
Hi,

Perhaps this url can help u:
http://www.eclipse.org/articles/Article-GEF-editor/gef-schem a-editor.html

It describes how to implement a database schema diagram and drag from the
palette connection components.

Best Regards
Re: How to make connections in Visual Editor ? [message #145347 is a reply to message #145326] Thu, 18 September 2008 17:05 Go to previous message
Ktos is currently offline KtosFriend
Messages: 12
Registered: July 2009
Junior Member
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 17:39 Go to previous message
Eclipse UserFriend
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 09:40 Go to previous message
Ktos is currently offline KtosFriend
Messages: 12
Registered: July 2009
Junior Member
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 15:06 Go to previous message
Eclipse UserFriend
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 #617280 is a reply to message #145314] Thu, 18 September 2008 07:12 Go to previous message
Alberto  is currently offline Alberto Friend
Messages: 18
Registered: July 2009
Junior Member
Hi,

Perhaps this url can help u:
http://www.eclipse.org/articles/Article-GEF-editor/gef-schem a-editor.html

It describes how to implement a database schema diagram and drag from the
palette connection components.

Best Regards
Re: How to make connections in Visual Editor ? [message #617284 is a reply to message #145326] Thu, 18 September 2008 17:05 Go to previous message
Ktos is currently offline KtosFriend
Messages: 12
Registered: July 2009
Junior Member
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
Previous Topic:How to open the Palette
Next Topic:Changing default layout manager
Goto Forum:
  


Current Time: Thu Nov 27 02:08:51 GMT 2014

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

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