Login | Register
My pages Projects Community openCollabNet

Discussions > users > Re: [gef-users] Edge deletefromModel

gef
Discussion topic

Back to topic list

Re: [gef-users] Edge deletefromModel

Reply

Author bobtarling
Full name Bob Tarling
Date 2005-08-24 02:43:56 PDT
Message Ah, I think I misunderstood your previous email -

"I use CmdRemoveFromGraph instead of CmdDeleteFromModel for the menu item
Delete. Now it works fine."

You mean that you are now using CmdDeleteFromModel. This makes sense
and this also works for me.

The difference between remove and delete is that remove simply removes
the visualization of a model element from a graph but leaves the model
element in existence. Dlete deletes the model element and if the model
element is deleted all visualizations are also removed.

A good example would would be an ER diagram of a database.

Just because you remove the view of a database table from a diagram
doesn't necessarily mean that you want to delete the table from the
database. But if the table is dropped (deleted) from the database you
do need to make sure that the representation in any graph is also
removed.

Regards

Bob.


On 8/24/05, Horváth Zsolt <horvath.zsolt@sz​ilank.hu> wrote:
> I work based on the BasicApplication. No existing models.
>
>
> Bob Tarling wrote:
> Is you application uilt using Net classes (as in BasicApplication) are
> do you have some existing model of your own that you represent as a
> graph?
>
> Bob.
>
> On 8/24/05, Horváth Zsolt <horvath.zsolt@sz​ilank.hu> wrote:
>
>
> Hi Bob!
>
> Thanks for your answer!
>
> I have done the way which you tell to me about the GraphListener, but it
> gets only the DefaultGraphModel as a parameter in the method edgeRemoved,
> and from this object I can't bind out
> the edge which is deleted. So now I use the edge deleteFromModel method to
> catch this event. Of course it would be good if I can place these events in
> one class (GraphListener)...
>
> Thanks again: HZs
>
>
> Bob Tarling wrote:
> CmdRemoveFromGraph only removes the view of the Fig but will leave the
> model item in existence. This is fine so long as your application only
> relies on the view.
>
> I've started to investigate this. In the meantime you may wish to
> experiment with adding a GraphListener to your GraphModel to see if
> you get the required events from that.
>
> Regards
>
> Bob.
>
> On 8/24/05, Horváth Zsolt <horvath.zsolt@sz​ilank.hu> wrote:
>
>
> Hi!
>
> The problem is solved:
>
> I use CmdRemoveFromGraph instead of CmdDeleteFromModel for the menu item
> Delete. Now it works fine.
>
> HZS
>
>
>
> Hi!
>
> I have to catch the event when an edge is deleted from the diagram.
> First I have tried it with the demo application, so I have taken the
> SampleEdge, SampleEdge2 classes and I have extend the deleteFromModel
> method like the followin:
>
> public void deleteFromModel() {
> System.out.println("Delete from model: SampleEdge2.");
> super.deleteFromModel();
> }
>
> When I press the delete key when this edge is selected, it is deleted,
> but I can't see the message in the console. So I can't catch the
> delete event. Same problem is in my own appliclation.
> This workflow working absolutely fine with nodes. So I don't
> understand what is the problem.
>
> Thanks: Zsolt
>
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@ge​f.tigris.org
> For additional commands, e-mail: users-help at gef dot tigris dot org
>
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@ge​f.tigris.org
> For additional commands, e-mail: users-help at gef dot tigris dot org
>
>
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@ge​f.tigris.org
> For additional commands, e-mail: users-help at gef dot tigris dot org
>
>
>
>
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: users-unsubscribe@ge​f.tigris.org
> For additional commands, e-mail: users-help at gef dot tigris dot org
>
>
>
>

« Previous message in topic | 7 of 8 | Next message in topic »

Messages

Show all messages in topic

Edge deletefromModel =?ISO-8859-2?Q?Horv=E1th_Zsolt?= <horvath dot zsolt at szilank dot hu> =?ISO-8859-2?Q?Horv=E1th_Zsolt?= <horvath dot zsolt at szilank dot hu> 2005-08-24 00:06:16 PDT
     Re: [gef-users] Edge deletefromModel =?ISO-8859-2?Q?Horv=E1th_Zsolt?= <horvath dot zsolt at szilank dot hu> =?ISO-8859-2?Q?Horv=E1th_Zsolt?= <horvath dot zsolt at szilank dot hu> 2005-08-24 01:49:38 PDT
         Re: [gef-users] Edge deletefromModel bobtarling Bob Tarling 2005-08-24 01:56:39 PDT
             Re: [gef-users] Edge deletefromModel =?ISO-8859-2?Q?Horv=E1th_Zsolt?= <horvath dot zsolt at szilank dot hu> =?ISO-8859-2?Q?Horv=E1th_Zsolt?= <horvath dot zsolt at szilank dot hu> 2005-08-24 02:10:29 PDT
                 Re: [gef-users] Edge deletefromModel bobtarling Bob Tarling 2005-08-24 02:17:18 PDT
                     Re: [gef-users] Edge deletefromModel =?ISO-8859-2?Q?Horv=E1th_Zsolt?= <horvath dot zsolt at szilank dot hu> =?ISO-8859-2?Q?Horv=E1th_Zsolt?= <horvath dot zsolt at szilank dot hu> 2005-08-24 02:24:43 PDT
                         Re: [gef-users] Edge deletefromModel bobtarling Bob Tarling 2005-08-24 02:43:56 PDT
                             Re: [gef-users] Edge deletefromModel =?ISO-8859-2?Q?Horv=E1th_Zsolt?= <horvath dot zsolt at szilank dot hu> =?ISO-8859-2?Q?Horv=E1th_Zsolt?= <horvath dot zsolt at szilank dot hu> 2005-08-24 03:27:40 PDT
Messages per page: