> Hi,
>
> I am in a confusion to get the usage of a Proxy Object and attaching a
> Handler to that one.
What sort of proxy are you talking about? A communications proxy (for
example an HTTP proxy), or the design pattern called proxy, or something
else?
> Can you tell me what is the use and where it is useful with a simple
> use case. Thanks in Advance.
Not until you explain more specifically what you're after...
kris - 13 Apr 2006 08:38 GMT
Hi Alex I am talking about the java.lang.reflect.Proxy. Larry gave me
the solution. BUt any way thanks.
> Hi,
>
> I am in a confusion to get the usage of a Proxy Object and attaching a
> Handler to that one.
> Can you tell me what is the use and where it is useful with a simple
> use case. Thanks in Advance.
If you mean java.lang.reflect.Proxy , one use is to
provide an implementation for an interface that may or
may not be present at runtime. For example, you could
implement a MouseWheelListener in code that runs
under Java 1.3, which has no MouseWheelListener,
and later versions, which do. The code would check
for the existence of the interface and do nothing if it
does not exist. This is a safer way to do this than using
stubs.
James McGill - 12 Apr 2006 19:48 GMT
I would like to create a Shape that is the segment of an Arc, bounded by
concentric circles. I need to do this in order to paint just that area
of a circle instead of painting the pie slice. Picture of what I want
is here:
http://www.u.arizona.edu/~jmcgill/circlePaintProblem.png
I tried to fill in the sectors, procedurally using lines, but that's
ugly.
What I really want to do is, create an Arc, slice that Arc between
two Circles, and end up with a Shape that is only the result of the
intersection. If there's not a way to actually get a Shape like that,
maybe I can do it with Alpha so that only the piece I want gets drawn?
Thanks, I hope my explanation is clear.
James
James McGill - 12 Apr 2006 23:02 GMT
Nevermind, I figured out how to do it with Area. Just subtract one arc
from the other.