Automatically resize [message #119860] |
Mon, 01 March 2004 03:29  |
Eclipse User |
|
|
|
Originally posted by: bbdaffy.hotmail.com
Hi,
I am using the Draw2D example of the UML Diagram as a start to experiment
with GEF and Draw2D. Instead of hardcoding the diagram in the main method,
I modified it to read from an xml file. I do not wish to store the size of
each figure in the file, instead I hope the application can automatically
resize my figures accordingly.
My application is now being written as an Eclipse plugin and the figures
are created by an EditPart. I dun think I can use the setConstraint method
in this case, can I? If not, how can I auto-resize the figures upon
loading the xml file? Thanks.
Rgds,
Lee
|
|
|
|
Re: Automatically resize [message #120238 is a reply to message #119898] |
Wed, 03 March 2004 05:53  |
Eclipse User |
|
|
|
Originally posted by: bbdaffy.hotmail.com
Thanks... Managed to solve my problem. :)
Guy Slade wrote:
> If you set a figures size to (-1,-1) then it will auto size itself to
> what it needs to be to show all its content. (-1,-1) would be the size
> you would use in your setConstraint.
> Guy
> Lee wrote:
> > Hi,
> >
> > I am using the Draw2D example of the UML Diagram as a start to experiment
> > with GEF and Draw2D. Instead of hardcoding the diagram in the main method,
> > I modified it to read from an xml file. I do not wish to store the size of
> > each figure in the file, instead I hope the application can automatically
> > resize my figures accordingly.
> >
> > My application is now being written as an Eclipse plugin and the figures
> > are created by an EditPart. I dun think I can use the setConstraint method
> > in this case, can I? If not, how can I auto-resize the figures upon
> > loading the xml file? Thanks.
> >
> > Rgds,
> > Lee
> >
|
|
|
Powered by
FUDForum. Page generated in 0.03317 seconds