Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How can we select aTransparent Figure ?
How can we select aTransparent Figure ? [message #146589] Thu, 05 August 2004 08:29 Go to next message
Eclipse UserFriend
Originally posted by: justinaruja.isletsystems.com

Hello All,

I make a figure transparent by setOpaque(false).

but I cann't select this figure.

Is it possible?


Regards

Justin
Re: How can we select aTransparent Figure ? [message #146628 is a reply to message #146589] Thu, 05 August 2004 14:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

You can override containsPoint(x, y) to return true in the areas where the
figure *does* paint.
"Justin" <justinaruja@isletsystems.com> wrote in message
news:cesr5t$pb0$1@eclipse.org...
> Hello All,
>
> I make a figure transparent by setOpaque(false).
>
> but I cann't select this figure.
>
> Is it possible?
>
>
> Regards
>
> Justin
>
Re: How can we select aTransparent Figure ? [message #146640 is a reply to message #146589] Thu, 05 August 2004 14:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rlemaigr.ulb.ac.be

> Hello All,
>
> I make a figure transparent by setOpaque(false).
>
> but I cann't select this figure.
>
> Is it possible?

Can you select it if you "setOpaque(true)" it ?

I suppose you have already tried it but who knows...just to be sure...

I believed that the opacity of a Figure has only to do with weither or n=
ot =

the
background is filled with the background color before painting the =

Figure...
assuming that, I don't see any reason the opacity of a Figure would have=

something to do with the selectability of its EditPart...

But as always I may be wrong...

r=E9gis
Re: How can we select aTransparent Figure ? [message #146711 is a reply to message #146640] Fri, 06 August 2004 07:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: justinaruja.isletsystems.com

rlemaigr@ulb.ac.be wrote:
>> Hello All,
>>
>> I make a figure transparent by setOpaque(false).
>>
>> but I cann't select this figure.
>>
>> Is it possible?
>
>
> Can you select it if you "setOpaque(true)" it ?

I can select it, if I "setOpaque(true)"
>
> I suppose you have already tried it but who knows...just to be sure...
>
> I believed that the opacity of a Figure has only to do with weither or
> not the
> background is filled with the background color before painting the
> Figure...
> assuming that, I don't see any reason the opacity of a Figure would have
> something to do with the selectability of its EditPart...
>
> But as always I may be wrong...
>
> régis
>
Re: How can we select aTransparent Figure ? [message #146715 is a reply to message #146628] Fri, 06 August 2004 07:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: justinaruja.isletsystems.com

Randy Hudson wrote:

> You can override containsPoint(x, y) to return true in the areas where the
> figure *does* paint.

I code like below in Figure java file

public boolean containsPoint(int x, int y) {
Rectangle clientArea = getClientArea();
if (((clientArea.x < x)&& (clientArea.x + clientArea.width > x))
&& ((clientArea.y < y)&& (clientArea.y + clientArea.height >
y)))
{
return true;
} else
return super.containsPoint(x, y );

}



But not working.

Am I Correct?






> "Justin" <justinaruja@isletsystems.com> wrote in message
> news:cesr5t$pb0$1@eclipse.org...
>
>>Hello All,
>>
>> I make a figure transparent by setOpaque(false).
>>
>> but I cann't select this figure.
>>
>> Is it possible?
>>
>>
>>Regards
>>
>>Justin
>>
>
>
>

Regards

Justin
Re: How can we select aTransparent Figure ? [message #146822 is a reply to message #146715] Mon, 09 August 2004 02:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Does you figure use a local coordinate system or zoom? getClientArea would
be the wrong method to call in that case, since its in the children's
coordinates. Otherwise I can't think of anything.

"Justin D'aruja" <justinaruja@isletsystems.com> wrote in message
news:cevau3$f3j$1@eclipse.org...
> Randy Hudson wrote:
>
> > You can override containsPoint(x, y) to return true in the areas where
the
> > figure *does* paint.
>
> I code like below in Figure java file
>
> public boolean containsPoint(int x, int y) {
> Rectangle clientArea = getClientArea();
> if (((clientArea.x < x)&& (clientArea.x + clientArea.width > x))
> && ((clientArea.y < y)&& (clientArea.y + clientArea.height >
> y)))
> {
> return true;
> } else
> return super.containsPoint(x, y );
>
> }
>
>
>
> But not working.
>
> Am I Correct?
>
>
>
>
>
>
> > "Justin" <justinaruja@isletsystems.com> wrote in message
> > news:cesr5t$pb0$1@eclipse.org...
> >
> >>Hello All,
> >>
> >> I make a figure transparent by setOpaque(false).
> >>
> >> but I cann't select this figure.
> >>
> >> Is it possible?
> >>
> >>
> >>Regards
> >>
> >>Justin
> >>
> >
> >
> >
>
> Regards
>
> Justin
Re: How can we select aTransparent Figure ? [message #147464 is a reply to message #146822] Thu, 12 August 2004 06:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: justinaruja.isletsystems.com

Hello Randy,

My Figure is using local coordinate system.

Regards

Justin


Randy Hudson wrote:
> Does you figure use a local coordinate system or zoom? getClientArea would
> be the wrong method to call in that case, since its in the children's
> coordinates. Otherwise I can't think of anything.
>
> "Justin D'aruja" <justinaruja@isletsystems.com> wrote in message
> news:cevau3$f3j$1@eclipse.org...
>
>>Randy Hudson wrote:
>>
>>
>>>You can override containsPoint(x, y) to return true in the areas where
>
> the
>
>>>figure *does* paint.
>>
>> I code like below in Figure java file
>>
>> public boolean containsPoint(int x, int y) {
>> Rectangle clientArea = getClientArea();
>> if (((clientArea.x < x)&& (clientArea.x + clientArea.width > x))
>> && ((clientArea.y < y)&& (clientArea.y + clientArea.height >
>> y)))
>> {
>> return true;
>> } else
>> return super.containsPoint(x, y );
>>
>> }
>>
>>
>>
>> But not working.
>>
>> Am I Correct?
>>
>>
>>
>>
>>
>>
>>
>>>"Justin" <justinaruja@isletsystems.com> wrote in message
>>>news:cesr5t$pb0$1@eclipse.org...
>>>
>>>
>>>>Hello All,
>>>>
>>>> I make a figure transparent by setOpaque(false).
>>>>
>>>> but I cann't select this figure.
>>>>
>>>> Is it possible?
>>>>
>>>>
>>>>Regards
>>>>
>>>>Justin
>>>>
>>>
>>>
>>>
>>Regards
>>
>>Justin
>
>
>
Re: How can we select aTransparent Figure ? [message #147596 is a reply to message #147464] Thu, 12 August 2004 15:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

So the code is incorrect. You should use
getBounds().getCropped(getInsets()).contains(x, y);

"Justin D'aruja" <justinaruja@isletsystems.com> wrote in message
news:cff1ua$a1q$1@eclipse.org...
> Hello Randy,
>
> My Figure is using local coordinate system.
>
> Regards
>
> Justin
>
>
> Randy Hudson wrote:
> > Does you figure use a local coordinate system or zoom? getClientArea
would
> > be the wrong method to call in that case, since its in the children's
> > coordinates. Otherwise I can't think of anything.
> >
> > "Justin D'aruja" <justinaruja@isletsystems.com> wrote in message
> > news:cevau3$f3j$1@eclipse.org...
> >
> >>Randy Hudson wrote:
> >>
> >>
> >>>You can override containsPoint(x, y) to return true in the areas where
> >
> > the
> >
> >>>figure *does* paint.
> >>
> >> I code like below in Figure java file
> >>
> >> public boolean containsPoint(int x, int y) {
> >> Rectangle clientArea = getClientArea();
> >> if (((clientArea.x < x)&& (clientArea.x + clientArea.width >
x))
> >> && ((clientArea.y < y)&& (clientArea.y + clientArea.height
>
> >> y)))
> >> {
> >> return true;
> >> } else
> >> return super.containsPoint(x, y );
> >>
> >> }
> >>
> >>
> >>
> >> But not working.
> >>
> >> Am I Correct?
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>>"Justin" <justinaruja@isletsystems.com> wrote in message
> >>>news:cesr5t$pb0$1@eclipse.org...
> >>>
> >>>
> >>>>Hello All,
> >>>>
> >>>> I make a figure transparent by setOpaque(false).
> >>>>
> >>>> but I cann't select this figure.
> >>>>
> >>>> Is it possible?
> >>>>
> >>>>
> >>>>Regards
> >>>>
> >>>>Justin
> >>>>
> >>>
> >>>
> >>>
> >>Regards
> >>
> >>Justin
> >
> >
> >
Re: How can we select aTransparent Figure ? [message #147676 is a reply to message #147596] Mon, 16 August 2004 05:37 Go to previous message
Eclipse UserFriend
Originally posted by: justinaruja.isletsystems.com

Hello Randy.

It is working now.

Thanks a lot

Justin


Randy Hudson wrote:

> So the code is incorrect. You should use
> getBounds().getCropped(getInsets()).contains(x, y);

> "Justin D'aruja" <justinaruja@isletsystems.com> wrote in message
> news:cff1ua$a1q$1@eclipse.org...
> > Hello Randy,
> >
> > My Figure is using local coordinate system.
> >
> > Regards
> >
> > Justin
> >
> >
> > Randy Hudson wrote:
> > > Does you figure use a local coordinate system or zoom? getClientArea
> would
> > > be the wrong method to call in that case, since its in the children's
> > > coordinates. Otherwise I can't think of anything.
> > >
> > > "Justin D'aruja" <justinaruja@isletsystems.com> wrote in message
> > > news:cevau3$f3j$1@eclipse.org...
> > >
> > >>Randy Hudson wrote:
> > >>
> > >>
> > >>>You can override containsPoint(x, y) to return true in the areas where
> > >
> > > the
> > >
> > >>>figure *does* paint.
> > >>
> > >> I code like below in Figure java file
> > >>
> > >> public boolean containsPoint(int x, int y) {
> > >> Rectangle clientArea = getClientArea();
> > >> if (((clientArea.x < x)&& (clientArea.x + clientArea.width >
> x))
> > >> && ((clientArea.y < y)&& (clientArea.y + clientArea.height
> >
> > >> y)))
> > >> {
> > >> return true;
> > >> } else
> > >> return super.containsPoint(x, y );
> > >>
> > >> }
> > >>
> > >>
> > >>
> > >> But not working.
> > >>
> > >> Am I Correct?
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>
> > >>>"Justin" <justinaruja@isletsystems.com> wrote in message
> > >>>news:cesr5t$pb0$1@eclipse.org...
> > >>>
> > >>>
> > >>>>Hello All,
> > >>>>
> > >>>> I make a figure transparent by setOpaque(false).
> > >>>>
> > >>>> but I cann't select this figure.
> > >>>>
> > >>>> Is it possible?
> > >>>>
> > >>>>
> > >>>>Regards
> > >>>>
> > >>>>Justin
> > >>>>
> > >>>
> > >>>
> > >>>
> > >>Regards
> > >>
> > >>Justin
> > >
> > >
> > >
Previous Topic:Label to connector disappears
Next Topic:gef versin 3.0.0 compatibility
Goto Forum:
  


Current Time: Fri Apr 26 01:40:42 GMT 2024

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

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

Back to the top