This is the forum for JIDE Common Layer which is open sourced at
https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.
Moderator: JIDE Support
Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.
by jDiddy » Sun Jul 22, 2012 12:37 pm
Hi
I am developing a swing application using a custom synth L&F. I keep getting null pointer exceptions on Mac OSX (tis ok on windows platform) when I load my custom synth L&F. I can see this has something to do with UIDefaultsLookup missing keys for just about everything. Having read the documentation regarding com.jidesoft.plaf.LookAndFeelFactory I am still slightly unaware of how to configure my L&F or the UIDefaultsInitializer/UIDefaultsCustomizer on how to obtain/define the values required. If someone could give me some pointers on how to define this or add the required resources it would be very much appreciated.
Thanks
Jonathan
-
jDiddy
-
- Posts: 2
- Joined: Sun Jul 22, 2012 12:31 pm
by jDiddy » Sun Jul 22, 2012 2:15 pm
Update:
Managed to get it working, not sure if this is how you should do things, and still seems slightly strange that it is only for Mac OSX, shortly after setting the synth L&F:
- Code: Select all
LookAndFeelFactory.UIDefaultsInitializer def = new LookAndFeelFactory.UIDefaultsInitializer(){
@Override
public void initialize(UIDefaults uiDefaults) {
uiDefaults.put("controlText", Color.black) ;
uiDefaults.put("controlHighlight", Color.black) ;
uiDefaults.put("controlLtHighlight", Color.black) ;
uiDefaults.put("controlShadow", Color.black) ;
uiDefaults.put("controlDkShadow", Color.black) ;
uiDefaults.put("activeCaptionText", Color.black) ;
uiDefaults.put("controlDkShadow", Color.black) ;
uiDefaults.put("control", Color.black) ;
uiDefaults.put("controlShadow", Color.black) ;
uiDefaults.put("activeCaption", Color.black) ;
uiDefaults.put("StyledLabelUI", Color.black) ;
uiDefaults.put("textHighlight", Color.black) ;
}
} ;
LookAndFeelFactory.addUIDefaultsInitializer(def);
Thanks
Joanthan
-
jDiddy
-
- Posts: 2
- Joined: Sun Jul 22, 2012 12:31 pm
by JIDE Support » Sun Jul 22, 2012 4:38 pm
Synth L&F doesn't have those UIDefault configured as other L&Fs did. That's why you need to use UIDefaultsInitializer to add those missing UIDefaults.
JIDE Software Technical Support Team
-
JIDE Support
- Site Admin
-
- Posts: 37263
- Joined: Sun Sep 14, 2003 10:49 am
-
Return to JIDE Common Layer Open Source Project Discussion (Community Driven)
Who is online
Users browsing this forum: No registered users and 20 guests