Figure blocking EditPart [message #196788] |
Tue, 27 September 2005 08:10 |
Eclipse User |
|
|
|
Originally posted by: dan.nicolici.nexource.ro
This is a multi-part message in MIME format.
------=_NextPart_000_000C_01C5C354.21008AC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello!
I have a 2 EditParts. One is a container for the other. I have overriden =
the container's "getDragTracker()" method to obtain a =
"move-to-click-location" behavior for the child part. All works well, =
the child part moves where I click on the parent, I can select the child =
part, everything is ok.
Now I want to do some improvement to the container's figure, so I add a =
Label to it's figure and surprise: I still have the =
"move-to-click-location" behavior but I can't select the child part as =
if the Label is blocking access to it. Why is this happening and how =
should I get arround it?
Thank you!
------=_NextPart_000_000C_01C5C354.21008AC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1515" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have a 2 EditParts. One is a =
container for the=20
other. I have overriden the container's "getDragTracker()" method to =
obtain a=20
"move-to-click-location" behavior for the child part. All works well, =
the child=20
part moves where I click on the parent, I can select the child part, =
everything=20
is ok.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Now I want to do some improvement =
to the=20
container's figure, so I add a Label to it's figure and surprise: I =
still have=20
the "move-to-click-location" behavior but I can't select the child part =
as if=20
the Label is blocking access to it. Why is this happening and how should =
I get=20
arround it?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thank you!</FONT></DIV></BODY></HTML>
------=_NextPart_000_000C_01C5C354.21008AC0--
|
|
|
Re: Figure blocking EditPart [message #196796 is a reply to message #196788] |
Tue, 27 September 2005 08:29 |
Eclipse User |
|
|
|
Originally posted by: dan.nicolici.nexource.ro
This is a multi-part message in MIME format.
------=_NextPart_000_001A_01C5C356.AEAB68C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I tried to override the container's figure paint() method and painted an =
image there (instead on a label added to the figure), but the image does =
not show...
------=_NextPart_000_001A_01C5C356.AEAB68C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1515" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I tried to override the container's =
figure paint()=20
method and painted an image there (instead on a label added to the =
figure), but=20
the image does not show...</FONT></DIV></BODY></HTML>
------=_NextPart_000_001A_01C5C356.AEAB68C0--
|
|
|
Re: Figure blocking EditPart [message #197489 is a reply to message #196788] |
Tue, 04 October 2005 06:44 |
hanys Messages: 188 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_004D_01C5C8BF.D06277B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
it seems that you have not have installed the appropriate Policy at =
container's or childs EditPart, which should return something like =
ChangeBoundsCommand.
if you are extending for example =
org.eclipse.gef.editpolicies.XYLayoutEditPolicy.
protected Command createChangeConstraintCommand(EditPart child,
Object constraint) {
// HERE CREATE COMMAND.
// This command have to do in execute method change model bounds, =
and than it is refreshed by notification mechanism.
return CMD;
}
Best Regards,
John Cage
------=_NextPart_000_004D_01C5C8BF.D06277B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>it seems that you have not have =
installed the=20
appropriate Policy at container's or childs EditPart, which should =
return=20
something like ChangeBoundsCommand.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>if you are extending for example=20
org.eclipse.gef.editpolicies.XYLayoutEditPolicy.</FONT></DIV >
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> protected Command=20
createChangeConstraintCommand(EditPart =
child,<BR> Object=20
constraint) {</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> // HERE CREATE=20
COMMAND.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> // This command have =
to do in=20
execute method change model bounds, and than it is refreshed by =
notification=20
mechanism.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> return=20
CMD;<BR> }</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Best Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>John Cage</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_004D_01C5C8BF.D06277B0--
|
|
|
Powered by
FUDForum. Page generated in 0.03482 seconds