Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ConnectionLayer
ConnectionLayer [message #140565] Tue, 29 June 2004 07:50 Go to next message
Eclipse UserFriend
Originally posted by: hello.yahoo.com

Hi

Now my parent figure is a figure extending from ConnectionLayer and
layout is DelegatingLayout,ConnectionRouter is ManhantonRouter.When I want
to add some resize or move functions for my figures some exception will
appear:
Reason:
org.eclipse.draw2d.DelegatingLayout
Unhandled event loop exception

I have added SetConstraintCommand and XYLayoutEditPolicy to support my
fucntions. why?

thanks in advance.

Daniel
Re: ConnectionLayer [message #140778 is a reply to message #140565] Tue, 29 June 2004 21:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rlemaigr.ulb.ac.be

Hello,

If I properly understand, you use XYLayoutEditPolicy on an EditPart with=
a =

content pane layed out by DelegatingLayout ?

This should be the problem because in the code of XYLayoutEditPolicy, it=
=

is assumed that the layout manager is XYLayout and no other.
It's strange you don't get a classcastexception somewhere...

If you really want to use DelegatingLayout, perhaps you should write you=
r =

own ConstrainedLayoutEditPolicy...I don't know...

hope this will help,

r=E9gis


On Tue, 29 Jun 2004 07:50:57 +0000 (UTC), Daniel <hello@yahoo.com> wrote=
:

> Hi
>
> Now my parent figure is a figure extending from ConnectionLayer and
> layout is DelegatingLayout,ConnectionRouter is ManhantonRouter.When I =
=

> want
> to add some resize or move functions for my figures some exception wil=
l
> appear:
> Reason:
> org.eclipse.draw2d.DelegatingLayout
> Unhandled event loop exception
>
> I have added SetConstraintCommand and XYLayoutEditPolicy to support my=

> fucntions. why?
>
> thanks in advance.
>
> Daniel
>



-- =

Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Re: ConnectionLayer [message #140786 is a reply to message #140565] Tue, 29 June 2004 21:37 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
You need to find the real cause of the exception. Look in the .log file or
the Error Log view. Also, what version of GEF are you using?

"Daniel" <hello@yahoo.com> wrote in message news:cbr710$3fo$1@eclipse.org...
> Hi
>
> Now my parent figure is a figure extending from ConnectionLayer and
> layout is DelegatingLayout,ConnectionRouter is ManhantonRouter.When I want
> to add some resize or move functions for my figures some exception will
> appear:
> Reason:
> org.eclipse.draw2d.DelegatingLayout
> Unhandled event loop exception
>
> I have added SetConstraintCommand and XYLayoutEditPolicy to support my
> fucntions. why?
>
> thanks in advance.
>
> Daniel
>
Re: ConnectionLayer [message #140797 is a reply to message #140778] Tue, 29 June 2004 21:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rlemaigr.ulb.ac.be

sorry I didn't read your following posts before answering this first one=
....
this answer was useless...
Re: ConnectionLayer [message #140842 is a reply to message #140786] Wed, 30 June 2004 01:26 Go to previous message
Eclipse UserFriend
Originally posted by: hello.yahoo.com

Thanks for your answers.This is my another post:
My root figure is using DelegatingLayout to layout its children and
it extends from ConnectionLayer. We use Locator to locate the figure. Now
I want to move and resize my figure. The existing EditPolicy is
XYLayoutEditPolicy. I have use it.But it reports some exceptions and no
child can move and resize.So I think if I need to reinvent another
EditPolicy(DelegatingLayoutEditPolciy extends
ConstrainedLayoutEditPolicy)to move and resize my children.
Am I right?
If I must write,will I need to implement some key methods such as
getLayoutOrigin(),getConstraintFor(Rectangle) and getConstraintFor(Point).
Thanks in advance.
Daniel.

The following is the error message

!MESSAGE org.eclipse.draw2d.DelegatingLayout
!STACK 0
java.lang.ClassCastException: org.eclipse.draw2d.DelegatingLayout
at
org.eclipse.gef.editpolicies.XYLayoutEditPolicy.getLayoutOri gin(XYLayoutEditPolicy.java:106)
at
org.eclipse.gef.editpolicies.XYLayoutEditPolicy.getConstrain tFor(XYLayoutEditPolicy.java:69)
at
org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy.get ResizeChildrenCommand

(ConstrainedLayoutEditPolicy.java:249)
at
org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy.get MoveChildrenCommand

(ConstrainedLayoutEditPolicy.java:262)
at
org.eclipse.gef.editpolicies.LayoutEditPolicy.getCommand(Lay outEditPolicy.java:183)
at
org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy.get Command(ConstrainedLayoutEditPolicy.java:138)
at
org.eclipse.gef.editparts.AbstractEditPart.getCommand(Abstra ctEditPart.java:494)
at
org.eclipse.gef.editpolicies.NonResizableEditPolicy.getMoveC ommand(NonResizableEditPolicy.java:175)
at
org.eclipse.gef.editpolicies.NonResizableEditPolicy.getComma nd(NonResizableEditPolicy.java:115)
at
org.eclipse.gef.editpolicies.ResizableEditPolicy.getCommand( ResizableEditPolicy.java:124)
at
org.eclipse.gef.editparts.AbstractEditPart.getCommand(Abstra ctEditPart.java:494)
at
org.eclipse.gef.tools.DragEditPartsTracker.getCommand(DragEd itPartsTracker.java:227)
at
org.eclipse.gef.tools.DragEditPartsTracker.handleDragInProgr ess(DragEditPartsTracker.java:321)
at org.eclipse.gef.tools.AbstractTool.mouseDrag(AbstractTool.ja va:955)
at org.eclipse.gef.tools.SelectionTool.mouseDrag(SelectionTool. java:493)
at org.eclipse.gef.EditDomain.mouseDrag(EditDomain.java:205)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouse Moved(DomainEventDispatcher.java:329)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseMove( LightweightSystem.java:511)
Previous Topic:Add bend point on a PolylineConnection
Next Topic:How does a CreationTool actually work?
Goto Forum:
  


Current Time: Fri Apr 26 15:26:51 GMT 2024

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

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

Back to the top