Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #36771
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2017-06-29 13:49 -0700 |
| References | (3 earlier) <1b033cbe-4bc2-497f-9c93-e6e90b75f39b@googlegroups.com> <oj3cof$rbp$1@dont-email.me> <7dff7a25-5881-4ecb-a937-ab076082dfcd@googlegroups.com> <oj3ik3$c4n$1@dont-email.me> <oj3o1v$4oh$1@dont-email.me> |
| Message-ID | <ecf3ac72-fdc9-44b7-8cbd-b7129751d101@googlegroups.com> (permalink) |
| Subject | Re: Eclipse |
| From | Eric Douglas <e.d.programmer@gmail.com> |
On Thursday, June 29, 2017 at 4:34:59 PM UTC-4, Eric Sosman wrote:
> The question I'd ask is: What does the Component's presence in (or
> absence from) the List<MyCustomInterface> tell us? That is, what will
> the code do differently if the answer is "Here!" rather than "Huh?"
> And -- here's the nub -- could the different action be handled more
> smoothly by overriding focusGained() and/or focusLost() in the
> MyCustomInterface implementation?
>
> Maybe not, but that's the question I'd ask to start with.
This component, which is checking for focusGains on this array of components, has it's own list of listeners. It is reporting a focusGain/focusLost event to those whenever one of these components gains or loses focus except if the focus came from one of these components and went to one of these components. This custom event needs to treat these components as a group.
The only way I can see to get rid of the warning is to break it up to tell it they're components.
myComponentArray.contains(focusComponent)
becomes
for (MyCustomInterface i : myComponentArray)
if (((Component)i).equals(focusComponent)) {
}
}
I don't know any way to tell it for certain that yes any class which implements this interface does also extend Component.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-28 07:57 -0700
Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-28 09:04 -0700
Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-28 12:07 -0700
Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-29 06:05 -0700
Re: Eclipse Jerry Stuckle <jstucklex@attglobal.net> - 2017-06-29 09:32 -0400
Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-29 06:42 -0700
Re: Eclipse Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-06-29 09:47 -0400
Re: Eclipse Andreas Leitgeb <avl@logic.at> - 2017-06-30 14:47 +0000
Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-30 08:22 -0700
Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-07-07 06:19 -0700
Re: Eclipse Andreas Leitgeb <avl@logic.at> - 2017-07-13 09:29 +0000
Re: Eclipse Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-29 17:18 +0000
Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-29 11:08 -0700
Re: Eclipse Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-29 18:58 +0000
Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-29 12:55 -0700
Re: Eclipse Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-29 21:31 +0000
Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-30 04:55 -0700
Re: Eclipse Martin Gregorie <martin@address-in-sig.invalid> - 2017-06-30 13:02 +0000
Re: Eclipse Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-06-29 16:34 -0400
Re: Eclipse Eric Douglas <e.d.programmer@gmail.com> - 2017-06-29 13:49 -0700
Re: Eclipse Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-06-29 18:16 -0400
Re: Eclipse Arne Vajhøj <arne@vajhoej.dk> - 2017-07-02 11:56 -0400
csiph-web