Skip to main content



      Home
Home » Eclipse Projects » GEF » xml editor
xml editor [message #17542] Wed, 21 August 2002 09:10 Go to next message
Eclipse UserFriend
Originally posted by: bkandan.selectica.com

hi,
i am trying to create an xml editor using gef...whenever a new node is
added, i need to connect the previously selected node and the newly created
node programatically...

wat shud i do?

Thanks in advance...
Balaji
Re: xml editor [message #17568 is a reply to message #17542] Wed, 21 August 2002 09:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.spam.com

Is this connection really in your model, or you just need to see a line
between the nodes?

"netbeans" <bkandan@selectica.com> wrote in message
news:ak02vs$4d8$1@rogue.oti.com...
> hi,
> i am trying to create an xml editor using gef...whenever a new node is
> added, i need to connect the previously selected node and the newly
created
> node programatically...
>
> wat shud i do?
>
> Thanks in advance...
> Balaji
>
>
Re: xml editor [message #17581 is a reply to message #17568] Wed, 21 August 2002 10:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bkandan.selectica.com

i just need to see the connection...and is not included in the model...

Balaji

"Randy Hudson" <hudsonr@spam.com> wrote in message
news:ak04ke$5a6$1@rogue.oti.com...
> Is this connection really in your model, or you just need to see a line
> between the nodes?
>
> "netbeans" <bkandan@selectica.com> wrote in message
> news:ak02vs$4d8$1@rogue.oti.com...
> > hi,
> > i am trying to create an xml editor using gef...whenever a new node is
> > added, i need to connect the previously selected node and the newly
> created
> > node programatically...
> >
> > wat shud i do?
> >
> > Thanks in advance...
> > Balaji
> >
> >
>
>
Re: xml editor [message #17593 is a reply to message #17581] Wed, 21 August 2002 10:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.spam.com

So, you could do this lots of ways. You don't need a connection EditPart,
maybe just a PolylineConnection. Such a connectoin could be added by the
editpart, or even by some custom figure that the editpart uses. But, it
could be even simpler than this. If you know exactly where the line will
be, for example you are doing something like a Tree, You could just draw a
line down the left side of the Figure, or even use a Border which paints the
line. I'd have to see a mockup to offer more advice.


"netbeans" <bkandan@selectica.com> wrote in message
news:ak08gj$7qf$1@rogue.oti.com...
> i just need to see the connection...and is not included in the model...
>
> Balaji
>
> "Randy Hudson" <hudsonr@spam.com> wrote in message
> news:ak04ke$5a6$1@rogue.oti.com...
> > Is this connection really in your model, or you just need to see a line
> > between the nodes?
> >
> > "netbeans" <bkandan@selectica.com> wrote in message
> > news:ak02vs$4d8$1@rogue.oti.com...
> > > hi,
> > > i am trying to create an xml editor using gef...whenever a new node
is
> > > added, i need to connect the previously selected node and the newly
> > created
> > > node programatically...
> > >
> > > wat shud i do?
> > >
> > > Thanks in advance...
> > > Balaji
> > >
> > >
> >
> >
>
>
Re: xml editor [message #17607 is a reply to message #17593] Wed, 21 August 2002 11:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bkandan.selectica.com

but for creating a connection, we need source and target node...where will
get the nodes from??

and i have one more problem i am able to increase the size of the nodes
using the resize handle, but i am not able to reduce the size of the
nodes...can u tell me where i am going wrong?

sorry if it seems like a silly question...but just now i have started
learning gef...


"Randy Hudson" <hudsonr@spam.com> wrote in message
news:ak096e$8cp$1@rogue.oti.com...
> So, you could do this lots of ways. You don't need a connection EditPart,
> maybe just a PolylineConnection. Such a connectoin could be added by the
> editpart, or even by some custom figure that the editpart uses. But, it
> could be even simpler than this. If you know exactly where the line will
> be, for example you are doing something like a Tree, You could just draw a
> line down the left side of the Figure, or even use a Border which paints
the
> line. I'd have to see a mockup to offer more advice.
>
>
> "netbeans" <bkandan@selectica.com> wrote in message
> news:ak08gj$7qf$1@rogue.oti.com...
> > i just need to see the connection...and is not included in the model...
> >
> > Balaji
> >
> > "Randy Hudson" <hudsonr@spam.com> wrote in message
> > news:ak04ke$5a6$1@rogue.oti.com...
> > > Is this connection really in your model, or you just need to see a
line
> > > between the nodes?
> > >
> > > "netbeans" <bkandan@selectica.com> wrote in message
> > > news:ak02vs$4d8$1@rogue.oti.com...
> > > > hi,
> > > > i am trying to create an xml editor using gef...whenever a new
node
> is
> > > > added, i need to connect the previously selected node and the newly
> > > created
> > > > node programatically...
> > > >
> > > > wat shud i do?
> > > >
> > > > Thanks in advance...
> > > > Balaji
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: xml editor [message #17619 is a reply to message #17607] Wed, 21 August 2002 11:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.spam.com

> but for creating a connection, we need source and target node...where will
> get the nodes from??

Not for a draw2d connection. You just need a line with two
ConnecitonAnchors. Don't worry about GEF connectoins unless you need
something that is selectable, and the user can delete, bend, reocnnect, etc.

> and i have one more problem i am able to increase the size of the nodes
> using the resize handle, but i am not able to reduce the size of the
> nodes...can u tell me where i am going wrong?

This is fixed in the latest code. A new ZIP will be available soon, or you
can pull the source from the CVS repository.

As a workaround, you can do:
node.setMinimumSize(new Dimension(10,10));

> sorry if it seems like a silly question...but just now i have started
> learning gef...
>
Re: xml editor [message #17632 is a reply to message #17619] Wed, 21 August 2002 11:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bkandan.selectica.com

thanks for the reply...

but will it behave like polylineconnection when the user moves the node...

and for that resize matter...the one in the logic example is working
fine...i'll see to that...

"Randy Hudson" <hudsonr@spam.com> wrote in message
news:ak0bo4$agq$1@rogue.oti.com...
> > but for creating a connection, we need source and target node...where
will
> > get the nodes from??
>
> Not for a draw2d connection. You just need a line with two
> ConnecitonAnchors. Don't worry about GEF connectoins unless you need
> something that is selectable, and the user can delete, bend, reocnnect,
etc.
>
> > and i have one more problem i am able to increase the size of the nodes
> > using the resize handle, but i am not able to reduce the size of the
> > nodes...can u tell me where i am going wrong?
>
> This is fixed in the latest code. A new ZIP will be available soon, or
you
> can pull the source from the CVS repository.
>
> As a workaround, you can do:
> node.setMinimumSize(new Dimension(10,10));
>
> > sorry if it seems like a silly question...but just now i have started
> > learning gef...
> >
>
>
Re: xml editor [message #17644 is a reply to message #17632] Wed, 21 August 2002 13:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hudsonr.spam.com

"netbeans" <bkandan@selectica.com> wrote in message
news:ak0cgf$avn$1@rogue.oti.com...
> thanks for the reply...
>
> but will it behave like polylineconnection when the user moves the node...
>
> and for that resize matter...the one in the logic example is working
> fine...i'll see to that...

Logic example is not the general case. It works there I believe because the
"nodes" have a ScrollPane in them, and ScrollPane implements
getMinimumSize() in a meaningful way. General figures don't have a minimium
size, so they return their current size.
Re: xml editor [message #17695 is a reply to message #17644] Thu, 22 August 2002 05:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bkandan.selectica.com

hi Randy,
abt the line and the connection anchor in ur previous reply, can u
explain me how todo that?
'cos when the new node gets created i have to connect the previously
selected node and the newly created node...where shud i write the code for
connecting these nodes?

Thanks in advance
Balaji.

"Randy Hudson" <hudsonr@spam.com> wrote in message
news:ak0i4b$e55$1@rogue.oti.com...
>
> "netbeans" <bkandan@selectica.com> wrote in message
> news:ak0cgf$avn$1@rogue.oti.com...
> > thanks for the reply...
> >
> > but will it behave like polylineconnection when the user moves the
node...
> >
> > and for that resize matter...the one in the logic example is working
> > fine...i'll see to that...
>
> Logic example is not the general case. It works there I believe because
the
> "nodes" have a ScrollPane in them, and ScrollPane implements
> getMinimumSize() in a meaningful way. General figures don't have a
minimium
> size, so they return their current size.
>
>
Re: xml editor [message #17708 is a reply to message #17695] Thu, 22 August 2002 06:50 Go to previous message
Eclipse UserFriend
Originally posted by: bkandan.selectica.com

hi man,
i found out how to do this by myself...
thanks for the clue....

Balaji

"netbeans" <bkandan@selectica.com> wrote in message
news:ak29f9$8f6$1@rogue.oti.com...
> hi Randy,
> abt the line and the connection anchor in ur previous reply, can u
> explain me how todo that?
> 'cos when the new node gets created i have to connect the previously
> selected node and the newly created node...where shud i write the code for
> connecting these nodes?
>
> Thanks in advance
> Balaji.
>
> "Randy Hudson" <hudsonr@spam.com> wrote in message
> news:ak0i4b$e55$1@rogue.oti.com...
> >
> > "netbeans" <bkandan@selectica.com> wrote in message
> > news:ak0cgf$avn$1@rogue.oti.com...
> > > thanks for the reply...
> > >
> > > but will it behave like polylineconnection when the user moves the
> node...
> > >
> > > and for that resize matter...the one in the logic example is working
> > > fine...i'll see to that...
> >
> > Logic example is not the general case. It works there I believe because
> the
> > "nodes" have a ScrollPane in them, and ScrollPane implements
> > getMinimumSize() in a meaningful way. General figures don't have a
> minimium
> > size, so they return their current size.
> >
> >
>
>
Previous Topic:Animation with GEF
Next Topic:can the model hierarchy be different from the editpart hierarchy
Goto Forum:
  


Current Time: Sat Jun 28 18:39:03 EDT 2025

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

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

Back to the top