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