Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Filling particular area by using Graphics in Draw2D Figure
Filling particular area by using Graphics in Draw2D Figure [message #155978] Thu, 28 October 2004 06:21 Go to next message
Eclipse UserFriend
Originally posted by: rshanmugam.bsil.com

I am developing State chart Diagram by using GEF. For Composite State ,I
need to fill up color at particular area in Figure (Not complete figure).
After filling up the color, I can able to place the Child Component.

I tried by using fillRoundRactangle method to fill up the particular area.
But problem is that whenever I am placing Child figure on it. it is not
showing the child figure. If I call paintChildren() method , I can able to
see the child but problem is that filled color is not showing.

When I used setClip(Rectangle) method. I am facing problem that when I
place this figure on another same kind of figure (it is like State
component on State Component, like child and parent are same kind of
figure) at scrolling the child. It is showing Clipped rectangle area out
side of parent and moreover figure boundary is not proper.

my doubt is How to paint/fill the particular area and placing child
component in figure at particular area by using Paint(method) or
anymethod. I refered pushState,popState and restoreState.I Could not get
idea about How to use it?.

I was struggling with this problem since last week.

Note:
I did not used paintFigure() method.


Thanks in Advance.
R.Shanmugam
Re: Filling particular area by using Graphics in Draw2D Figure [message #156026 is a reply to message #155978] Thu, 28 October 2004 19:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You should be overriding paintFigure(), not paint().

The only thing to worry about push/pop, is that IFF you call push, you must
call pop the same number of times. Don't call this method unless you have a
reason to. paintFigure() can leave the Graphics however it want as long as
the state stack is not changed.

"R.Shanmugam" <rshanmugam@bsil.com> wrote in message
news:clq34s$9sm$1@eclipse.org...
> I am developing State chart Diagram by using GEF. For Composite State ,I
> need to fill up color at particular area in Figure (Not complete figure).
> After filling up the color, I can able to place the Child Component.
>
> I tried by using fillRoundRactangle method to fill up the particular area.
> But problem is that whenever I am placing Child figure on it. it is not
> showing the child figure. If I call paintChildren() method , I can able to
> see the child but problem is that filled color is not showing.
>
> When I used setClip(Rectangle) method. I am facing problem that when I
> place this figure on another same kind of figure (it is like State
> component on State Component, like child and parent are same kind of
> figure) at scrolling the child. It is showing Clipped rectangle area out
> side of parent and moreover figure boundary is not proper.
>
> my doubt is How to paint/fill the particular area and placing child
> component in figure at particular area by using Paint(method) or
> anymethod. I refered pushState,popState and restoreState.I Could not get
> idea about How to use it?.
>
> I was struggling with this problem since last week.
>
> Note:
> I did not used paintFigure() method.
>
>
> Thanks in Advance.
> R.Shanmugam
>
Re: Filling particular area by using Graphics in Draw2D Figure [message #157640 is a reply to message #156026] Thu, 11 November 2004 10:51 Go to previous message
Eclipse UserFriend
Originally posted by: rshanmugam.bsil.com

Thanks Randy Hudson,

I solved the problem by disabling children's colour and allowing reflect
parent's colour.
I got your point about Push/Pop and restore method.
Once Again thanks lot for it.

Regards
R.Shanmugam.

Randy Hudson wrote:

> You should be overriding paintFigure(), not paint().

> The only thing to worry about push/pop, is that IFF you call push, you must
> call pop the same number of times. Don't call this method unless you have a
> reason to. paintFigure() can leave the Graphics however it want as long as
> the state stack is not changed.

> "R.Shanmugam" <rshanmugam@bsil.com> wrote in message
> news:clq34s$9sm$1@eclipse.org...
>> I am developing State chart Diagram by using GEF. For Composite State ,I
>> need to fill up color at particular area in Figure (Not complete figure).
>> After filling up the color, I can able to place the Child Component.
>>
>> I tried by using fillRoundRactangle method to fill up the particular area.
>> But problem is that whenever I am placing Child figure on it. it is not
>> showing the child figure. If I call paintChildren() method , I can able to
>> see the child but problem is that filled color is not showing.
>>
>> When I used setClip(Rectangle) method. I am facing problem that when I
>> place this figure on another same kind of figure (it is like State
>> component on State Component, like child and parent are same kind of
>> figure) at scrolling the child. It is showing Clipped rectangle area out
>> side of parent and moreover figure boundary is not proper.
>>
>> my doubt is How to paint/fill the particular area and placing child
>> component in figure at particular area by using Paint(method) or
>> anymethod. I refered pushState,popState and restoreState.I Could not get
>> idea about How to use it?.
>>
>> I was struggling with this problem since last week.
>>
>> Note:
>> I did not used paintFigure() method.
>>
>>
>> Thanks in Advance.
>> R.Shanmugam
>>
Previous Topic:SelectionListener for InlineFlow
Next Topic:Layer Move Problem
Goto Forum:
  


Current Time: Fri Apr 26 22:41:37 GMT 2024

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

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

Back to the top