Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Question about realisation of swimlanes
Question about realisation of swimlanes [message #228523] Tue, 26 December 2006 16:42
Eclipse UserFriend
Originally posted by: wolffischer.gmx.de

Hi there,

I am currently trying to make a modelling tool capable of switching btw.
normal displaying of roles (i.e. little symbols/icons) and displaying
them as swimlanes.
Currently, roles are references. The ReferenceFigures are
ContainerFigures. In those the RoleFigures are placed.
What i want to do now, is placing the swimlanefigure inside the
reference (instead of the RoleFigure). This partially works:
My problem is that i have to increase the size of the ReferenceFigure
and its SwimLaneFigure to fit the whole size of my ScopeFigure (i.e. my
swimlanes shall cover the whole width of my scope). If i do so (see
codesnippet below), i get some strange behaviour: The scope gets bigger
and bigger (at least the scrollable region gets bigger and bigger
without stopping).
It seems, as if the size, given by the scope is too small...? I have to
decrease the widht by a fairly huge amount of 100 and the height by
about 40 pixel to stop this behaviour, but then the lines of my swimlane
do not end at the edges of my diagramm...

Thanks for help!

Wolf


codesnippet:
@Override
public void paintFigure(Graphics graphics) {
//This is the ReferenceFigure
IFigure parentfig = this.getParent();
//.. and this is my ScopeFigure
IFigure parentsparentfig = parentfig.getParent();

myparentssize = parentsparentfig.getBounds().getCopy();
Point std_location = new Point(0, 0);
Dimension size = new Dimension(myparentssize.width, myparentssize.height);


//myparentssize = new Rectangle(0, 0, 200, 200);
parentfig.setLocation(std_location);
this.setLocation(std_location);
parentfig.setPreferredSize(size);
this.setPreferredSize(size);
super.paintFigure(graphics);

}
Previous Topic:Problem with ISelectionProvider at runtime
Next Topic:how to use dialogs in editing
Goto Forum:
  


Current Time: Thu Apr 25 20:45:18 GMT 2024

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

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

Back to the top