Closed DustinMerrell closed 3 years ago
How does your code look like? What are the visuals you're aiming to achieve?
I want to have some sort of border or color change based on the user selection. I am looking to change the hue of the buttons or the border color of the buttons to the user defined color.
void setColor(Color color) {
if (this.color==color) return;
this.color = color;
// if (py3d.crew.Decorator.usingLowUI())
this.setColor(color);
this.setOpaque(true);
setBackgrounds(null, color);
// if (color == null)
// setBorder(originalBorder);
// else{
// setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED, color, color));
// setBackgrounds(null, color);
// }
setBorder((color==null) ? originalBorder : BorderFactory.createBevelBorder(BevelBorder.RAISED, color, color));
}
Thank you
Dustin Merrell
Application Systems Director
Pyware Customer Support
Phone - 940-240-8536
Fax - 940-464-0573
Chat with me - https://drift.me/pywaredustin https://drift.me/pywaredustin
http://www.facebook.com/Pygraphics www.facebook.com/Pygraphics
Facebook Pyware Users Group
https://www.facebook.com/groups/377417402308160/ https://www.facebook.com/groups/377417402308160/
From: Kirill Grouchnikov @.> Sent: Friday, July 9, 2021 4:55 PM To: kirill-grouchnikov/radiance @.> Cc: DustinMerrell @.>; Author @.> Subject: Re: [kirill-grouchnikov/radiance] Beveled Border on Jbutton (#351)
How does your code look like? What is the visuals you're aiming to achieve?
— You are receiving this because you authored the thread. Reply to this email directly, https://github.com/kirill-grouchnikov/radiance/issues/351#issuecomment-877475987 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/ACI4VTM3VMTRYPEJBHFW54DTW5V2NANCNFSM5ADPXWTA unsubscribe.
Using BorderFactory.createBevelBorder
directly is not supported, for the simple reason that it doesn't play well with Substance visuals. Since it's still a bit vague in the description, I'll link to a few options:
JComponent
that you get is not guaranteed to always be a buttonBORDER
color scheme association kind and one of the selected component states - if that is what you mean by "user selection"JComponent.setBackground
along with SubstanceCortex.GlobalScope.setColorizationFactor
API to control application-specific background color that is mixed into the current skin
Version of Radiance 4.0 Snapshot
Sub-project Substance
Version of Java Java 11
Version of OS Windows 10 and Mac 11.4
I am unable to get a beveled border to paint on a Jbutton. Is there any documentation on this that I could be missing?