Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Set Figure ClientArea
Set Figure ClientArea [message #1787246] Tue, 22 May 2018 16:51 Go to next message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
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 06:20 Go to previous messageGo to next message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 244
Registered: July 2009
Location: Lünen
Senior Member
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 15:52 Go to previous message
Parsa Pourali is currently offline Parsa PouraliFriend
Messages: 210
Registered: February 2014
Senior Member
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: Wed Apr 24 15:46:06 GMT 2024

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

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

Back to the top