<Swing Dev> [8] Review request for 8003400: JTree scrolling problem when using large model

Sergey Malenkov Sergey.Malenkov at oracle.com
Wed Jan 23 14:21:38 UTC 2013


Hi Alexander,

I agree, because someone could use new JLayer to wrap JTree.

Could you please review the next version of the fix:
http://cr.openjdk.java.net/~malenkov/8003400.3/

Thanks,
SAM

On 22.01.2013 17:29, Alexander Scherbatiy wrote:
>
>    I see that some swing classes use SwingUtilities.getUnwrappedParent()
> method to get the first non JLayer parent.
>    Does it have sense to skip JLayer components to get the JViewport in
> this fix too?
>
>    Thanks,
>    Alexandr.
>
> On 1/16/2013 9:46 PM, Sergey Malenkov wrote:
>> Hi Sergey,
>>
>> > Looks like in the updateCachedPreferredSize we should add
>> > size of scrollbar not a rowSize, since they can be different.
>>
>> Good point. I've prepared the third version of the fix:
>> http://cr.openjdk.java.net/~malenkov/8003400.2/
>>
>> > In this case new invokeLater is not necessary.
>>
>> It is needed because we should ensure that selected row is visible
>> after then the horizontal scroll bar is added.
>>
>> > Also it would be good to dispose the frame in the test.
>>
>> It is disposed, but only for JavaTest.
>> For manual testing it is useful to see the result.
>>
>>
>> Thanks,
>> SAM
>>
>> On 16.01.2013 19:55, Sergey Bylokhov wrote:
>>> Looks like in the updateCachedPreferredSize we should add size of
>>> scrollbar not a rowSize, since they can be different. In this case new
>>> invokeLater is not necessary. Also it would be good to dispose the frame
>>> in the test.
>>>
>>> 16.01.2013 19:16, Sergey Malenkov wrote:
>>>> Hello,
>>>>
>>>> This is the second version, in which the automatic test is stabilized.
>>>> I've added a lock to ensure that JavaTest does not close the window
>>>> before the test is finished.
>>>>
>>>> Thanks,
>>>> SAM
>>>>
>>>> On 16.01.2013 17:29, Sergey Malenkov wrote:
>>>>> Hello,
>>>>>
>>>>> Could you please review the following fix:
>>>>> bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8003400
>>>>> fix: http://cr.openjdk.java.net/~malenkov/8003400.0/
>>>>>
>>>>> JTree with the large model calculates widths for visible rows only.
>>>>> The
>>>>> problem is that the horizontal scroll bar appears after moving to the
>>>>> end and hides the last row. The automatic test is included.
>>>>>
>>>>> Thanks,
>>>>> SAM



More information about the swing-dev mailing list