Roman Kennke wrote:
Am Dienstag, den 20.09.2005, 12:02 +0000 schrieb David Gilbert:
Roman Kennke wrote:
I added some defaults to the MetalLookAndFeel (text field borders).
- "TextField.border", MetalBorders.getTextFieldBorder(),
+ "TextField.border",
+ new BorderUIResource(MetalBorders.getTextFieldBorder()),
Hi Roman,
When I saw this I wondered if the getTextFieldBorder() method should
return a border that already implements UIResource. I added some Mauve
tests that confirm that it does, so I think this change should be
reverted and getTextFieldBorder() fixed instead.
Yeah ok, I'll do this and check it in. What about the getTextBorder()
method? I assume it'll be the same here.
You implemented that one to return a BorderUIResource already.
BTW, I could not figure out where this method is actually used. The text
components surely have a different border (looks like they inherit their
borders from the BasicLookAndFeel, except for the text fields).
It's not specified anywhere, but the following program prints out 'true'
for me:
import javax.swing.UIDefaults;
import javax.swing.border.Border;
import javax.swing.plaf.metal.MetalBorders;
import javax.swing.plaf.metal.MetalLookAndFeel;
public class TextBorderTest {
public static void main(String[] args)
{
MetalLookAndFeel metal = new MetalLookAndFeel();
UIDefaults defaults = metal.getDefaults();
Border b1 = defaults.getBorder("PasswordField.border");
Border b2 = MetalBorders.getTextBorder();
System.out.println(b1 == b2);
}
}
I guess I could make that into a Mauve test...
Regards,
Dave
/Roman
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches