Default methods in JFX-8

Petr Pchelko petr.pchelko at oracle.com
Thu Oct 3 13:54:31 PDT 2013


> I'm not sure there are any 3rd party text input controls that don't extend from TextInputControl. If a 3rd party text input control does extend from TextInputControl / TextInputControlSkin, will it work?
I'm suppose it should work, but this question requires deeper investigation.

> If we use an internal interface, will this fact "leak" through the public API? That is, if I enumerated the hierarchy of a public API member, will I see this non-public interface somewhere on it?
No. It would be absolutely internal. 
All the public APIs would still return and take InputMethodRequests interface. Just TextInputControl and WebView would implement an internal extended version and we will typecast it to the extended version inside JFXPanel.

> I'm wondering if we can punt on the problem until somebody encounters it, and in the meantime just use a private interface.
I agree. I will change the fix than.

Thank you.
With best regards. Petr.

On Oct 4, 2013, at 12:48 AM, Richard Bair <richard.bair at oracle.com> wrote:

>>> What code needs to call these new methods?
>> 
>> These are used in the JFXPanel to provide the needed information to the AWT/Swing, so that it could properly position the text composition window and track what is going on with the text.
>> 
>>> I don't know enough about the domain to know what other options you have, besides adding InputMethodRequests2 or whatever and having to do an instanceof test and cast. But that might actually be the better way to handle this situation
>> We could add some internal extension of the interface and use instanceof checks. It would be done in a single place and would not make a lot of harm. 
>> The only problem with this approach is that third-party text-input component would not be able to support IM inside the JFXPanel.
> 
> I'm not sure there are any 3rd party text input controls that don't extend from TextInputControl. If a 3rd party text input control does extend from TextInputControl / TextInputControlSkin, will it work?
> 
> If we use an internal interface, will this fact "leak" through the public API? That is, if I enumerated the hierarchy of a public API member, will I see this non-public interface somewhere on it? Or is the only way to get a hold of some internal object and cast it?
> 
> I'm wondering if we can punt on the problem until somebody encounters it, and in the meantime just use a private interface.
> 
> Thanks
> Richard



More information about the openjfx-dev mailing list