Fixed size diagram [message #218251] |
Wed, 21 June 2006 08:27  |
Eclipse User |
|
|
|
Originally posted by: Ilya.Boyandin.fh-joanneum.at
Hello all!
I want to make a GEF editor allowing the user to lay out graphical
objects on a display, so the diagram area of the editor must be of a
fixed size. The bounds of the diagram in pixels are set upon the editor
creation, when the user chooses the screen resolution, and later they
probably never change.
Can somebody tell me how to accomplish this?
The problem is that by default the sizes are practically unlimited -
they grow when figures are resized or new ones are added so that they
don't fit within the bounds anymore. This behaviour is inappropriate for me.
Thanks in advance,
Ilya
|
|
|
Re: Fixed size diagram [message #218260 is a reply to message #218251] |
Wed, 21 June 2006 09:33   |
Eclipse User |
|
|
|
Originally posted by: lamont_gilbert.rigidsoftware.com
Ilya Boyandin wrote:
> Hello all!
>
> I want to make a GEF editor allowing the user to lay out graphical
> objects on a display, so the diagram area of the editor must be of a
> fixed size. The bounds of the diagram in pixels are set upon the editor
> creation, when the user chooses the screen resolution, and later they
> probably never change.
>
> Can somebody tell me how to accomplish this?
>
> The problem is that by default the sizes are practically unlimited -
> they grow when figures are resized or new ones are added so that they
> don't fit within the bounds anymore. This behaviour is inappropriate for
> me.
>
> Thanks in advance,
> Ilya
IIRC this is because of the FreeFormLayout of the root editpart. You want
to use a different layout. FreeForm expands to fit the bounds of the
contents.
--
Respectfully,
CL Gilbert
"Verily, verily, I say unto you, He that entereth not by the door() into the
sheepfold{}, but climbeth up some other *way, the same is a thief and a
robber."
|
|
|
|
|
Re: Fixed size diagram [message #218298 is a reply to message #218289] |
Thu, 22 June 2006 03:40   |
Eclipse User |
|
|
|
Originally posted by: Ilya.Boyandin.fh-joanneum.at
As I wrote in the previous answer I tried some other layers and layouts,
for instance, the combination of
ScalableLayeredPane, XYLayout, and ScalableRootEditPart instead of
FreeformLayer, FreeformLayout, and FreeformGraphicalRootEditPart
and still the diagram sizes were unlimited, though they could grow into
only two directions instead of four.
Setting the maximumSize property of the diagram Figure didn't help either.
> I think the problem is that maybe you used FreeFormLayer as the figure for
> the rooteditpart, which expands to hold all its figures.
> So I think you should try another Layer for your rooteditpart :-)
>> I want to make a GEF editor allowing the user to lay out graphical
>> objects on a display, so the diagram area of the editor must be of a
>> fixed size.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.43244 seconds