Login | Register
My pages Projects Community openCollabNet

Discussions > dev > [gef-dev] TrapRects and invisible Figs

gef
Discussion topic

Hide all messages in topic

All messages in topic

Re: [gef-dev] TrapRects and invisible Figs

Reply

Author Nils Bandener <nilsb at upb dot de>
Full name Nils Bandener <nilsb at upb dot de>
Date 2004-07-18 05:51:06 PDT
Message Hi Bob,

> I've commited this and it will be in the next release (in the next week or
> two).
>
> You must realize that should a fig become visible again then the trap
> facility could be broken.
>
> I'm curious why you need to make a FigNode invisible. I've never seen an
> application do this. I've only ever seen child figs of a FigNode or FigEdge
> made invisible.

Uhm, yes, there is a reason for that, which I completely forgot when I
submitted the patches (silly me :-/) See below for an explanation.

> Usually if a FigNode is not to be shown anymore then it can be removed from
> the diagram (but left in the model).
>
> What is your use case for this?

Actually, I have two use cases: I am developing an editor for system
structure diagrams of mechatronic systems (similar to component
diagrams). These diagrams can contain system elements, that may contain
further system elements (Realized by a trap rect). Now i want to be able
to choose whether the editor shows these system elements in an extended
state (i.e. showing their child elements) or in a collapsed state
(without their child elements). However, when these system elements are
in the collapsed state, I just cannot remove the FigNodes of the childs
from the diagram because I would loose the layout information
(positioning, size, etc.). So, I chose to set them to invisbile.

The other use case is a special feature of those system structure
diagrams. It allows you to specify alternatives for system elements.
These alternatives are stored in the structure, but not displayed, until
the active alternative is replaced by another alternative.

There's a small problem with the patch I submitted, which I however
realized only afterwards. Actually, GEF only supports the Visible flag
for Figs located in FigGroups, but not for Figs which are directly
located in an Editor. However, I managed to convince GEF not to display
invisible FigNodes by subclassing FigNode and SelectionManager. I
created these subclasses already quite a while ago, so that I completely
forgot them when I recently created the support of invisible figs for
trap rects. So, this patch alone does not really make sense. I will have
a look into the modifications i have made before, in order to create a
patch for this, too. However, I fear that these modifications are not
that clean as the ones i have already submitted. When I find the time, I
might have a look for a better way to support invisible FigNodes.

Bye

Nils

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe at gef dot tigris dot org
For additional commands, e-mail: dev-help at gef dot tigris dot org

Re: [gef-dev] TrapRects and invisible Figs

Reply

Author Bob Tarling <bob dot tarling at ntlworld dot com>
Full name Bob Tarling <bob dot tarling at ntlworld dot com>
Date 2004-07-14 15:46:49 PDT
Message Hi Nils

I've commited this and it will be in the next release (in the next week or
two).

You must realize that should a fig become visible again then the trap
facility could be broken.

I'm curious why you need to make a FigNode invisible. I've never seen an
application do this. I've only ever seen child figs of a FigNode or FigEdge
made invisible.

Usually if a FigNode is not to be shown anymore then it can be removed from
the diagram (but left in the model).

What is your use case for this?

Bob.


----- Original Message -----
From: "Bob Tarling" <bob.tarling@ntlw​orld.com>
To: <dev at gef dot tigris dot org>
Sent: Wednesday, July 14, 2004 1:06 AM
Subject: Re: [gef-dev] TrapRects and invisible Figs


