Re: Eliminating focus ring space on Leopard & Java 1.5
Subject : Re: Eliminating focus ring space on Leopard & Java 1.5
From: Bug <email@hidden >
Date: Mon, 29 Oct 2007 21:31:30 +0000
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; bh=qR/CkgFqlN4MCzEOmmWg1l7+VG7OUsgWjMaFg/ToTn8=; b=L2xPRs+uBgVfgY/N1NrJD4NBpgpKglI8A8PpmQ34bEvEYMbngFGTX6NXFd27ECIxfwtaiYUTtNZWnHErwpT69XOaelkHJukcioP2Fkc0Rnrj+CmUJUd2uV+Jor3g5D7rFSfb/96aOXRnITi37Ug3/6g5D6nOVxD86J2DZIpD7qU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:cc:message-id:from:to:in-reply-to:content-type:content-transfer-encoding:mime-version:subject:date:references:x-mailer; b=A3u954Syloh6AsQSRvdhBQjW20cCd1JLSYspOaK9NEN64epoi/QaOrzfqtirBudy0aXW1fDKSA4KqzbWPig4leIRihz/OUg7v3ij+TsTNVGUCycaigVf2rpf/3Ad8vk50+qD0Q7g41p4J5Z6/zVaUspV3DovY0s5lshutKGTerA=
I must admit I always get medieval on them:
button.setUI(new BasicButtonUI());
On 29 Oct 2007, at 20:17, Steve Roy wrote:
Hey!
I have buttons that I don't want to ever get focus (in a toolbar) so
I setFocusable(false), but while this does make them non-focusable,
the space used by the focus ring is still there. Is there a way to
eliminate this space?
Usually I would just set a compound border made up of a negative
empty border and the original border:
button.setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createEmptyBorder(-3, -3, -3, -3),
button.getBorder()));
But this trick doesn't work with these new borders. Somehow they
just don't draw anything at all when subverted this way.
I don't see any new client property to control the focus ring or
focus ring space either.
At this point I could put the border inside a container with a
negative empty border, but that's uglier than I would like it to be.
Do you guys know of anything I might have missed?
(By the way, I'm using the client property JButton.buttonType =
square.)
Steve
--
Steve Roy
<http://homepage.mac.com/sroy >
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.