153 |
} |
} |
154 |
else |
else |
155 |
{ |
{ |
|
viewPref.height = viewMinimum.height; |
|
156 |
int overextension = portLowerRight.y - viewPref.height; |
int overextension = portLowerRight.y - viewPref.height; |
157 |
if (overextension > 0) |
if (overextension > 0) |
158 |
portBounds.y -= overextension; |
portBounds.y -= overextension; |
167 |
} |
} |
168 |
else |
else |
169 |
{ |
{ |
|
viewPref.width = viewMinimum.width; |
|
170 |
int overextension = portLowerRight.x - viewPref.width; |
int overextension = portLowerRight.x - viewPref.width; |
171 |
if (overextension > 0) |
if (overextension > 0) |
172 |
portBounds.x -= overextension; |
portBounds.x -= overextension; |
173 |
} |
} |
174 |
|
|
175 |
port.setViewPosition(portBounds.getLocation()); |
port.setViewPosition(portBounds.getLocation()); |
176 |
|
// TODO: I doubt that the size should really be touched here, except when |
177 |
|
// the view is somehow smaller than its minimumSize. I would think that |
178 |
|
// when the size of a view is set manually to a fixed value, that this |
179 |
|
// value should be left unchanged, and not reset to the preferred or |
180 |
|
// minimum size. -- Roman Kennke |
181 |
port.setViewSize(viewPref); |
port.setViewSize(viewPref); |
182 |
} |
} |
183 |
} |
} |