/[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.10.2.3 by gnu_andrew, Tue Aug 2 20:12:37 2005 UTC revision 1.10.2.4 by gnu_andrew, Sat Sep 10 15:31:50 2005 UTC
# Line 69  public class ViewportLayout implements L Line 69  public class ViewportLayout implements L
69      JViewport vp = (JViewport)parent;      JViewport vp = (JViewport)parent;
70      Component view = vp.getView();      Component view = vp.getView();
71      if (view != null)      if (view != null)
72        return view.getPreferredSize();        {
73            if (view instanceof Scrollable)
74              return ((Scrollable)view).getPreferredScrollableViewportSize();
75            return view.getPreferredSize();
76          }
77      else      else
78        return new Dimension();        return new Dimension();
79    }    }
# Line 120  public class ViewportLayout implements L Line 124  public class ViewportLayout implements L
124    
125      JViewport port = (JViewport) parent;          JViewport port = (JViewport) parent;    
126      Component view = port.getView();      Component view = port.getView();
127        
128      if (view == null)      if (view == null)
129        return;        return;
130    
# Line 139  public class ViewportLayout implements L Line 143  public class ViewportLayout implements L
143      if (portBounds.height >= viewMinimum.height)      if (portBounds.height >= viewMinimum.height)
144        {        {
145          portBounds.y = 0;          portBounds.y = 0;
146          viewPref.height = portBounds.height;          if ( !(view instanceof Scrollable) || ((Scrollable)view).getScrollableTracksViewportHeight())
147              viewPref.height = portBounds.height;
148        }        }
149      else      else
150        {        {
# Line 153  public class ViewportLayout implements L Line 158  public class ViewportLayout implements L
158      if (portBounds.width >= viewMinimum.width)      if (portBounds.width >= viewMinimum.width)
159        {        {
160          portBounds.x = 0;          portBounds.x = 0;
161          viewPref.width = portBounds.width;          if ( !(view instanceof Scrollable) || ((Scrollable)view).getScrollableTracksViewportWidth())
162              viewPref.width = portBounds.width;
163        }        }
164      else      else
165        {        {

Legend:
Removed from v.1.10.2.3  
changed lines
  Added in v.1.10.2.4

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