Skip to main content



      Home
Home » Eclipse Projects » GEF » Set Figure ClientArea
Set Figure ClientArea [message #1787246] Tue, 22 May 2018 12:51 Go to next message
Eclipse UserFriend
Hello,

I have a figure in another figure. The inner figure has a small size but the container figure is larger. How can I shrink the container figure to the size of its child. I found that the size can be retrieved by calling the getClientArea() but there is nothing as setClientArea(). I also tried change the setSize() and setBounds() but didn't work!

index.php/fa/32880/0/

Thanks.
Parsa
Re: Set Figure ClientArea [message #1787280 is a reply to message #1787246] Wed, 23 May 2018 02:20 Go to previous messageGo to next message
Eclipse UserFriend
The client area is the area a figure reserves for its children. You will have to go for the figure's bounds instead, manipulating its location and size (which you might want to do indirectly by specifying a max size). Take a closer look at the IFigure interface, the javadoc provides good guidance.
Re: Set Figure ClientArea [message #1787319 is a reply to message #1787280] Wed, 23 May 2018 11:52 Go to previous message
Eclipse UserFriend
Hi Alexander,

Thanks for the reply. I tried everything on the child and the figure itself (see below)! But none of these changed it ! It is still larger than what it should take and I want to clip it ! Shouldn't I use clipping strategy?

child.setMaximumSize(new Dimension(10, 10));
child.setBounds(new Rectangle(10,10,10,10));
getFigure().setBounds(new Rectangle(0, 0, 10, 10));
getFigure().setPreferredSize(new Dimension(10, 10));
getFigure().setSize(new Dimension(10, 10));
Previous Topic:Old GEF problem
Next Topic:GEF5 Problem Setting Graph Background
Goto Forum:
  


Current Time: Sat Apr 26 05:03:12 EDT 2025

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

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

Back to the top