Attaching one figure to another [message #191677] |
Wed, 10 August 2005 20:01 |
Eclipse User |
|
|
|
Originally posted by: gef.oppacher.ca
Hi,
I'm trying to attach one figure to another. I have a device figure and a
port figure. I would like to attach a port figure to the outside of a
device figure. Also I'd like the port figure to move with the device
figure whenever the device figure is moved. Do I just have to manually
change the bounds of the ports after a device move? Any help would be
great.
|
|
|
Re: Attaching one figure to another [message #192062 is a reply to message #191677] |
Sat, 13 August 2005 11:06 |
Eclipse User |
|
|
|
Originally posted by: venkataramana.m.tcs.com
Hi, If your want port figure also to move along with device figure ...then
it could be done like this ...
--------------------------------------
/* a transparent container figure to which
Device Figure and PortFigure should be added */
class ContainerFig extends Figure
{
public ContainerFig() { setLayoutManager(new XYLayout()); }
public useLocalCoordinates() { return true; }
}
--------------------------------------
class PortEditPart extends ...
{
boolean isSelectable() { return false; }/*PORT FIGURE WILL NOT BE
SELECTABLE*/
}
--------------------------------------
|
|
|
Powered by
FUDForum. Page generated in 0.03493 seconds