No subject
Tue Mar 31 12:00:45 PDT 2009
int ipadx
This field specifies the internal padding of the component,
how much space to add to the minimum width of the component.
java.awt.GridBagLayout used to interpret ipadx and ipady as values added
to the insets, so increasing ipadx increases the size around the
component, not the component itself.
I've attached a patch fixing this broken behaviour and a test program.
The test program still shows some difference between JDK and Kaffe,
supposedly due to strange (or broken) implementation of preferredSize()
in java.awt.Frame
Pavel Roskin
--96667023-1848547842-929689386=:6274
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="GridBagEx1.java"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.9906181103060.6274 at proxy.typhoon.spb.ru>
Content-Description:
Content-Disposition: attachment; filename="GridBagEx1.java"
aW1wb3J0IGphdmEuYXd0Lio7DQppbXBvcnQgamF2YS51dGlsLio7DQppbXBv
cnQgamF2YS5hcHBsZXQuQXBwbGV0Ow0KDQpwdWJsaWMgY2xhc3MgR3JpZEJh
Z0V4MSBleHRlbmRzIEFwcGxldCB7DQoNCglwdWJsaWMgdm9pZCBpbml0KCkg
ew0KCQlHcmlkQmFnTGF5b3V0IGdyaWRiYWcgPSBuZXcgR3JpZEJhZ0xheW91
dCgpOw0KCQlHcmlkQmFnQ29uc3RyYWludHMgYyA9IG5ldyBHcmlkQmFnQ29u
c3RyYWludHMoKTsNCg0KCQlzZXRMYXlvdXQoZ3JpZGJhZyk7DQoNCgkJYy5p
cGFkeCA9IDE1MDsNCgkJQnV0dG9uIGJ1dHRvbiA9IG5ldyBCdXR0b24oIkhl
bGxvIik7DQoJCWdyaWRiYWcuc2V0Q29uc3RyYWludHMoYnV0dG9uLCBjKTsN
CgkJYWRkKGJ1dHRvbik7DQoNCgkJc2V0U2l6ZSg0MDAsIDMwMCk7DQoJfQ0K
DQoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nIGFyZ3NbXSkgew0K
CQlGcmFtZSBmID0gbmV3IEZyYW1lKCJHcmlkQmFnIExheW91dCBFeGFtcGxl
Iik7DQoJCUdyaWRCYWdFeDEgZXgxID0gbmV3IEdyaWRCYWdFeDEoKTsNCg0K
CQlleDEuaW5pdCgpOw0KDQoJCWYuYWRkKCJDZW50ZXIiLCBleDEpOw0KCQlm
LnBhY2soKTsNCgkJZi5zZXRTaXplKGYuZ2V0UHJlZmVycmVkU2l6ZSgpKTsN
CgkJZi5zaG93KCk7DQoJfQ0KfQ0K
--96667023-1848547842-929689386=:6274
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="ipad.diff"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.10.9906181103061.6274 at proxy.typhoon.spb.ru>
Content-Description:
Content-Disposition: attachment; filename="ipad.diff"
SW5kZXg6IGxpYnJhcmllcy9qYXZhbGliL2phdmEvYXd0L0dyaWRCYWdMYXlv
dXQuamF2YQ0KPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0KUkNTIGZpbGU6IC9o
b21lL2N2c3B1YmxpYy9rYWZmZS9saWJyYXJpZXMvamF2YWxpYi9qYXZhL2F3
dC9HcmlkQmFnTGF5b3V0LmphdmEsdg0KcmV0cmlldmluZyByZXZpc2lvbiAx
LjkNCmRpZmYgLXUgLXIxLjkgR3JpZEJhZ0xheW91dC5qYXZhDQotLS0gR3Jp
ZEJhZ0xheW91dC5qYXZhCTE5OTkvMDYvMTMgMjI6Mjk6MjcJMS45DQorKysg
R3JpZEJhZ0xheW91dC5qYXZhCTE5OTkvMDYvMTcgMjM6MzU6NTANCkBAIC0y
MTQsOCArMjE0LDggQEANCiAJCQl5ID0gY2MuZ3JpZHk7DQogCQl9DQogDQot
CQlpbnQgY3cgPSBjZC53aWR0aCArIGNjLmluc2V0cy5sZWZ0ICsgY2MuaW5z
ZXRzLnJpZ2h0ICsgMiAqIGNjLmlwYWR4Ow0KLQkJaW50IGNoID0gY2QuaGVp
Z2h0ICsgY2MuaW5zZXRzLnRvcCArIGNjLmluc2V0cy5ib3R0b20g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orCQkJ
CWN5ICs9IGluLnRvcDsNCisJCQkJY3ggKz0gaW4ubGVmdDsNCiAJCQkJYnJl
YWs7DQogDQogCQkJY2FzZSBjYy5DRU5URVI6DQo=
--96667023-1848547842-929689386=:6274--
More information about the kaffe
mailing list