<AWT Dev> RFC: KeyboardFocusManager patch

Anton V. Tarasov Anton.Tarasov at Sun.COM
Wed Jul 18 01:36:21 PDT 2007

Hi Roman,

Here's what I meant in #2.

In the original javadoc comment you mentioned KeyboardFocusManager.initPeer(),
the method where the current toolkit is checked for being implementing
the KFMPeerProvider interface. As the javadoc for the interface (that becomes
a kind of internally public) is a specification, any mentioning of any
methods, classes etc. in the specification becomes a part of it.
Thus we're making the method KeyboardFocusManager.initPeer() a part of the
specification (and so we will have to support it in the future).
But as you can see this method is private and we're free to change it anytime.

Also I said that the developer anyway mustn't know where exactly his toolkit is
retrieved for a KFMPeer it provides. What the developer should do
is just to implement the KFMPeerProvider. Mentioning in the javadoc that
the KFM peer is retrieved _somewhere_ in the KFM would be enough, right?

Have I explained this clear now?


Roman Kennke wrote:
> Hi Anton,
>> Back to your patch.
>> I'll have to get it though some formal procedures and then, if
>> we have an approval, I'll integrate it into the workspace.
> Nice. Thanks.

(hope you understood that "though" should have been "through" =))

>> 1. There's no DummyKeyboardFocusManagerPeer.
> Whoops. I'll fix that.
>> 2. I think we shouldn't be attached to any method. The KeyboardFocusManager.initPeer
>>     is a private one that can be changed. Anyway, this doesn't matter where AWT
>>     retrieves the KFM peer.
> I'm not sure I understand your issue.
>> 3. We'd be better to mention somehow that AWT expects the toolkit to implement
>>     the interface.
>> For instance, it could be something like the following:
>>   * Provides a {@link KeyboardFocusManagerPeer}. The {@link KeyboardFocusManager},
>>   * during its initialization, assumes that the current {@link java.awt.Toolkit}
>>   * implements this interface that the {@link KeyboardFocusManager} uses to
>>   * retrieve a {@link KeyboardFocusManagerPeer}.
> Sounds good.
> I'll change #1 and #3. Maybe you could explain #2 again?
> /Roman

More information about the awt-dev mailing list