bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/26746] JTable body in the scroll pane is bottom-aligned.


From: audriusa at bluewin dot ch
Subject: [Bug swing/26746] JTable body in the scroll pane is bottom-aligned.
Date: 19 Mar 2006 10:45:46 -0000


------- Comment #2 from audriusa at bluewin dot ch  2006-03-19 10:45 -------
Created an attachment (id=11067)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11067&action=view)
ViewportLayout.java.layoutContainer rewrite (proposed fix)

The current ViewportLayout.java.layoutContainer method seems behaving
differently from Sun's implementation in the following ways:
1. If the view is smaller than the port where it should be displayed, the view
is bottom aligned. For instance, if the table is displayed in the frame that is
larger than the table size, the table body is bottom aligned (large whitespace
between table header and table body). This is not correct, in Sun's
implementation the table is always top aligned is such case.
2. If the view width is exactly the same as the view port width, it should be
set as such and the view offset must be set to zero, instead of performing
unnecessary calculations.  Somehow the view offset is calculated different from
zero, this results the unexpected whitespace at the left border of the tables
and text areas in the Swing demo.

The patch seems bringing no regressions, as far as I was able to test.

2006-03-19  Audrius Meskauskas  <address@hidden>

        * javax/swing/ViewportLayout.java (layoutContainer):
        If Scrollable tracks dimension, set view size to the port size. 
        If port is larger than the view, move the view to the top/left.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26746





reply via email to

[Prev in Thread] Current Thread [Next in Thread]