How can we select aTransparent Figure ? [message #146589] |
Thu, 05 August 2004 04:29  |
Eclipse User |
|
|
|
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 #147676 is a reply to message #147596] |
Mon, 16 August 2004 01:37  |
Eclipse User |
|
|
|
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
> > >
> > >
> > >
|
|
|
Powered by
FUDForum. Page generated in 0.25574 seconds