Skip to main content



      Home
Home » Eclipse Projects » GEF » Create a Figure not connectable
Create a Figure not connectable [message #68769] Sun, 09 March 2003 18:51 Go to next message
Eclipse UserFriend
Originally posted by: truenoto.yahoo.com

Hi,

What is the easiest way to create a Figure in draw2d not connectable?
For example, in the Logic example, how to make Ground Output Figure NOT
connectable?

Thanks
Re: Create a Figure not connectable [message #68792 is a reply to message #68769] Sun, 09 March 2003 21:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Are you asking how to make an EditPart not connectable? By default, an
EditPart doesn't understand any request. So, it only *becomes* connectable
when you install a ConnectionEndpointEditPolicy. Without this policy, the
part will never be identified as a "target" for connection operations.

"Takumi Fujiwara" <truenoto@yahoo.com> wrote in message
news:b4gkga$gl$1@rogue.oti.com...
> Hi,
>
> What is the easiest way to create a Figure in draw2d not connectable?
> For example, in the Logic example, how to make Ground Output Figure NOT
> connectable?
>
> Thanks
>
>
Re: Create a Figure not connectable [message #68943 is a reply to message #68792] Mon, 10 March 2003 11:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: truenoto.yahoo.com

Thanks.
That tells me why a "Wire" is connectable, it install a
ConnectionEndpointEditPolicy.
Could you tell me why I can not connect to "Label" but I can connect to
"LiveOutput" with a Wire? in the logic example?

Thanks.

"Randy Hudson" <none@us.ibm.com> wrote in message
news:b4gsmf$433$1@rogue.oti.com...
> Are you asking how to make an EditPart not connectable? By default, an
> EditPart doesn't understand any request. So, it only *becomes*
connectable
> when you install a ConnectionEndpointEditPolicy. Without this policy, the
> part will never be identified as a "target" for connection operations.
>
> "Takumi Fujiwara" <truenoto@yahoo.com> wrote in message
> news:b4gkga$gl$1@rogue.oti.com...
> > Hi,
> >
> > What is the easiest way to create a Figure in draw2d not connectable?
> > For example, in the Logic example, how to make Ground Output Figure NOT
> > connectable?
> >
> > Thanks
> >
> >
>
>
Re: Create a Figure not connectable [message #68984 is a reply to message #68943] Mon, 10 March 2003 11:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You're right. Sorry, I used the wrong term. I should have said
GraphicalNodeEditPolicy. The things at the ends of connections are "nodes".

"Takumi Fujiwara" <truenoto@yahoo.com> wrote in message
news:b4idcq$4id$1@rogue.oti.com...
> Thanks.
> That tells me why a "Wire" is connectable, it install a
> ConnectionEndpointEditPolicy.
> Could you tell me why I can not connect to "Label" but I can connect to
> "LiveOutput" with a Wire? in the logic example?
>
> Thanks.
>
> "Randy Hudson" <none@us.ibm.com> wrote in message
> news:b4gsmf$433$1@rogue.oti.com...
> > Are you asking how to make an EditPart not connectable? By default, an
> > EditPart doesn't understand any request. So, it only *becomes*
> connectable
> > when you install a ConnectionEndpointEditPolicy. Without this policy,
the
> > part will never be identified as a "target" for connection operations.
> >
> > "Takumi Fujiwara" <truenoto@yahoo.com> wrote in message
> > news:b4gkga$gl$1@rogue.oti.com...
> > > Hi,
> > >
> > > What is the easiest way to create a Figure in draw2d not connectable?
> > > For example, in the Logic example, how to make Ground Output Figure
NOT
> > > connectable?
> > >
> > > Thanks
> > >
> > >
> >
> >
>
>
Re: Create a Figure not connectable [message #69272 is a reply to message #68984] Tue, 11 March 2003 11:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: truenoto.yahoo.com

I would like to do this:

User can draw a wire between an AND gate and a OR gate, but not an AND gate
and a Circuit. I would like to show this interactively to the user, i.e.
when user clicks on AND gate to start a wire, and the he moves the mouse to
the OR gate, the plug icon shows up, but when he moves the icon to the
Circuit , it shows a STOP icon.

Where should I put this check? in the EditPolicy? or in the place where the
editpart return the connection anchor (return null, if the wire is not
allow)?

Thanks for your quick response.


"Randy Hudson" <none@us.ibm.com> wrote in message
news:b4ieal$5m0$1@rogue.oti.com...
> You're right. Sorry, I used the wrong term. I should have said
> GraphicalNodeEditPolicy. The things at the ends of connections are
"nodes".
>
> "Takumi Fujiwara" <truenoto@yahoo.com> wrote in message
> news:b4idcq$4id$1@rogue.oti.com...
> > Thanks.
> > That tells me why a "Wire" is connectable, it install a
> > ConnectionEndpointEditPolicy.
> > Could you tell me why I can not connect to "Label" but I can connect to
> > "LiveOutput" with a Wire? in the logic example?
> >
> > Thanks.
> >
> > "Randy Hudson" <none@us.ibm.com> wrote in message
> > news:b4gsmf$433$1@rogue.oti.com...
> > > Are you asking how to make an EditPart not connectable? By default,
an
> > > EditPart doesn't understand any request. So, it only *becomes*
> > connectable
> > > when you install a ConnectionEndpointEditPolicy. Without this policy,
> the
> > > part will never be identified as a "target" for connection operations.
> > >
> > > "Takumi Fujiwara" <truenoto@yahoo.com> wrote in message
> > > news:b4gkga$gl$1@rogue.oti.com...
> > > > Hi,
> > > >
> > > > What is the easiest way to create a Figure in draw2d not
connectable?
> > > > For example, in the Logic example, how to make Ground Output Figure
> NOT
> > > > connectable?
> > > >
> > > > Thanks
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Re: Create a Figure not connectable [message #69313 is a reply to message #69272] Tue, 11 March 2003 13:42 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

"Takumi Fujiwara" <truenoto@yahoo.com> wrote in message
news:b4l2gt$1pf$1@rogue.oti.com...
> I would like to do this:
>
> User can draw a wire between an AND gate and a OR gate, but not an AND
gate
> and a Circuit. I would like to show this interactively to the user, i.e.
> when user clicks on AND gate to start a wire, and the he moves the mouse
to
> the OR gate, the plug icon shows up, but when he moves the icon to the
> Circuit , it shows a STOP icon.
>
> Where should I put this check? in the EditPolicy? or in the place where
the
> editpart return the connection anchor (return null, if the wire is not
> allow)?

The GraphicalNodeEditPolicy is being installed in CircuitEditPart's
super-superclass, LogicEditPart. If you overwrite the EditPolicy with null,
you will get exactly what you describe. So, in circuit editpart:

createEditPolicies() {
super.createEditPolicies();
installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new
ContainerHighlightEditPolicy());
//ADDED LINE FOLLOWS!!
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, null);
}
Previous Topic:question on draw2d translateToAbsolute() and translateToRelative()
Next Topic:Simple examples ...
Goto Forum:
  


Current Time: Thu May 08 19:32:06 EDT 2025

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

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

Back to the top