/[classpath]/classpath/javax/swing/ViewportLayout.java
ViewVC logotype

Diff of /classpath/javax/swing/ViewportLayout.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by rabbit78, Wed Oct 19 15:45:05 2005 UTC revision 1.18 by abalkiss, Wed Oct 26 19:40:26 2005 UTC
# Line 145  public class ViewportLayout implements L Line 145  public class ViewportLayout implements L
145                                       portBounds.y + portBounds.height);                                       portBounds.y + portBounds.height);
146                    
147      // vertical implementation of the above rules      // vertical implementation of the above rules
148      if (portBounds.height >= viewPref.height)      if (portBounds.height >= viewMinimum.height)
149        {        {
150          portBounds.y = 0;          portBounds.y = 0;
151          if ( !(view instanceof Scrollable) || ((Scrollable)view).getScrollableTracksViewportHeight())          if ( !(view instanceof Scrollable) || ((Scrollable)view).getScrollableTracksViewportHeight())
# Line 153  public class ViewportLayout implements L Line 153  public class ViewportLayout implements L
153        }        }
154      else      else
155        {        {
156            viewPref.height = viewMinimum.height;
157          int overextension = portLowerRight.y - viewPref.height;          int overextension = portLowerRight.y - viewPref.height;
158          if (overextension > 0)          if (overextension > 0)
159              portBounds.y -= overextension;              portBounds.y -= overextension;
160        }        }
161    
162      // horizontal implementation of the above rules      // horizontal implementation of the above rules
163      if (portBounds.width >= viewPref.width)      if (portBounds.width >= viewMinimum.width)
164        {        {
165          portBounds.x = 0;          portBounds.x = 0;
166          if ( !(view instanceof Scrollable) || ((Scrollable)view).getScrollableTracksViewportWidth())          if ( !(view instanceof Scrollable) || ((Scrollable)view).getScrollableTracksViewportWidth())
# Line 167  public class ViewportLayout implements L Line 168  public class ViewportLayout implements L
168        }        }
169      else      else
170        {        {
171            viewPref.width = viewMinimum.width;
172          int overextension = portLowerRight.x - viewPref.width;          int overextension = portLowerRight.x - viewPref.width;
173          if (overextension > 0)          if (overextension > 0)
174              portBounds.x -= overextension;              portBounds.x -= overextension;

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26