Another question on PolylineConnection [message #200720] |
Wed, 26 October 2005 11:50 |
Eclipse User |
|
|
|
Originally posted by: prooteus_NOSPAM.gmx.net
Hi,
here a PolylineConnection represents the directed line between two GEF
Figures. I would like to display some small icons under the middle of
this line. As I've just recognized, it does not work the following way:
public class RelationFigure extends PolylineConnection {
[...]
public void setComparisonTypeImages(Vector comparisonTypeImages) {
this.comparisonTypeImages = comparisonTypeImages;
for (Iterator iter = comparisonTypeImages.iterator();
iter.hasNext();) {
Image image = (Image) iter.next();
Label l = new Label();
l.setIcon(image);
MidpointLocator locator = new MidpointLocator(this, 0);
locator.setRelativePosition(PositionConstants.SOUTH);
locator.setGap(4);
add(l, locator);
l.setVisible(true);
}
}
[...]
}
This just displays the last icon in the comparisonTypeImages vector at
the midpoint position.
Is there a way to display all icons under the line?
Any hints are welcome.
Stefan
|
|
|
Powered by
FUDForum. Page generated in 0.04101 seconds