<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 15:39:36 UTC 2016


On 03.06.16 18:20, Semyon Sadetsky wrote:
>> I do not say that we should implement all methods but we need to be
>> consistent, if one version of paintTabbedPaneTabBorder is implemented
>> then the second should be implemented too.
> This conclusion need to be proven because there other methods of the GTK
> painter implemented in the same way, for example,
> paintSeparatorBackground(),

And it also looks like a bug,

> and there were no complains for all the time.

I am sure the same was assumed about the current method as well.

>> 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);


-- 
Best regards, Sergey.



More information about the swing-dev mailing list