|
Re: Set Figure ClientArea [message #1787280 is a reply to message #1787246] |
Wed, 23 May 2018 06:20   |
|
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  |
Parsa Pourali 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));
|
|
|
Powered by
FUDForum. Page generated in 0.01822 seconds