<Swing Dev> [9] Review request for 8157065: There is no the focus border on the selected tab.
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Fri Jun 3 16:58:42 UTC 2016
On 03.06.16 18:57, Semyon Sadetsky wrote:
>>>> This is a public API, and it will be strange if two overloaded methods
>>>> behave differently.
>>> I did not get it. Could you provide an example?
>>
>> Something like this:
>> JButton jb = new JButton();
>> SynthUI ui = (SynthUI) jb.getUI();
>> SynthContext context = ui.getContext(jb);
>> SynthPainter painter = context.getStyle().getPainter(context);
>> painter.paintTabbedPaneTabBorder(context, /*Graphics g*/ null, 0, 0,
>> 10, 10, 1);
>> painter.paintTabbedPaneTabBorder(context, /*Graphics g*/ null, 0, 0,
>> 10, 10, 1, JTabbedPane.LEFT);
>>
> And what does this prove? What in this example does not allow to the
> first painter.paintTabbedPaneTabBorder() call, without the orientation
> argument, to have different behavior?
This is an answer to your question, it proof that this functionality can
be accessed via public API. And it is strange that overloaded methods,
which have the same spec, have different behaviour. before the fix all
subclasses had the same implementation(useful code or noop). Actually
the method with orientation flag was added in jdk6 as an extension of
the first method.
--
Best regards, Sergey.
More information about the swing-dev
mailing list