> Thanks Nils
>
> I've added this as issue 148
> http://gef.tigris.or​g/issues/show_bug.cg​i?id=148
>
> I'd recommend you add yourself to the cc list for this issue so you can
see
> how it progresses.
>
> Feel free to enter any other issues you come across direct into the IZ
> database. Makes it easier for us both to track.
>
> Regards
>
> Bob.
>
> ----- Original Message -----
> From: "Nils Bandener" <nilsb at upb dot de>
> To: <dev at gef dot tigris dot org>
> Sent: Monday, July 12, 2004 5:35 PM
> Subject: [gef-dev] TrapRects and invisible Figs
>
>
> > Hi,
> >
> > For a project, I needed to use the Visible flag of FigNodes. However,
> > GEF uses to display TrapRects even for FigNodes with the Visible flag
> > set to false. This caused TrapRects showing up on the locations of
> > invisible FigNodes which can be quite confusing.
> >
> > I modified the source of GEF 0.10.4 to honour the Visible flag while
> > dragging FigNodes. The diffs are below.
> >
> > Bye
> >
> > Nils
> >
> > --- org/tigris/gef/base/​ModePlace.java 2004-06-05 20:54:24.000000000
> +0200
> > +++ org/tigris/gef/base/​ModePlace.java.new 2004-07-12
> > 18:06:53.000000000 +0200
> > @@ -196,6 +196,9 @@
> > if(!(otherFig instanceof FigNode)) {
> > continue;
> > }
> > + if (!otherFig.isVisible()) {
> > + continue;
> > + }
> > if(otherFig.equals(_pers)) {
> > continue;
> > }
> >
> >
> > --- org/tigris/gef/base/​ModeModify.java 2004-06-05 20:53:02.000000000
> +0200
> > +++ org/tigris/gef/base/​ModeModify.java.new 2004-07-12
> > 17:59:20.000000000 +0200
> > @@ -383,6 +383,10 @@
> > continue;
> > }
> >
> > + if(!otherFig.isVisible()) {
> > + continue;
> > + }
> > +
> > Rectangle trap = otherFig.getTrapRect();
> > if(trap == null) {
> > continue;
> >
> >
> > --------------------​--------------------​--------------------​---------
> > To unsubscribe, e-mail: dev-unsubscribe at gef dot tigris dot org
> > For additional commands, e-mail: dev-help at gef dot tigris dot org
> >
>
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe at gef dot tigris dot org
> For additional commands, e-mail: dev-help at gef dot tigris dot org
>
>


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe at gef dot tigris dot org
For additional commands, e-mail: dev-help at gef dot tigris dot org

Re: [gef-dev] TrapRects and invisible Figs

Reply

Author Bob Tarling <bob dot tarling at ntlworld dot com>
Full name Bob Tarling <bob dot tarling at ntlworld dot com>
Date 2004-07-13 17:06:05 PDT
Message Thanks Nils

I've added this as issue 148
http://gef.tigris.or​g/issues/show_bug.cg​i?id=148

I'd recommend you add yourself to the cc list for this issue so you can see
how it progresses.

Feel free to enter any other issues you come across direct into the IZ
database. Makes it easier for us both to track.

Regards

Bob.

----- Original Message -----
From: "Nils Bandener" <nilsb at upb dot de>
To: <dev at gef dot tigris dot org>
Sent: Monday, July 12, 2004 5:35 PM
Subject: [gef-dev] TrapRects and invisible Figs


> Hi,
>
> For a project, I needed to use the Visible flag of FigNodes. However,
> GEF uses to display TrapRects even for FigNodes with the Visible flag
> set to false. This caused TrapRects showing up on the locations of
> invisible FigNodes which can be quite confusing.
>
> I modified the source of GEF 0.10.4 to honour the Visible flag while
> dragging FigNodes. The diffs are below.
>
> Bye
>
> Nils
>
> --- org/tigris/gef/base/​ModePlace.java 2004-06-05 20:54:24.000000000
+0200
> +++ org/tigris/gef/base/​ModePlace.java.new 2004-07-12
> 18:06:53.000000000 +0200
> @@ -196,6 +196,9 @@
> if(!(otherFig instanceof FigNode)) {
> continue;
> }
> + if (!otherFig.isVisible()) {
> + continue;
> + }
> if(otherFig.equals(_pers)) {
> continue;
> }
>
>
> --- org/tigris/gef/base/​ModeModify.java 2004-06-05 20:53:02.000000000
+0200
> +++ org/tigris/gef/base/​ModeModify.java.new 2004-07-12
> 17:59:20.000000000 +0200
> @@ -383,6 +383,10 @@
> continue;
> }
>
> + if(!otherFig.isVisible()) {
> + continue;
> + }
> +
> Rectangle trap = otherFig.getTrapRect();
> if(trap == null) {
> continue;
>
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe at gef dot tigris dot org
> For additional commands, e-mail: dev-help at gef dot tigris dot org
>


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe at gef dot tigris dot org
For additional commands, e-mail: dev-help at gef dot tigris dot org

[gef-dev] TrapRects and invisible Figs

Reply

Author Nils Bandener <nilsb at upb dot de>
Full name Nils Bandener <nilsb at upb dot de>
Date 2004-07-12 09:35:57 PDT
Message Hi,

For a project, I needed to use the Visible flag of FigNodes. However,
GEF uses to display TrapRects even for FigNodes with the Visible flag
set to false. This caused TrapRects showing up on the locations of
invisible FigNodes which can be quite confusing.

I modified the source of GEF 0.10.4 to honour the Visible flag while
dragging FigNodes. The diffs are below.

Bye

Nils

--- org/tigris/gef/base/​ModePlace.java 2004-06-05 20:54:24.000000000 +0200
+++ org/tigris/gef/base/​ModePlace.java.new 2004-07-12
18:06:53.000000000 +0200
@@ -196,6 +196,9 @@
                  if(!(otherFig instanceof FigNode)) {
                      continue;
                  }
+ if (!otherFig.isVisible()) {
+ continue;
+ }
                  if(otherFig.equals(_pers)) {
                      continue;
                  }


--- org/tigris/gef/base/​ModeModify.java 2004-06-05 20:53:02.000000000 +0200
+++ org/tigris/gef/base/​ModeModify.java.new 2004-07-12
17:59:20.000000000 +0200
@@ -383,6 +383,10 @@
                      continue;
                  }

+ if(!otherFig.isVisible()) {
+ continue;
+ }
+
                  Rectangle trap = otherFig.getTrapRect();
                  if(trap == null) {
                      continue;


--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: dev-unsubscribe at gef dot tigris dot org
For additional commands, e-mail: dev-help at gef dot tigris dot org
Messages per page: