IFigure client area [message #197825] |
Thu, 17 July 2008 17:32 |
Eclipse User |
|
|
|
Originally posted by: kelvinng.db.gmail.com
Ifigure has a method called getClientArea(), lbut does not have a
setClientArea method.
Is there a method that's equivalent to setClientArea(int width, int height)?
~Kelvin Ng
|
|
|
|
Re: IFigure client area [message #197846 is a reply to message #197832] |
Thu, 17 July 2008 18:31 |
Eclipse User |
|
|
|
Originally posted by: kelvinng.db.gmail.com
I want the client area to expand (while maintaining the aspect ratio)
while I type.
How do I do this?
Do I need my own layout manager for this?
It seems that I need to do this within my layout manager's
layout(IFigure figure) method,
~Kelvin Ng
On 2008-07-17 13:48:29 -0400, Simon Bernard
<simon.bernard@anyware-tech.com> said:
> hi,
>
> The clientArea is calculated depending on the bounds and the inset of
> the border. So you must modify one to change the size of clientArea.
>
> public Rectangle getClientArea(Rectangle rect) {
> rect.setBounds(getBounds());
> rect.crop(getInsets());
> if (useLocalCoordinates())
> rect.setLocation(0, 0);
> return rect;
> }
>
> public Insets getInsets() {
> if (getBorder() != null)
> return getBorder().getInsets(this);
> return NO_INSETS;
> }
>
> Simon
>
>
>
> Kelvin Ng a écrit :
>> Ifigure has a method called getClientArea(), lbut does not have a
>> setClientArea method.
>>
>> Is there a method that's equivalent to setClientArea(int width, int height)?
>>
>> ~Kelvin Ng
|
|
|
Powered by
FUDForum. Page generated in 0.03040 seconds